Commit Graph

3406 Commits

Author SHA1 Message Date
Christian Rinderknecht
c3b304db4a
I relaxed the extension to the grammar that enabled non-annotated
empty lists and None values as initial values in declarations.

Now, these values are accepted irrespective of the declared type. It
is up to the typechecker to validate them.
2019-03-19 11:54:23 +01:00
Christian Rinderknecht
d994592a1b
Changed "match ... with ..." to "case ... of ..." 2019-03-19 11:46:30 +01:00
Christian Rinderknecht
6c5ae52db6
I relaxed the grammar to support in the parser for initial values of
variables to not require type annotation, like

var x : list (operation) := []
2019-03-19 10:52:47 +01:00
Christian Rinderknecht
46d6df2146
Changed "do nothing" to "skip". 2019-03-18 18:09:15 +01:00
Christian Rinderknecht
623683839f
Removed keyword "null", replaced by two keywords "do"
and "nothing".

Until now only products of type names were allowed: I extended
them to allow type expressions.

Removed the destructive update of a map binding "a[b] := c".

Record projection has been extended to allow for qualified
names: "a.b.c" and "a.b.c[d]".

Changed the LIGO extension from ".li" to ".ligo".

Fixed the name of the language to be "LIGO" (instead of "Ligo").
2019-03-18 17:47:11 +01:00
Christian Rinderknecht
bbb5966132
Merge branch 'master' into AST_with_records 2019-03-15 08:45:00 +01:00
Georges Dupéron
acf1706d3d more typechecker structure 2019-03-14 22:42:40 +01:00
Georges Dupéron
63be1b9b7d More of the type annotator structure 2019-03-14 22:11:27 +01:00
Georges Dupéron
bac4ce1024 More type annotator skeleton 2019-03-14 21:14:05 +01:00
Georges Dupéron
0943408463 SMap.t for records and sums 2019-03-14 20:42:41 +01:00
Georges Dupéron
8830f598df skeleton for a_types 2019-03-14 20:09:06 +01:00
Georges Dupéron
fb97b056ca Started structure for the type annotator 2019-03-14 20:00:01 +01:00
Georges Dupéron
7a84cf1c8b Removed If (missing in previous commit) 2019-03-14 19:32:36 +01:00
Georges Dupéron
8fc1729f47 If simplified to match 2019-03-14 19:30:55 +01:00
Georges Dupéron
adec2bb5e0 Cleanup 2019-03-14 19:23:37 +01:00
Galfour
fa4b570950 translations from typed-ligo to mini-c 2019-03-14 18:22:51 +00:00
Georges Dupéron
689673ccfa Single variable for ForCollect, set k=>v aside for now. 2019-03-14 19:14:10 +01:00
Georges Dupéron
90e894f9f4 Add missing regions 2019-03-14 19:02:41 +01:00
Georges Dupéron
76d4e1bb87 Distinguish function application from constructor application 2019-03-14 18:54:36 +01:00
Georges Dupéron
3bf5ad2819 Reformatted constant in AST2 to match that of Typecheck2 2019-03-14 18:45:38 +01:00
Georges Dupéron
ea0198388e Humour (bis) 2019-03-14 18:45:22 +01:00
Georges Dupéron
8200bff783 Temporary `TODO in place of regions 2019-03-14 18:42:21 +01:00
Georges Dupéron
51ee2cd63f Added stub (failwith) for type annotator 2019-03-14 18:31:59 +01:00
Georges Dupéron
9b6d93b343 Replace tuples with records 2019-03-14 18:26:36 +01:00
Georges Dupéron
5628e370b5 Indentation to match Typecheck2.mli 2019-03-14 18:26:25 +01:00
Georges Dupéron
cbb08f4405 Humour. 2019-03-14 18:19:51 +01:00
Christian Rinderknecht
ea02e4cffe
Added keyword "storage" as parameter kind (with "var" and "const") for
entrypoints.
2019-03-14 18:17:19 +01:00
Georges Dupéron
9db37fbdc4 operations_decl is now disallowed 2019-03-14 18:05:57 +01:00
Georges Dupéron
03671802eb DropUnit is now ProcedureCall 2019-03-14 18:05:24 +01:00
Georges Dupéron
fbf6e5d89f Cleanup 2019-03-14 18:05:07 +01:00
Georges Dupéron
e1ad18cd3e Merged tuples and records so that x.4 is valid in principle 2019-03-14 17:58:14 +01:00
Georges Dupéron
9c5d31eca1 Merged tuples and records so that x.4 is valid in principle 2019-03-14 16:46:18 +01:00
Georges Dupéron
332f18bb80 Single argument for lambdas 2019-03-14 16:15:42 +01:00
Christian Rinderknecht
36e43a807e
Added library option -I. 2019-03-14 14:27:00 +01:00
Christian Rinderknecht
5f129d924a
Removed storage and operations declarations: entry-points now take the
former and return the latter.
2019-03-14 14:04:20 +01:00
Christian Rinderknecht
8e294a013c
Added assignment of a value to a map binding: m.[i] := v. 2019-03-14 13:19:52 +01:00
Georges Dupéron
8a11fc71eb Removed non-applied type_constructor, single parameter for lambda expression. 2019-03-14 12:30:51 +01:00
Georges Dupéron
1db0f7c1fe Wrong nesting of key and expr in records 2019-03-14 11:59:14 +01:00
Georges Dupéron
97db2a431c type_expr vs. type_expr_case (put the regions and names in more places) in Typecheck2.mli 2019-03-14 11:50:18 +01:00
Georges Dupéron
87386c2500 type_constructor in AST2.ml 2019-03-14 11:49:42 +01:00
Georges Dupéron
2c0b6b518c Simplified Prod → Record in types, added region to field names. 2019-03-14 11:19:15 +01:00
Georges Dupéron
96fb7c7ea2 Updated the typed AST interface after discussion with gabriel.alfour 2019-03-14 10:58:15 +01:00
Xavier Clerc
2c1ecd97ed v0.13-preview.120.27+112 2019-03-14 09:55:45 +00:00
Christian Rinderknecht
41f664f197 Removed AST2 and Typecheck2 before the merge back to master. 2019-03-14 10:07:11 +01:00
Christian Rinderknecht
c0e6843240
I added record creation (injection), field selection (projection)
and functional update (copy).

The only creative piece of concrete syntax is that of the
expression for functional updates:

copy foo with record field = value end

where "copy", "with", "record" and "end" are keywords.
2019-03-14 09:59:26 +01:00
Georges Dupéron
df4f49111b Added regions to type_expr. The regions picked are fairly imprecise. 2019-03-14 09:37:10 +01:00
Georges Dupéron
6f1142d8f8 WIP on adding orig 2019-03-13 23:42:34 +01:00
Georges Dupéron
cf80ccd9a2 Small tweak on the typed AST 2019-03-13 23:42:16 +01:00
Galfour
7cc6a681b1 add ligo-parser 2019-03-13 21:04:02 +00:00
Georges Dupéron
650206ec14 AST2: tiny clean up 2019-03-13 21:52:59 +01:00