[ghc-steering-committee] Proposal #111: Linear Types

Eric Seidel eric at seidel.io
Thu Aug 23 02:29:13 UTC 2018


On Fri, Aug 17, 2018, at 06:06, Simon Peyton Jones wrote:
> Reasonable questions -- maybe put them on the GitHub thread so that 
> Arnaud can respond.
> 
> |  2. Am I correct in understanding that the only way to guarantee resource
> |  safety in this proposal is to write all allocation functions in CPS with a
> |  linear continuation? If so, this seems to be a substantial divergence from
> |  the intuitive notion of type safety.
> 
> It's more modular than that.  In the paper we give the API for mutable 
> arrays.  Yes, the ability to do in-place update on those arrays depends 
> on that API; the type system along does not guarantee it.  It's the type 
> system plus the API.   But its guarantees do not depend on *other* 
> allocators.

Interesting point about modularity. The issue really does seem to come down to the allocation functions. I suggested in my GitHub comment that perhaps we could concoct a warning to identify suspicious allocation functions. I think that would pretty much nullify this concern.


More information about the ghc-steering-committee mailing list