* Add CONTRIBUTING.md
* Include CONTRIBUTING.md in README.md
* Fix broken links
* Update CONTRIBUTING.md
* Update CONTRIBUTING.md
* Use "If a PR" instead of "If the PR"
* Mention fold and pretty printing
* Add missing precedence of the operator '|>'
* Add a note about tests
* Rename to Sophia
* Add missing using keyword
* Update the entire list of keywords in sophia syntax doc
* Add a section about creating a new aesophia release
* Add polymorphism to syntax tree and parser
* Add polymorphism to infer types
* Fix pretty printing
* Add new tests and fix old tests
* Fix the comparison between unit and empty tuple
* Report undefined interface errors before checking implemented interfaces
* Add test for implementing multiple interfaces
* Add test for implementing two interfaces with entrypoints of same names and different types
* Add tests for interfaces implementing interfaces
* Draft: Add variance switching
* Revert "Draft: Add variance switching"
This reverts commit 92dc6ac169cfbff447ed59de04994f564876b3fb.
* Add variance switching
* Fix broken tests
* Fix broken abi tests
* Add tests for variance switching
* Fix tests after rebase
* Variance switching for custom datatypes
* Fix dialyzer warning
* Add testing for custom types variance switching
* Make opposite_variance a separate function
* Make is_subtype/4 a separate function
* Fix warning
* Mark tvars as invariant
* Add type_vars_uvar ets table to ets_tables()
* Don't destroy and recreate type errors table when not needed
* Fixes from the reviews
* Use is_list to check if a var is a list
* Compare named args in fun_t
* Test only for covariance and contravariance
* Remove arrows_in_type and use infer_type_vars_variance instead
* Add tests for option and type aliases
* Fix previous commit
* Rename check_implemented_interfaces_recursive to check_implemented_interfaces1
* Make interfaces declare functions from extended interfaces
* Restore test.aes
* Add test for variance switching in records
* Enable variance switching for record types
* Handle builtin types type variables separately
* Add tests for oracles and oracle queries
* Replace compare_types with non-throwing version of unify
* Add the context to unification error
* Test variance switching for bivariant records
* Give clear names to the records in records variance switching test
* Handle comments about polymorphism_variance_switching.aes
* Rename datatypes in custom types variance switching test for readability
* Change the variance of the oracle_query type vars
* Add test for accessing maps with the wrong type
* Default to invariant when the variance of the type vars is unknown
* Rename test files to have common prefix
* Rename functions in variance switching tests for readability
* Fix variance inference
* Eliminate redundant tests
* Test all cases for bivariant
* Add case guards to parser
* Add pattern guards to infer types and fcode generation
* Add functions guards
* Add test for patterns guards
* Update docs
* Update CHANGELOG.md
* Remove stateful context from Env for guards
* Elaborate on guards
* Add failing test for stateful pattern guards
* Implement multiple guards
* Fix tests
* Disable aevm related tests
* Split the sentence before if and otherwise
* Fix type in docs
* Implement multiple exprs in the same guard
* Fix pretty printing
* Change tests to include multiple guards
* Add test for non-boolean guards
* Desugar clauses with guards
* Fix incomplete patterns bug
* Fix docs
* Compile to icode when no guards are used
* Revert "Disable aevm related tests"
This reverts commit e828099bd97dffe11438f2e48f3a92ce3641e85b.
* Change syntax tree and parser
* Add assign pattern to type inference
* Use check_expr instead of hard-coded type
* Add fcode generation for assign pattern
* Implement rename_spat for assign pattern
* Add tests
* Update CHANGELOG.md
* Update docs and changelog
* Add letpat to aeso_syntax_utils:fold
* Use Plus instead of Scoped
* Support for CREATE, CLONE and BYTECODE_HASH
* Add missing files
* Pushed the clone example through the typechecker
* CLONE compiles
* Fix dependent type in CLONE
* Bytecode hash fixes
* Refactor
* Refactor 2
* move some logic away
* Fixed some error messages. Type inference of child contract still does some random shit\n(mistakes arguments with result type)
* CREATE sometimes compiles and sometimes not
* Fix some scoping/constraint issues
* works, needs cleanup
* cleanup
* Fix some tests. Remove optimization of singleton tuples
* Fix default argument for clone
* Cleanup
* CHANGELOG
* Mention void type
* Address review, fix some dialyzer errors
* Please dialyzer
* Fix failing tests
* Write negative tests
* Docs
* TOC
* missing 'the'
* missing 'the'
* missing 'the'
* missing 'the'
* mention pre-fund
* format
* pre-fund clarification
* format
* Grammar in docs
* Updated tests, banned type decls and toplevel letvals
* Properly ban nested contracts
* Fix including by path
* Fix error message test
* Fix prettpr attr display. Make dialyzer happy
* More tests
* Fixed type printing
* Updated docs
Also handle `\x{hhh..}` in strings... Character literals has to be a single character, not composite.
+ tests (and the corresponding fix to the char literal pretty printer)
* Allow block with separate type signature and definition of a function
For instance,
```
function
add : (int, int) => int
add(x, y) = x + y
```
cc #196
* Allow pattern matching in left-hand sides
* Changelog
* Fix type spec
* partial case-on-constructor
* Changelog for pattern-matching lets
* Added standard List library and list comprehensions
Added List library.
Flatmaps WIP
Fixed dependency in flat_map
fcode generation
Updated tests to use custom list lib
Added comprehension test
Added stdlib
sanity
Test
* Extended stdlib for lists. Added error message for redefinition of stdlibx
* Fixed type template
* Improved stdlib
* More functions
* Fixed cyclic includes
* Refixed imports and added few tests
* Added fail test
* Undelete removed type spec
* Remove typo
* Fix iter function
* Fixed typo
* Added if guards and let statements in list comp
* Added more fail tests
* Option stliv
* 2 and 3 tuple stdlib
* Updated stdlib to new syntax. Added recursor and changed all/any functions
* Fixed performance issues. Changed include management
* Fixed hash type
Problem: having public as the default makes it very easy to accidentally
export local function by forgetting the `private` modifier.
Solution: functions are private by default and must be declared as `entrypoint`s
to be exported. So `entrypoint foo() = ...` instead of `function foo() = ...`.
We still accept the `private` modifier although it is redundant.
* Update to changes in icode format
* Start on new intermediate code for FATE
* Compile `let` to FATE
* Fix and improve broken bytecode optimisations
* Basic tuple patterns
* Compile shallow matching on tuples
* Liveness analysis for local variables
* Fix minor bug
* Use RETURNR when possible
* Nicer debug printing
* Refactor optimization rules
* Compile tuple construction
* Improve instruction analysis and generalize some optimizations
* Compile nested pattern matching to case trees
(Only tuple and variable patterns so far)
* Reannotate and repeat optimization pass once it done
Could try hard to keep annotations more precise, but would be more error prone
* Get rid of unnecessary STORE instructions
* Keep better track of liveness annotations when swapping instructions
* Limit the number of iterations for the optimization loop
Should finish in one iteration, but we shouldn't loop if there are bugs
or corner cases where it doesn't.
* Pattern matching on booleans
* wip: rewrite case tree compiler to handle catch-alls
still with debug printing, and can't compile it yet
* Add missing case in renaming
* Compile case trees all the way to Fate assembly
* Simplify variables bindings in environment
* Shortcut let x = y in ...
* compile list literals
* Fix various bugs in pattern match compilation
* Pretty printer for fcode
* Fix renaming bug
* Another renaming bug
* Handle switch_body in optimizations
* Remove optimization for if-then-else
* Tag instructions in annotated scode
* Remove 'if' from fcode
* Fix dialyzer things
* Remove unused argument
* Compile pattern matching on integer literals
* Compile list patterns
* Use op_view in more places
* allow leaving out fields from record patterns
* compile records (patterns and construction)
* Compile record update
* Use SETELEMENT instruction
* Compile variants
* Remove incorrect push for tuple switches
* Optimize matching on single constructors datatypes
* Use the fact that SWITCH and JUMPIF can use args and vars
* string literals and pattern matching on the same
* Compile character literals
* Minor refactoring of op instruction handling
* compile address literals
* Get rid of unit in AST
* Unary operators
* Compile function calls
(to fully saturated top-level functions only)
* fix breakage after unary operators
* variables are now lists of names in fcode
* pretty printing for function calls
* use STORE ?a instead of PUSH during optimizations
* no-op fcode optimization pass
* some constant propagation optimizations
* Case on constructor optimization
* fix minor bugs
* Compile all the operators
* Compile maps
* Simplify JUMPIF on true/false
* Fixed left-over reference to STR_EQ
* Add compile-time evaluation for more operators
* Distinguish local vars and top-level names already in fcode
* Compile builtins
* Compile bytes(N)
Compile to FATE strings for now
* Improve inlining of PUSH
* Fix name resolution bug
* Change map_get/set to operators in fcode
* Compile lambdas and higher-order functions
* Optimize single variable closure envs
* Handle unapplied builtins and top-level functions
* Missing case in fcode pretty printer
* Fix variable binding bug in fcode compiler
* Compiler side of state updates
No support in FATE yet though
* Compile statements
* Compile events
But no FATE support for events yet
* Compile remote calls
* Clearer distinction between applied and unapplied top-level things (def/builtin) in fcode
* Tag for literals in fcode to make code cleaner
* We now have block hash at height in FATE
* Update aebytecode commit
* Get rid of catchall todos
* Jump some hoops to please Dialyzer