Hi all,

I want use TH write some function like below:

  data DataType = StringT
                | IntT
                | CharT

  parse :: [(String,DataType)] -> (TypeA, TypeB, ... TypeN)

Example:
  
  parse [("string", StringT), ("001", IntT), ("c", CharT)]

will return:

  ("string", 001, 'c')

So how to use TH write 'parse' function? 

Thanks!

  -- Andy

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to