mgrabmueller / AlgorithmW

Example implementation of Algorithm W for Hindley-Milner type inference
BSD 3-Clause "New" or "Revised" License
77 stars 11 forks source link

Simplify TI Monad #7

Closed choeger closed 6 years ago

choeger commented 6 years ago

I think the state only actually uses the supply and I do not see any reason why it should be an environment reader (although one could probably refactor the actual type inference function accordingly). Since this code might be the best step-by-step implementation of algorithm W, let us not complicate matters with unnecessary haskellisms.

Signed-off-by: Christoph Höger christoph.hoeger@celeraone.com

mgrabmueller commented 6 years ago

Thanks for the PR and the kind words. I don't recall why I made it that complicated in the first place...

BTW, hope you are doing well, Christoph :)

choeger commented 6 years ago

Indeed I do. I am even getting paid to implement said algorithm in a functional language :D.