2009/4/25 Ian Lynagh <ig...@earth.li>:
> Ooops, sorrry about that.
>
>> Thanks Max, I now understand the reasoning behind this change a bit
>> better. However, I'm still not convinced that it is a good idea,
>
> All in my opinion:
>
> * The fact that you are even allowed to let/where-bind values with
>  unlifted type is surprising. Making it clearer that something odd is
>  going on is a good thing. If it were up to me I think I would disallow
>  them completely.

Where this really breaks down is in a not-entirely-hypothetical
language extension where you are able to write functions that are
polymorphic in the strictness of certain type variables, and unlift
arbitrary lifted types by prefixing them with a bang. Then, should you
be allowed to write the following?

map f (x:xs) = y : map f xs
  where y = f x

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.

Cheers,
Max

_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to