RE: [Template-haskell] Dec type is missing "NewType"
Yes, that's true. No deep reason. Ian: would you feel up to adding newtype declarations, since you are Mr THSyntax? Thanks Simon | -----Original Message----- | From: template-haskell-admin@haskell.org [mailto:template-haskell-admin@haskell.org] On Behalf Of | Andre Pang | Sent: 17 May 2003 15:14 | To: template-haskell@haskell.org | Subject: [Template-haskell] Dec type is missing "NewType" | | Hi all, I think the Dec data type in THSyntax.hs (starting at line 174) | is missing the "newtype" declaration. It currently looks like this: | | data Dec | = Fun String [Clause] -- { f p1 p2 = b where decs } | | Val Pat RightHandSide [Dec] -- { p = b where decs } | | Data Cxt String [String] | [Con] [String] -- { data Cxt x => T x = A x | | B (T x) deriving (Z,W)} | | TySyn String [String] Typ -- { type T x = (x,x) } | | Class Cxt String [String] [Dec] -- { class Eq a => Ord a where | ds } | | Instance Cxt Typ [Dec] -- { instance Show w => Show | [w] where ds } | | Proto String Typ -- { length :: [a] -> Int } | | Foreign Foreign | deriving( Show ) | | Am I missing something, or is no way to write a newtype declaration? I | presume it's not the same as either a TySyn or Data. | | Thanks once again, | | | -- | % Andre Pang : trust.in.love.to.save | | _______________________________________________ | template-haskell mailing list | template-haskell@haskell.org | http://www.haskell.org/mailman/listinfo/template-haskell
participants (1)
-
Simon Peyton-Jones