3.4 KiB
3.4 KiB
TODO
NOW - two things
-
I broke Tree.newt by removing some over-aggressive reduction. I need to make it happen during unification. Not sure if I have all of the bits to vappspine there.
-
Need to collect constraints and re-run, I think that may get me to typeclasses
- Remember operators from imports
- Default cases for non-primitives (currently gets expanded to all constructors)
- Case for primitives
- aoc2023 translation
- day1
- day2
- some "real world" examples
- Maybe Eq and stuff would work for typeclass without dealing with unification issues yet
- unsolved meta errors repeat (need to freeze or only report at end)
- Sanitize JS idents, e.g.
_+_ - Generate some programs that do stuff
- import
- consider making meta application implicit in term, so its more readable when printed
- Currently we have explicit
AppsurroundingMetawhen inserting metas. Some people leave that implicit for efficiency. I think it would also make printing more readable. - When printing
Value, I now print the spine size instead of spine.
- Currently we have explicit
- eval for case (see order.newt)
- dynamic pattern unification (add test case first)
- switch from commit/mustWork to checking progress
- type constructors are no longer generated? And seem to have 0 arity.
- raw let is not yet implemented (although define used by case tree building)
- there is some zero argument application in generated code
- get equality.newt to work
- broken again because I added J, probably need to constrain scrutinee to value
- inline metas. Maybe zonk after TC/elab
- implicit patterns
- operators
- pair syntax (via comma operator)
- matching on operators
- top level
- case statements
- Lean / Agda ⟨ ⟩
- Lean-like .map, etc? (resolve name in namespace of target type, etc)
SKIP list syntax- Agda doesn't have it, clashes with pair syntax
- autos / typeclass resolution
- very primitive version in place, not higher order, search at end
- We need special handling in unification to make this possible for typeclasses on
U -> U, we could still doEqorShowwith the current unification - options
- keep as implicit and do auto if the type constructor is flagged auto
- keep as implicit and mark auto, behavior overlaps a lot with implicit
- have separate type of implict with
{{}} TypeClass.newtis the exercise for this
- do blocks (needs typeclass, overloaded functions, or constrain to IO)
- some solution for
+problem (classes? ambiguity?) - show compiler failure in the editor (exit code != 0)
- write output to file
- uses
-ooption
- uses
- detect extra clauses in case statements
- add test framework
- decide what to do for erasure
- type at point in vscode
- repl
- LSP
- don't match forced constructors at runtime
- I think we got this by not switching for single cases
- magic nat (codegen as number with appropriate pattern matching)
- magic tuple? (codegen as array)
- magic newtype? (drop in codegen)
- records / copatterns
- vscode: syntax highlighting for String
- add
popor variant ofpfuncthat maps to an operator, giving the js operator and precedence on RHS
Parsing
- consider allowing σ etc in identifiers
- Probably need to merge oper / ident first and sort out mixfix in parsing.
Background
- Read Ulf Norell thesis