phasm/TODO.md
Johan B.W. de Vries 6a1f4fc010 Replaces type3 with type5
type5 is much more first principles based, so we get a lot
of weird quirks removed:

- FromLiteral no longer needs to understand AST
- Type unifications works more like Haskell
- Function types are just ordinary types, saving a lot of
  manual busywork

and more.
2025-08-21 19:26:42 +02:00

31 lines
1.5 KiB
Markdown

# TODO
- Decide between lineair types / uniqueness vs garbage collector
- https://borretti.me/article/how-australs-linear-type-checker-works
- Rename constant to literal
- Implement a trace() builtin for debugging
- Check if we can use DataView in the Javascript examples, e.g. with setUint32
- Implement a FizzBuzz example
- Also, check the codes for FIXME and TODO
- Allocation is done using pointers for members, is this desired?
- See if we want to replace Fractional with Real, and add Rational, Irrationl, Algebraic, Transendental
- Implement q32? q64? Two i32/i64 divided?
- Have a set of rules or guidelines for the constraint comments, they're messy.
- calculate_alloc_size can be reworked; is_member isn't useful with TYPE_INFO_MAP
- Parser is putting stuff in ModuleDataBlock
- Surely the compiler should build data blocks
- Also put the struct.pack constants in TYPE_INFO_MAP
- Implemented Bounded: https://hackage.haskell.org/package/base-4.21.0.0/docs/Prelude.html#t:Bounded
- Try to implement the min and max functions using select
- Read https://bytecodealliance.org/articles/multi-value-all-the-wasm
- Implement type class 'inheritance'
- Remove FunctionInstance, replace with a substitutions dict
- See phft2 in fromast.py:expression_function_call
- Move unify into the typeconstraints (or other way around) - it's done on two levels now (partly in solver)
- Rework type classes - already started on a separate dir for those, but quite a few things are still in other places.