26 Jun
2003
26 Jun
'03
1:03 p.m.
On Thu, Jun 26, 2003 at 01:15:28PM +0200, Eric Offermann wrote:
instance Lift (C a) where lift c = recCon "C" [fieldExp "c_succ" [| c_succ c |] ,fieldExp "c_pred" [| c_pred c |] ]
I think [| c_succ c |] doesn't do what you think it does - are you hoping for it to be the code for "\n -> n + 1"? What you will actually get is the code for applying "c_succ" to lift c (it is lifted as it is an argument to the function). However, lifting c needs to use this instance again so loops. Ian