A: Evaluation order, ghc versus hugs, lazy vs. strict

Jan Kybic kybic@ieee.org
23 Aug 2002 10:44:44 +0200


> >      -- strictness annotation, to be used as
> >      --   f a x | strict a, deepStrict x = annotation
> >      --   f a x = the_true_function_body
> > 
> >      annotation = undefined
> >      strict a = seq a False
> >      deepStrict a = deepSeq a False
> 
> The 'False' her is rather arbitrary, or am I missing something?

[Disclaimer: I only discovered this yesterday, so I am not really an expert.]

I think False has the effect that the guard expression (after |)
evaluates to False and therefore the first line (f.. = annotation) is
never used and f is evaluated according to the second line.

> Its just that reading the GUM docs, I notice Strategies do something
> similar, but they return () as the dummy result (which I think may be
> a better choice)

What are GUM and Strategies? Could you provide any links?

Jan

-- 
-------------------------------------------------------------------------
Jan Kybic <kybic@ieee.org>      Odyssee, INRIA, Sophia-Antipolis, France
       or <Jan.Kybic@sophia.inria.fr>,tel. work +33 492 38 7589, fax 7845
                    http://www-sop.inria.fr/robotvis/personnel/Jan.Kybic/