[cvs-nhc98] patch applied (hat): Changed combinators for trusting in -hat.

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Tue Oct 10 07:17:16 EDT 2006


Fri May 10 04:19:36 PDT 2002  olaf
  * Changed combinators for trusting in -hat.
  
  The problem with the previous implementation was that the result of the reduction of a trusted function often contained many Hiddens, making the expression rather useless. E.g.: foldr (:) [] "Hi" = ({_} ({_} [])).
  
  The cause was that wrapUForward only works if the trace is demanded before the wrapped expression is demanded. However, the uapn combinators required the function value first and sometimes later required the trace of the function.
  
  Have changed uapn combinators to never demand the trace of the function. As a result, the result of the reduction of a trusted function is always shown as Hidden, if it is of functional type. However, if it is of an algebraic type, it is shown correctly. To achieve this, the cnn combinators for partially applied constructors had to be modified to record the complete constructor application in the trace, if called from untraced code.
  
  Furthermore made the various application combinators less strict in Fun, to avoid potential blackholes. Thought this would avoid blackhole in Clausify program, but unfortunately it does not. Slightly improves performance though.

    M ./src/hatlib/Hat.hs -199 +319


More information about the Cvs-nhc98 mailing list