[cvs-nhc98] Portable Hat: Fixed <<loop>> bug.

User olaf olaf@sparud.net
Tue, 28 May 2002 18:08:44 +0200 (CEST)


olaf: Tue May 28 18:08:43 CEST 2002

Update of /usr/src/master/nhc/src/hat/lib
In directory hinken:/tmp/cvs-serv4637/src/hat/lib

Modified Files:
	Hat.hs 
Log Message:
Portable Hat: Fixed <<loop>> bug.

Even for local constants uConstDef has to record something to avoid a black hole, because useDef pattern matches on its result. Hence use uwrapForward there.

Reintroduced distinction between wrapForward and uwrapForward. The former always records a Forward. Know that for type conversion combinators the trace will always be demanded.

Also replaced unFun by pattern matching on Fun. It was stupid previously to remove pattern matching. Because Fun is a newtype it doesn't force any evaluation and it is nicer and probably more efficient than unFun.

Experimented with different definition of uwrapForward. The alternative is nicer, but slightly less efficient and hence only included in a comment.