
I would say, by the way, that your question still makes some sense.
When discussing strict evaluation, one can think of _values_ of a type
and _expressions_ of a type. The (denotational) semantics of values
would be unlifted, while expressions are lifted. And functions take
values to expressions. So:
f :: Int# -> Int#
f x = f x
is a valid definition, even though the result of the function is
bottom, but has type Int#. And you are allowed:
let i :: Int#
i = error "whoa"
in ...
just not the same definition at the top level, since it'd be annoying
for GHC to have to worry about evaluating all possible strict errors
in every reachable module eagerly on program start up (I assume that's
the/a reason).
That may not be the only way to think about it, but it's how I tend to.
-- Dan
On Tue, Sep 8, 2015 at 11:26 AM, Jan Stolarek
Top-level variables may not have an unlifted type Ah, that makes much more sense now. Thanks.
Janek _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs