2009/4/26 Ian Lynagh <[email protected]>:
>> By your rules, we should not be allowed to, because "f x" may
>> potentially return an unlifted computation that is eagerly evaluated
>> and hence may diverge. IMHO this is far too restrictive.
>
> I think this is only a problem if you have kind polymorphism. If f is
> merely strict then it is fine. It's only if the return type is unlifted
> that you have a problem.

Right - sorry if I wasn't clear, but I'm worried about kind (or
"strictness") polymorphism. In particular, b in the type of "map"
could be instantiated to either a lifted or unlifted type - so should
you be allowed to let-bind @f x@ without a "!"? IMHO yes, because you
still want it to be lazy if b is lifted. But now you are sometimes
allowed to let-bind a value which will be unlifted at *runtime*
>without< a "!". This doesn't seem right.

Anyway, who knows if this extension will ever come to pass - and I
suppose that it's not actually too hard to reverse the syntax change
if it ever happens, by making "!"s optional.

Cheers,
Max

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to