Unlifted data types

Simon Peyton Jones simonpj at microsoft.com
Tue Sep 8 07:40:51 UTC 2015


|  The problem 'Force' is trying to solve is the fact that Haskell
|  currently has many existing lifted data types, and they all have
|  ~essentially identical unlifted versions. But for a user to write the
|  lifted and unlifted version, they have to copy paste their code or use
|  'Force'.

But (Force [a]) will only be head-strict.  You still have to make an essentially-identical version if you want a strict list.  Ditto all components of a data structure.

Is the gain (of head-strictness) really worth it?

Incidentally, on the Unlifted-vs-# discussion, I'm not against making the distinction.  I can see advantages in carving out a strict subset of Haskell, which this would help to do.

Simon


More information about the ghc-devs mailing list