strict bits of datatypes

Iavor Diatchki iavor.diatchki at gmail.com
Fri Mar 16 14:16:39 EDT 2007


Hello,
I also think that the first version is the correct one (i.e., the
result is _|_).
-Iavor

On 3/16/07, Ross Paterson <ross at soi.city.ac.uk> wrote:
> On Fri, Mar 16, 2007 at 05:40:17PM +0100, apfelmus at quantentunnel.de wrote:
> > The translation
> >
> > >     q = FinCons 3 q
> > > === (by Haskell 98 report 4.2.1/Strictness Flags/Translation
> > >     q = (FinCons $ 3) $! q
> >
> > is rather subtle: the first FinCons is a strict constructor whereas the
> > second is "the real constructor". In other words, the translation loops
> > as we could (should?) apply
> >
> >     FinCons
> >  => \x y -> FinCons x $! y
> >  => \x y -> (\x' y' -> FinCons x' $! y') x $! y
> >  => ...
> >
> > ad infinitum.
>
> Yes, perhaps that ought to be fixed.  But even so, this clearly implies that
>
>         FinCons 3 _|_ = _|_
>
> and thus that q is _|_ and nhc98/yhc have a bug.
>
> _______________________________________________
> Haskell-prime mailing list
> Haskell-prime at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-prime
>


More information about the Haskell-prime mailing list