Given the translation of strict constructors I can't anything but _|_
as the answer.
On Mar 16, 2007, at 15:50 , Ian Lynagh wrote:
Hi all,
A while ago there was a discussion on haskell-cafe about the semantics
of strict bits in datatypes that never reached a conclusion; I've
checked with Ma
Ross Paterson wrote:
> On Fri, Mar 16, 2007 at 05:40:17PM +0100, apfelmus wrote:
>> 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
Jón Fairbairn wrote:
> [EMAIL PROTECTED] writes:
>
>> Besides, having
>>
>> let q = FinCons 3 q in q
>>
>> not being _|_ crucially depends on memoization.
>
> Does it?
Sorry for having introduced an extra paragraph, I meant that q =/= _|_
under the new WHNF-rule would depend on memoization. A
On Fri, Mar 16, 2007 at 05:00:15PM +, Jón Fairbairn wrote:
> Does it? Mentally I translate that as
>
>let q = Y (\q -> FinCons 3 q) in q
>
but it would actually translate to
>let q = Y (\q -> q `seq` FinCons 3 q) in q
for strict fields, whenever a constructor appears, it is transl
Hello,
I also think that the first version is the correct one (i.e., the
result is _|_).
-Iavor
On 3/16/07, Ross Paterson <[EMAIL PROTECTED]> wrote:
On Fri, Mar 16, 2007 at 05:40:17PM +0100, [EMAIL PROTECTED] wrote:
> The translation
>
> > q = FinCons 3 q
> > === (by Haskell 98 report 4.2.1/
On Fri, Mar 16, 2007 at 05:40:17PM +0100, [EMAIL PROTECTED] 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 "t
[EMAIL PROTECTED] writes:
> Besides, having
>
> let q = FinCons 3 q in q
>
> not being _|_ crucially depends on memoization.
Does it? Mentally I translate that as
let q = Y (\q -> FinCons 3 q) in q
=>
Y (\q-> FinCons 3 q)
=>
(\q -> FinCons 3 q) (Y (\q-> FinCons 3 q))
=>
FinCon
Ian Lynagh wrote:
> Here I will just quote what Malcolm said in his original message:
>
> The definition of seq is
> seq _|_ b = _|_
> seq a b = b, if a/= _|_
>
> In the circular expression
> let q = FinCons 3 q in q
> it is clear that the second component of
Hi all,
A while ago there was a discussion on haskell-cafe about the semantics
of strict bits in datatypes that never reached a conclusion; I've
checked with Malcolm and there is still disagreement about the right
answer. The original thread is around here:
http://www.haskell.org/pipermail/haskel