[cvs-nhc98] Modified combinators and also slightly the transformation.
User olaf
olaf@sparud.net
Wed, 28 Mar 2001 20:33:56 +0200 (CEST)
olaf: Wed Mar 28 20:33:56 CEST 2001
Update of /usr/src/master/nhc/include
In directory hinken:/tmp/cvs-serv11925/include
Modified Files:
Prelude.T.hi
Log Message:
Modified combinators and also slightly the transformation.
Moved introduction of Sat's from functions side (fun?, prim?) to
application side (ap?, rap?).
- Removes previous bug that transformed program was too eager,
e.g. in (True || h True) the application of h was evaluated.
- Creation of Sat and App? trace nodes now next to each other.
Integration of writing a Sat and an App? now straightforward.
- Subsequent RHS-optimisation possible.
Corrected bug in transformation of let. Expression after in is only
in projective context if whole let is in projective context.
This bug could lead to missing Hidden node in trusted code and
too eager evaluation when the RHS-optimisation is used.
Introduced separate combinator trif for if in projective context.
The use of original tif could lead to too eager evaluation
(never observed) and this would have become worse with the
RHS-optimisation.
RHS-optimisation: If an application (or if) is in projective context,
then it doesn't need a Sat, because the application node only serves
as a parent, but is never pointed to from an App? as an argument.
So modified rap? and trif to not produce Sats. This halfs the number
of SatCs and reduces runtime by ~10%.