98 Commits

Author SHA1 Message Date
radrow
bbb049cb2e Merge branch 'lima' into lima-master-merge 2020-10-13 10:33:30 +02:00
radrow
ac673602b9 Merge branch 'lima' into master 2020-10-13 10:22:05 +02:00
radrow
1a5017ce2b Debug mode turns off hermetization
Added tests and fixed bugs
2020-10-09 18:41:30 +02:00
Hans Svensson
db4de5d926 Fix singleton record calldata decode + test 2020-08-10 16:37:09 +02:00
radrow
54e43764ca Ban empty contracts, ban function blocks with mismatched declarations 2020-05-15 19:09:08 +02:00
radrow
ad78f440d9 Merge lima 2020-04-02 15:32:26 +02:00
Radosław Rowicki
4f554acee6
Fix error messages for some illegal constructions, fix absolute path includes (#251)
* 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
2020-03-30 14:52:16 +02:00
Ulf Norell
e64ac9396a Test cases for protected calls 2020-03-02 12:08:41 +01:00
Hans Svensson
e98edd4eef Handle UTF-8 in character literals
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)
2020-02-24 15:35:54 +01:00
Radosław Rowicki
bd7ed2ef8c
Instant unification error on arguments count mismatch (#225)
* Instant unification error on arguments count mismatch

* add testcase

* Add newline
2020-02-21 10:28:55 +01:00
Hans Svensson
b9acf24dca Make String.aes a stdlib + add more string functions
This means moving the FATE operations to StringInternal and adding to/from_list (and Char.to/from_int
+ Char.to_upper/lower).
2020-02-21 09:45:11 +01:00
Hans Svensson
bbc8555331 Auth.tx implementation and types
The arities field of the Chain.base_tx constructor is 22 integers long... This isn't very pretty but
that is the design we've chosen.
2020-02-11 10:00:46 +01:00
Hans Svensson
c3426f0e65 Add AENS.lookup
Also move Pointee-constructors inside AENS namespace.
2020-02-03 12:52:00 +01:00
Hans Svensson
db01e237c1 Add Oracle.expiry 2020-02-03 12:24:27 +01:00
Hans Svensson
d821de6381 Merge 'origin/lima' into 'origin/master' 2020-01-15 15:03:11 +01:00
Ulf Norell
4d4a14a9ab
GH-196 pattern matching lhs (#210)
* 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
2020-01-15 09:41:03 +01:00
Hans Svensson
cf1072140e Merge 'origin/lima' into merge_lima_to_master 2019-12-19 15:09:48 +01:00
Ulf Norell
f7abaf07fa Add list comprehension match to test case 2019-12-16 17:04:49 +01:00
Ulf Norell
b51a79b5e1 Allow patterns in lets and list comprehension binds 2019-12-16 17:04:49 +01:00
Ulf Norell
d844c4d276 Fix missing type annotation in list comprehension body 2019-12-12 09:39:13 +01:00
Ulf Norell
d4f291f252 Handle qualified constructors in patterns 2019-12-12 09:34:26 +01:00
Ulf Norell
bf5e2e2443 Fix parse errors causing crashes instead of nice errors 2019-12-09 08:45:55 +01:00
Hans Svensson
1c24a700dc Add BLS12-381 operations (to FATE) 2019-11-27 10:57:24 +01:00
Ulf Norell
eec70f03a5
Merge pull request #183 from aeternity/lima
Merge lima into master
2019-11-25 13:16:17 +01:00
skkw
5c5d3c60ef changed type of client ttl to int option 2019-11-18 16:25:47 +01:00
Ulf Norell
878140e03c Add function to validate byte code against source code 2019-11-15 14:22:44 +01:00
skkw
126e04ae42 support for AENS.update call 2019-11-12 14:27:46 +01:00
Ulf Norell
18ae801333
Merge pull request #162 from aeternity/address-to-contract
Add Address.to_contract
2019-10-01 14:28:32 +02:00
Ulf Norell
5e6ff6c9a7 Nice type error if contract function is called as from a namespace 2019-10-01 14:13:56 +02:00
Ulf Norell
2d6d506d63 Fail on function definitions in contracts other than the main contract 2019-10-01 14:13:54 +02:00
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
Hans Svensson
f34b6ed982 Fix numeric escapes 2019-09-12 21:17:01 +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
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
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
sennui
83d06977f9 add extra argument to claim for bidding 2019-09-01 10:58:49 +02:00
Ulf Norell
062309e578 Type variables mentioned in local functions should not be flexible
(cc #112)
2019-08-30 14:22:31 +02:00
Ulf Norell
6fd39d4cb1 Add checks for polymorphic/higher order oracles and higher order entrypoints (AEVM) 2019-08-30 11:18:20 +02:00
Ulf Norell
850221aaf3 Remove no_implicit_stdlib option 2019-08-27 14:10:40 +02:00