First of all, refactor the implementation of known & intrinsic bindings (thus this supersedes #138 and fixes #39).
Then, add initial support for sequence literals for List, Vector & Tuple.
Since we don't support implicit arguments yet, the element type sadly has to be manually supplied for the time being.
Quite uglily, for lists & vectors we assume the first “element” is the element type and for tuples we assume that every “element” at even indices is an element type.
Meaning, for lists & vectors instead of e.g. S.[], you need to write S.[E] (where E is the element type of sequence S) and
instead of e.g. S.[x y], you need to write S.[E x y]. For tuples, you need to write e.g. Tuple.[E x F y] instead of Tuple.[x y].
Just for readability, I am going to parenthesize the element type until we implement those literals correctly (e.g. S.[(E) x y]).
First of all, refactor the implementation of known & intrinsic bindings (thus this supersedes #138 and fixes #39).
Then, add initial support for sequence literals for
List
,Vector
&Tuple
. Since we don't support implicit arguments yet, the element type sadly has to be manually supplied for the time being. Quite uglily, for lists & vectors we assume the first “element” is the element type and for tuples we assume that every “element” at even indices is an element type. Meaning, for lists & vectors instead of e.g.S.[]
, you need to writeS.[E]
(whereE
is the element type of sequenceS
) and instead of e.g.S.[x y]
, you need to writeS.[E x y]
. For tuples, you need to write e.g.Tuple.[E x F y]
instead ofTuple.[x y]
. Just for readability, I am going to parenthesize the element type until we implement those literals correctly (e.g.S.[(E) x y]
).