A simple HM type inference implementation in haskell, using free
and
recursion-schemes
.
In no particular order...
https://brianmckenna.org/blog/type_annotation_cofree
https://github.com/sdiehl/write-you-a-haskell/blob/master/chapter7/poly_constraints/src/Infer.hs
https://github.com/quchen/articles/blob/master/hindley-milner/src/HindleyMilner.hs
https://web.cecs.pdx.edu/~mpj/thih/thih.pdf
https://www.reddit.com/r/haskell/comments/8ed7mm/annotating_an_ast_with_type_information_using/
https://stackoverflow.com/questions/38462563/how-to-work-with-ast-with-cofree-annotation
https://github.com/purescript-go/purgo/blob/master/src/Language/Go/Ann.hs