Hi. Pat asked a question [1] about AST parametrized with types. People
suggest to use Functor machinery if possible. Have anything changed
since them? Do we have a way to safely transform the tree like

data Expr a = Id { id :: Id a } | Op { op :: Char, expra :: (Expr a) ,
exprb :: (Expr a) }

data Id a = Id { name :: a }

from Expr String to, say, Expr Int where Int names may represent some
keys in the hash map?

Regards,
Sergey

[1] -  
http://stackoverflow.com/questions/5434889/is-it-possible-to-use-syb-to-transform-the-type

PS sclv suggested to use synthesize from SYB to solve the problem.
Could anyone provide me with example of this method?
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to