Remove the following attributes: @Int, @Int32, @Int64, @List, @Nat, @Nat32, @Nat64, @Rune, @Text and @Vector.
And start parsing Path "." #Number-Literal, Path "." #Text-Literal and Path "." Sequence-Literal.
To make this work, extend the relevant AST nodes with the field path: Option<Path>.
Move number literal validation into the name resolver.
Examples
@Int64 34 becomes Int64.34 if Int64 is in scope or extern.core.int64.Int64.34 if not.
@Text "Λ" becomes extern.core.text.Text."Λ" or Text."Λ".
@Vector [2 4 10] becomes extern.core.vector.Vector.[2 4 10] or Vector.[2 4 10].
@Int32 -10 becomes Int32.-10 (…).
Addendum
Add sequence literal support for List, Vector and Tuple (should we remove Duple and Triple?) (blocker: type inference/implicit parameters!):
This means:
the (Tuple List.[Nat Text Bool]) Tuple.[0 "B" true] or
the (Tuple [Nat Text Bool]) [0 "B" true] with overloaded literals.
( [0 "B" true] : Tuple [Nat Text Bool] )
Remove the following attributes:
@Int
,@Int32
,@Int64
,@List
,@Nat
,@Nat32
,@Nat64
,@Rune
,@Text
and@Vector
. And start parsingPath "." #Number-Literal
,Path "." #Text-Literal
andPath "." Sequence-Literal
. To make this work, extend the relevant AST nodes with the fieldpath: Option<Path>
. Move number literal validation into the name resolver.Examples
@Int64 34
becomesInt64.34
ifInt64
is in scope orextern.core.int64.Int64.34
if not.@Text "Λ"
becomesextern.core.text.Text."Λ"
orText."Λ"
.@Vector [2 4 10]
becomesextern.core.vector.Vector.[2 4 10]
orVector.[2 4 10]
.@Int32 -10
becomesInt32.-10
(…).Addendum
Add sequence literal support for
List
,Vector
andTuple
(should we removeDuple
andTriple
?) (blocker: type inference/implicit parameters!):List.[1 2 3]
->List.cons 1 (List.cons 2 (List.cons 3 List.empty))
Vector.[1 2 3]
->Vector.cons 1 (Vector.cons 2 (Vector.cons 3 Vector.empty))
Tuple.[1 "C" false]
->Tuple.cons 1 (Tuple.cons "C" (Tuple.cons false Tuple.empty))