deeqSeq proposal

John Meacham john at repetae.net
Tue Apr 4 18:02:06 EDT 2006


On Tue, Apr 04, 2006 at 02:53:36PM -0700, Andy Gill wrote:
> >Another issue is that being able to detect cyclic structures would  
> >make
> >it impossible to express deepSeq as a Haskell -> Haskell translation.
> >which is no good.
> 
> I am trying to understand this requirement. For the sake of what must
> all primitives be expressible as a Haskell -> Haskell translation?

Mainly it is an excellent proof that no undue burden is being placed on
any implementation, current or future. It also gives a way to reason
about its behavior and is a way to ensure you don't accidentally miss
defining any behavior or break referential transparency or any of the
other properties haskell programmers expect.

not that it has to be implemented via the translation of course. things
like DeepSeq and Typeable will most likely have optimized versions on
various compilers which is why I'd like to see the restriction that the
only way to create instances for these two classes is via the "deriving"
mechanism of the compiler. for the record, jhc can do a super optimized
Typeable, but not a DeepSeq, so will likely have to use the standard
class definition of DeepSeq (which it can already derive, under a
different name).

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Haskell-prime mailing list