|
|
|
|
|
by T-R
2083 days ago
|
|
My understanding is that the current implementation is only groundwork for possible future performance benefits, since there are no changes to the runtime system or garbage collector, and that their current intended use is mostly for allowing library authors to encode safe session/resource handling in the type system. So, new libraries can make it a type error to fail to properly close a connection or release a shared resource. Simon Peyton Jones talk:
https://www.youtube.com/watch?v=t0mhvd3-60Y |
|
As someone who has been exploring doing gamedev in Haskell, that all is very exciting and the use-cases are constantly obvious to me.
It is entirely up to userspace to leverage this new feature. It doesn't do anything on its own outside of the type-checker. And to use it, your library will probably have to do some unsafe coercion under the hood (just like ST uses unsafePerformIO under the hood to do pure mutability.)