I am trying to figure out how to express Y-Combitor in this indifferent EDSL:
class Symantics exp where
lam :: (exp a -> exp b) -> exp (exp a -> exp b)
app :: exp (exp a -> exp b) -> exp a -> exp b
fix :: ...
fix f = .....
I'm not sure, but I think that the default implementation of Y-Combinator should be possible using "lam" and "app".
Does anyone know how? My first attempts fail because "it is impossible to build an infinite type."
Cheers, Gunther
source
share