pa-ba / compdata

Haskell library implementing "Data Types a la Carte"
http://hackage.haskell.org/package/compdata
Other
89 stars 27 forks source link

Annotated tree transformations #3

Closed maks83 closed 9 years ago

maks83 commented 9 years ago

I apologize for the wash to be a stupid question, I could not find a suitable example. I have an algebra AST (AST = Op1 :+: Op2 :+: Op3) transformation: alg :: Alg f (Term v). Is there a simple way to use it on annotated AST' = (Op1 :&: Ann) :+: (Op2 :&: Ann) :+: (Op3 :&: Ann) ?

PS: I studied Desugaring examples.

maks83 commented 9 years ago

I got it. Just need to switch Alg f (Term v) -> Alg f (Context v). Great library! But it lacks the more examples of real code.