Ulf Norell
5fc6e18cd2
Add Address.to_contract
...
Casts an address to a (any) contract type.
2019-09-30 14:47:05 +02:00
Ulf Norell
dd94a6bd67
add pragma to check compiler version
2019-09-27 17:31:10 +02:00
Ulf Norell
f81dc88526
Allow underscore separators in number and bytes literals
...
For instance, `1_000_000_000` or `#FFFF_FFFF_FFFF_FFFF`
2019-09-23 14:04:09 +02:00
Ulf Norell
981027b2e7
Test case for function application source location
2019-09-14 12:12:55 +02:00
Ulf Norell
cc531f9957
Test case for Bytes.concat/split
2019-09-09 18:40:45 +02:00
Ulf Norell
e2ab41eeb2
Add Bytes.concat and Bytes.split to type checker
2019-09-09 18:40:45 +02:00
Ulf Norell
9dac134477
Print the error kind in error messages
2019-09-06 09:51:17 +02:00
Hans Svensson
f07d1904ba
Less redundant error message
2019-09-05 15:28:03 +02:00
Hans Svensson
37a37a169d
File not found error
2019-09-05 11:16:31 +02:00
Ulf Norell
97d58fcacd
Nicer error for missing event type
2019-09-04 11:03:33 +02:00
Ulf Norell
d8adfce465
Tests for unapplied builtins
2019-09-04 10:45:43 +02:00
Ulf Norell
602e99512f
Fail gracefully on higher-order state in AEVM and accept it in FATE
2019-09-03 17:24:40 +02:00
Ulf Norell
325d69e96d
Fail gracefully on bad top-level declaration
2019-09-03 17:24:06 +02:00
Ulf Norell
412b0b8b6d
Improve some parse errors
2019-09-03 16:51:04 +02:00
Ulf Norell
61faa3e2dd
Fix missing file name from type errors
2019-09-03 15:01:29 +02:00
Ulf Norell
69a4c1365b
Test case for calling init function from inside the contract
2019-09-03 14:47:13 +02:00
Ulf Norell
30de1db163
More code errors
2019-09-03 14:35:13 +02:00
Ulf Norell
0533ab27e1
Check that there are no maps in map keys already in type checker
2019-09-03 14:35:13 +02:00
Ulf Norell
510935d945
Framework and tests for code generation (icode/fcode) errors
2019-09-03 14:35:13 +02:00
Hans Svensson
249b61238e
Structured parse_errors and type_errors
2019-09-03 14:35:13 +02:00
Ulf Norell
850221aaf3
Remove no_implicit_stdlib option
2019-08-27 14:10:40 +02:00
Ulf Norell
cfd036b199
Test deadcode elimination for FATE backend
2019-08-21 11:51:36 +02:00
Hans Svensson
f27d37d624
Add payable modifier for contracts and entrypoints
2019-08-19 08:57:31 +02:00
Radosław Rowicki
b669d2df1e
Added list comprehensions and standard List, Option, Func, Pair, and Triple library ( #105 )
...
* 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
2019-08-14 13:53:58 +02:00
Ulf Norell
5ff7aa5821
Merge pull request #109 from radrow/tuple-type
...
Change tuple typing syntax
2019-08-05 09:13:30 +02:00
Radosław Rowicki
045df292be
Fixed pretty printing and pattern split ( #111 )
2019-07-29 14:27:01 +03:00
radrow
5ff983b0b3
Updated tests
2019-07-22 13:56:45 +02:00
Ulf Norell
6a59e455ce
Update tests for entrypoints
2019-06-28 09:42:28 +02:00
Tobias Lindahl
c26ace6c2c
Implement aens instructions for fate
2019-06-26 13:24:48 +02:00
Ulf Norell
961f557215
Events now compile to FATE
2019-06-25 19:58:14 +02:00
Ulf Norell
a3efaf71a7
Compile oracle check functions in FATE backend
2019-06-25 16:27:48 +02:00
Ulf Norell
6612c29758
Type check Bytes.to_X builtins
2019-06-24 11:44:07 +02:00
Ulf Norell
7fa98892a8
Fix compiler crash on missing let body
2019-06-21 14:16:26 +02:00
Ulf Norell
d38367e023
Fix bug in type checker
2019-06-20 16:02:19 +02:00
Tobias Lindahl
990df562e0
Handle oracle operation in FATE ( #90 )
...
* Handle oracle operation in FATE
Keep oracle type information on fcode level
Introduce typereps as values
Handle oracle registration
Handle oracle query object and oracle_query op
Handle oracle get question
Handle oracle query fee
Handle oracle get answer
Handle oracle respond
Handle oracle extend
* Address review comment
2019-06-18 14:32:08 +02:00
Hans Svensson
11dc632927
Add handling of auth_tx_hash
2019-06-14 13:14:24 +02:00
Hans Svensson
3e2281a834
Make fate-backend also return a Map
2019-06-10 15:13:34 +02:00
Ulf Norell
ed3ed6ded6
Check (de)serialize roundtrip in fate compiler tests
2019-06-03 13:41:07 +02:00
Hans Svensson
758fecbb9b
Merge pull request #75 from aeternity/fix_aci
...
Restructure and improve ACI
2019-05-31 11:33:07 +02:00
Ulf Norell
bea524635b
Add backend argument (aevm | fate) to aeso_compiler options
...
and test fate backend on (most) compilable contracts
2019-05-28 16:40:54 +02:00
Hans Svensson
1ed40f1cca
Pretty print state variables 'a instead of '1
2019-05-28 11:08:36 +02:00
Hans Svensson
5c98317a5a
Make 'indexed' keyword optional
2019-05-28 11:08:36 +02:00
Ulf Norell
96547ea2ec
Test for record field parse error
2019-05-27 12:04:38 +02:00
Ulf Norell
74d4048d9f
Check that init doesn't read or write the state
2019-05-13 17:51:47 +02:00
Ulf Norell
5aed8b3ef5
Check stateful annotations
...
Functions must be annotated as `stateful` in order to
- Update the contract state (using `put`)
- Call `Chain.spend` or other primitive functions that cost tokens
- Call an Oracle or AENS function that requires a signature
- Make a remote call with a non-zero value
- Construct a lambda calling a stateful function
It does not need to be stateful to
- Read the contract state
- Call another contract with value=0, even when the remote function is stateful
2019-05-13 13:39:17 +02:00
Ulf Norell
e1a798aef4
Check for repeated argument names to functions
...
(PT-159592825)
2019-05-10 15:51:42 +02:00
Ulf Norell
23cc8e1132
Letrec and letfun ( #65 )
...
* Type check and compile letfuns
* Minor code simplification
* Remove let rec from Sophia
2019-05-10 13:27:57 +02:00
Hans Svensson
192ec207a7
Add Contract.creator and address checking primitives
2019-05-09 09:54:04 +02:00
Ulf Norell
8a381e5ef1
Support equality on bytes(N)
2019-04-25 16:06:50 +02:00
Hans Svensson
4324bfd49e
Add bytes(int), add address_literalsm add ecverify_secp25k1
...
hash -> bytes(32)
signature -> bytes(64)
address literals
2019-04-23 10:40:02 +02:00