Advice for implementing GADTs?

David Christiansen david at haskell.foundation
Fri Aug 5 04:22:26 UTC 2022


>
> QUESTION 2: if my quick scan is correct, none of the papers mention the
> GHC technique of determining untouchability by assigning "levels" to type
> variables.  Is there any written paper (outside the GHC sources) that
> discusses type levels?
> It is disgracefully undocumented, I'm afraid.  Sorry.  Didier Remy used
> similar ideas, in some INRIA papers I think.
>

(I'm first answering now because I wasn't sure until this comment that it
was the same concept of levels that I know of)

A couple of resources do exist for learning this idea. There's a quite
accessible description of the basic idea in Peter Sestoft's book
"Programming Language Concepts" from about ten years ago. A collection of
fancier and more efficient versions are laid out by Oleg Kiselyov here:
https://okmij.org/ftp/ML/generalization.html . A good source back to Remy
is this one: https://hal.inria.fr/inria-00077006/document

/David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20220805/6df1bad2/attachment.html>


More information about the ghc-devs mailing list