deeqSeq proposal

John Meacham john at
Tue Apr 11 07:09:21 EDT 2006

On Tue, Apr 11, 2006 at 09:53:54AM +0100, Simon Peyton-Jones wrote:
> Whether it should be in a class is a rather separate discussion.  In a
> way we already sold out when we allowed seq to escape from the
> type-class world.  Perhaps deepSeq is worse (because it traverses data
> structures) but not obviously. 

well, there is a difference there in that 'seq' is unimplementable in
haskell, so the design comitee had freedom to implement it however they
wanted. however, now that we have seq, a deepSeq is perfectly
implementable* in haskell using a typeclass, which is a strong argument
for making it have one. 

* dynamic idempotent issues aside. 

in any case, if it were to be in the standard, I'd put it in a typeclass
and give a haskell translation with a note that implemenations are free
to implement optimized versions under the hood as long as the observable
effect is the same but you can't count on anything better than the plain
old recursive seq definition.


John Meacham - ⑆⑆john⑈

More information about the Haskell-prime mailing list