[Haskell-cafe] Strictness is observable

2011-04-01 Thread oleg
Daniel Fischer wrote: If you have a strict function, you may evaluate its argument eagerly without changing the result^1, while eager evaluation of a non-strict function's argument may produce _|_ where deferred evaluation wouldn't. Sadly, that is quite untrue. Strictness is observable,

Re: [Haskell-cafe] Strictness is observable

2011-04-01 Thread John Meacham
Error is not catchable in haskell 98. Only things thrown by raiseIO are. On Apr 1, 2011 12:02 AM, o...@okmij.org wrote: ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Strictness is observable

2011-04-01 Thread Daniel Fischer
On Friday 01 April 2011 09:00:56, o...@okmij.org wrote: Daniel Fischer wrote: If you have a strict function, you may evaluate its argument eagerly without changing the result^1, while eager evaluation of a non-strict function's argument may produce _|_ where deferred evaluation wouldn't.

Re: [Haskell-cafe] Strictness is observable

2011-04-01 Thread Yves Parès
Then if you turn : fs True = True fs x = True to: fs x = case x of True - True x' - True Is it still strict, or does 'fs' wrap the case test and defer evaluation? 2011/4/1 o...@okmij.org Daniel Fischer wrote: If you have a strict function, you may evaluate its argument eagerly

Re: [Haskell-cafe] Strictness is observable

2011-04-01 Thread Daniel Fischer
On Friday 01 April 2011 10:49:53, Yves Parès wrote: Then if you turn : fs True = True fs x = True to: fs x = case x of True - True x' - True Is it still strict, or does 'fs' wrap the case test and defer evaluation? It's still strict, to produce a result, fs has to

Re: [Haskell-cafe] Strictness is observable

2011-04-01 Thread oleg
John Meacham wrote: Error is not catchable in haskell 98. Only things thrown by raiseIO are. I see; so GHC, absent any LANGUAGE pragma, should have arranged for `error' to generate a non-catchable exception. Still, Haskell98 specifically allows for the behavior that lets us distinguish strict

Re: [Haskell-cafe] Strictness is observable

2011-04-01 Thread John Meacham
On Fri, Apr 1, 2011 at 2:23 AM, o...@okmij.org wrote: John Meacham wrote: Error is not catchable in haskell 98. Only things thrown by raiseIO are. I see; so GHC, absent any LANGUAGE pragma, should have arranged for `error' to generate a non-catchable exception. Actually, it was because you