Edward Kmett 쓴 글:
Actually the problem lies in your definition of fz, it has the wrong type to be used in lam.

The Z you get out of fz as type Z b String, but you need it to have Z (a -> b) String so that when you strip off the Z you have a Y String (a -> b) matching the result type of lam.

To get there replace your definition of fz with:

 > fz :: Z a String -> Z (a -> b) String
 > fz = Z . Y . unY . f . unZ

I think this seems to be the Yeoh wanted.

Mine was just blinded hack just to make it type check without looking at what program means.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to