Hi José,
I am writing here to ask suggestions on how to annotate an ast with
types (or any other information that would be relevant in a compiler
phase) in Haskell.
As an example, consider the simplified ast types:
data Exp
= IntExp Integer
| VarExp Symbol
| AssignExp Symbol Exp
| IfExp Exp Exp (Maybe Exp)
| CallExp Symbol [Exp]
| LetExp [Dec] Exp
data Dec
= TypeDec Symbol Ty
| FunctionDec Symbol [(Symbol,Symbol)] (Mybe Symbol) Exp
| VarDec Symbol (Maybe Symbol) Exp
Expressions can have type annotations, but declarations can not.
Comments?
Regards,
Romildo
--
Computer Science Department
Universidade Federal de Ouro Preto, Brasil
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe