<div dir="ltr">For context, there’s currently a big thread about the type of ($), which is going to be more complicated in GHC 8.0 due to levity/runtime rep polymorphism. As I understand it, the intention is that this more complex type will be hidden unless a levity polymorphism flag is active. From my perspective, makes the question of whether this type is too complicated for beginners moot.<div><br></div><div>What puzzles me is that I still don’t understand what this feature is *for*. According to [1], levity polymorphism is a more principled replacement for OpenKind, which was a bit of hack. Fine.</div><div><br></div><div>[1] <a href="https://ghc.haskell.org/trac/ghc/wiki/NoSubKinds">https://ghc.haskell.org/trac/ghc/wiki/NoSubKinds</a></div><div><div><br></div><div>OpenKind exists because developers wanted to use ($), undefined, and error with unboxed types. That’s understandable, but it doesn’t seem worth all this effort. Surely, having to use error# instead of error when working with unboxed or unlifed types is a small thing next to all the other differences.<br></div><div><br></div><div>OpenKind is also used when doing type inference, because arguments to functions might be * or #. That’s more compelling, but doesn’t seem like something that needs to be exposed to the programmer.</div><div><br></div><div>So, is that it? Are there less-trivial levity-polymorphic functions? Is this a step on a road to new features, like [2]? Is there an article or something that makes the case for this?</div><div><br></div><div>[2] <a href="https://ghc.haskell.org/trac/ghc/wiki/UnliftedDataTypes">https://ghc.haskell.org/trac/ghc/wiki/UnliftedDataTypes</a></div><div><br></div><div><br></div>-- <br><div class="gmail_signature">Dave Menendez <<a href="mailto:dave@zednenem.com" target="_blank">dave@zednenem.com</a>><br><<a href="http://www.eyrie.org/~zednenem/" target="_blank">http://www.eyrie.org/~zednenem/</a>></div>
</div></div>