[Haskell] semantice of seq
voigt.16734551 at bloglines.com
voigt.16734551 at bloglines.com
Thu Jul 20 06:31:42 EDT 2006
--- roconnor at theorem.ca wrote:
> Do you have an example of use of seq on
a function type? (Of course I
> don't want to ban it, just change its behaviour.)
I don't have any wisdom to offer on how we would want to ban or change
the behavior of seq on a function type without using type classes. Nor do
I have an example at hand where one absolutely needs to use seq on a function
type.
But in any case, your request seems to be beside the point, as it
comes from the assumption that only seq on function types is dangerous. But
that is not true. Polymorphic use of seq can also have dire consequences when
the type in question is later instantiated with, say, Int (or whatever). See
numerous examples in:
http://wwwtcs.inf.tu-dresden.de/~voigt/seqFinal.pdf
Ciao,
Janis Voigtlaender.
More information about the Haskell
mailing list