3 ms·
I used to entertain myself embedding various languages into Haskell, mostly hardware description related. Usually, one goes with a static parameterization of a
by thesz 3y ago
I used to entertain myself embedding various languages into Haskell, mostly hardware description related.
Usually, one goes with a static parameterization of a monad. But [1] shows that it is possible to have a dynamic parameterization, where underlying types of a state can change.
[1] http://blog.sigfpe.com/2009/02/beyond-monads.html http://blog.sigfpe.com/2009/02/beyond-monads.html
This means that we can control state types and, borrowing from ST monad, we can control introduction of resources and their use. If certain free type variable is in state, we can use associated resource. Deletion of resource is a deletion of free variable from a state parameterization.
All this is from 2009 or so.
The borrow checker of Rust is a library in Haskell, if you patient enough.
The purity of Haskell made many these libraries possible, exactly because we can control different side effects.