2022-01-23 12:00:17 +01:00
|
|
|
1) Write a Hindley Milner type checker for that injective datatype recursor language
|
|
|
|
|
|
|
|
https://wikimedia.org/api/rest_v1/media/math/render/svg/431b94815103ac9dc77d0e92739456c3c2c90803
|
|
|
|
https://github.com/sdiehl/write-you-a-haskell/blob/master/chapter7/poly_constraints/src/Infer.hs
|
|
|
|
https://github.com/sdiehl/write-you-a-haskell/blob/master/chapter7/poly/src/Infer.hs
|
|
|
|
|
|
|
|
2) Extend it to allow for referencing declerations "further down" in file, but make sure it
|
|
|
|
terminates by forbidding corecursion (simply done by building a reference graph and then looking at it)
|
|
|
|
|
|
|
|
3) Add Kind env and use it to have "type of types"
|
|
|
|
|
2022-01-24 20:58:00 +01:00
|
|
|
4) Type annotated tree?
|
|
|
|
|
|
|
|
5) Make SECD machine good enough to execute it
|
|
|
|
|
|
|
|
6) Write backend for SECD machine code
|