On Sun, Aug 1, 2010 at 11:29 AM, Nicolas Pouillard <nicolas.pouill...@gmail.com> wrote: > Finally maybe we can simply forbidden the forcing of function (as we do with > Eq). The few cases where it does matter will rescue to unsafeSeqFunction.
What's the problem with class Eval a where seq :: a -> t -> t instance Eval b => Eval (a -> b) where seq f = seq (f undefined) It would reduce at least to WHNF as unsafeSeq would. Does it compute more than WHNF? Hmmm, I see, if we had f :: Int -> Int f _ = undefined Then my seq above would diverge while unsafeSeq wouldn't. Perhaps that instance would be a good compromise if we insist in not using 'unsafeSeq' to define it. Cheers, =) -- Felipe. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe