Hello Michal,

Sunday, August 2, 2009, 9:25:40 AM, you wrote:

> data Stmt = SIf Test [Stmt] [Stmt]   |   ...

> data Stmt = SIf Test Int Int   |   ...

data Stmt a = SIf Test [Stmt a] [Stmt a]   |   ...

where a will represent type of your statement. this may be read as
"IF statement with a left and right parts consisting of sequence of
statements returning a, have type a"

btw, you may need to use GADTs to implement more complex statement
types machinery, this is rather popular example in various GADT
papers, f.e. http://www.iai.uni-bonn.de/~ralf/publications/With.pdf


-- 
Best regards,
 Bulat                            mailto:[email protected]

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to