[Haskell-cafe] Why do we want levity polymorphism?

Roman Cheplyaka roma at ro-che.info
Thu Feb 11 15:02:22 UTC 2016


On 02/10/2016 11:23 PM, David Menendez wrote:
> 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.
> 
> What puzzles me is that I still don’t understand what this feature is
> *for*.

> [...]

> 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?
> 
> [2] https://ghc.haskell.org/trac/ghc/wiki/UnliftedDataTypes

Exactly. At least from my perspective, the value comes from unlifted
data types. Given how much doubt levity polymorphism has received
recently, I might write an article about it, but for now I recommend
watching Richard's ICFP talk https://www.youtube.com/watch?v=bDdkeKr9vVw

(Also, for those who understand Russian, we discussed levity
polymorphism in the episode 10 of the Bananas and Lenses podcast
http://bananasandlenses.net/episode010.)

Roman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160211/a04a5fe4/attachment.sig>


More information about the Haskell-Cafe mailing list