Gábor Lehel <[email protected]> writes:
> Is there any sensible meaning for bangs on return types? I've been
> trying to think this through but not necessarily succeeding.
Not knowing Clean in any detail, I've always just thought that a type
signature of, say:
something :: !Foo -> Bar
would mean the same as, in Haskell:
something :: Foo -> Bar
something foo = foo `seq` ...
In this case, there's no point to a strict return type, since it would
boil down to "x `seq` x", which is just "x".
But it seems that a lot of these discussions are about considering Foo
and !Foo distinct types, which would mean that you can no longer, say,
add a strict and a lazy integer - at least not with the current Num
instance. I find this line of thought very confusing.
> This does seem a bit excessive. As a start, I don't remember anyone
> asking for control over (un)boxedness, so hopefully we could jettison
> that part of it?
Uh, you mean like in IOUArrays, the UNPACK pragma, or
-funbox-strict-fields? Unboxing is an important optimization, but
perhaps the current feature set suffices.
-k
--
If I haven't seen further, it is by standing in the footprints of giants
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe