Unlifted data types

Edward Z. Yang ezyang at mit.edu
Mon Sep 7 22:08:48 UTC 2015


Excerpts from Simon Peyton Jones's message of 2015-09-07 14:55:09 -0700:
> I'm still doubtful.  What is the problem you are trying to solve here?  How does Force help us?

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'.

> Note that a singleton unboxed tuple (# e #) has the effect of suspending; e.g.
>   f x = (# x+1 #)
> return immediately, returning a pointer to a thunk for (x+1).  I'm not sure if that is relevant.

I don't think so?  Unboxed tuples take a computation with kind * and
represent it in kind #.  But 'suspend' takes a computation in kind #
and represents in kind *.

Edward


More information about the ghc-devs mailing list