Skip to main content
9 votes
Accepted

Extending Hindley-Milner to type mutable references

To get behaviour similar to Ocaml, simply avoid generalizing the type of mutable variables. With ordinary let-bindings, you generalize if you bind a value, and don't generalize otherwise. With ...
Neel Krishnaswami's user avatar
7 votes

Extending Hindley-Milner to type mutable references

As Martin Berger points out in his comment, it is not actually entirely obvious what the semantics of your language is supposed to be and what "automatically inserting !" means. Consider the following ...
Andreas Rossberg's user avatar
2 votes
Accepted

Is function composition associative in non-pure programming languages?

Yes, composition is still associative, but is not function composition anymore. Instead it is morphism composition in a Kleisli category of a monad that captures the computational effects. The nLab ...
Andrej Bauer's user avatar
  • 29.2k

Only top scored, non community-wiki answers of a minimum length are eligible