[x] exports
{..} for multiple imports.
{...}* wildcard (and Class(*))[x] import stuff
(, )[x] import synonyms
[ ] pointer deconstructions are a footgun
NextElem(next-elem)
# if the line below is commented out, we overwrite memory. (the full example does `case p&.next-it-type`, and the next modification overwrites it.)
# next-elem = next-elem
p <&.next-it-type= NextSep
return Just(next-elem)
case &ed&.mode
Ptr(Cmd(sb))
StrBuilder.write-char(&sb, 'a')
Cmd(*sb) or Cmd(&sb), which has a type Ptr .... also make deconstruction respect lvalues.we can also emit an error if we’re taking a reference to a non-lvalue.
[x] string matching in deconstruction. (currently only StrView)
strview-eq()?)[x] polymorphic number matching (use a combination of FromIntegral + Eq)
[ ] multi-backend tests, nicer (im thinking of something like the B language tests.)
[ ] recursion (including nested recursion, which would make mutual recursion possible)
[ ] recursive datatypes (incl Ptr which breaks depth checking).
[ ] unions + typeclass-bound anonymous unions?
[x] deconstruction on assignment
let keyword.[ ] hidden tvars
[ ] colored errors + prettier :3 + should I keep errors in stderr or should they be stdout?
[ ] trailing commas in the syntax
[ ] better occurs check (iirc we init an FTV struct which is pretty slow, make a dedicated function for this)
[ ] crappy code - separate tvars into tvars and tnums
[ ] reevaluate type defaulting (currently, the first encountered class default gets defaulted, which makes the process effectively stochastic. problem if a single type has two classes with type defaulting rules; or just throw out FromString and make StrView the one and only class.)
[ ] review the architecture of the type checker. (connected with “numbers in type parameters”)
[ ] apostrophe in string interpolation breaks it (actually tokenize string interpolation? allow actual expressions? or just track parens?)
[ ] module search should start at program path, not cwd.
[ ] grapheme cluster parsing with surrogates (currently we only do single codepoints)
[ ] colored errors (RED stuff) plus basic syntax highlighting in errors?
[ ] I want this to work: (19.06.26: should it work tho? it’s really stupid. it’s cool with already written code tho)
```
fn sort'(slice Slice a, funcmp (a, a) -> Ordering)
inst Ord a
cmp (l, r): funcmp(l, r)
Slice.sort(slice)
```
[ ] external structs.
[ ] this snippet confused me, although the error is obvious in hindsight:
MenuItem
action () -> ()
item = MenuItem { action: fn x: Unit }
[ ] prevent overwriting of base file, eg. i compile the file script and the compiler should make a special name to not overwrite it. (append .exe? .out?)
Eq StrView left over, one with the wrong types. Somehow detect it and maybe signal that the instance is wrong OR tell the user that a different instance than always is surprisingly used.if statement for example^ identifier would become invalid.