[Template-haskell] Dec type is missing "NewType"
Simon Peyton-Jones
simonpj@microsoft.com
Mon, 19 May 2003 14:58:44 +0100
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"
|=20
| 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:
|=20
| data Dec
| =3D Fun String [Clause] -- { f p1 p2 =3D b where =
decs }
| | Val Pat RightHandSide [Dec] -- { p =3D b where decs }
| | Data Cxt String [String]
| [Con] [String] -- { data Cxt x =3D> T x =3D =
A x
|
| B (T x) deriving (Z,W)}
| | TySyn String [String] Typ -- { type T x =3D (x,x) }
| | Class Cxt String [String] [Dec] -- { class Eq a =3D> Ord a
where
| ds }
| | Instance Cxt Typ [Dec] -- { instance Show w =3D> =
Show
| [w] where ds }
| | Proto String Typ -- { length :: [a] -> Int }
| | Foreign Foreign
| deriving( Show )
|=20
| 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.
|=20
| Thanks once again,
|=20
|=20
| --
| % Andre Pang : trust.in.love.to.save
|=20
| _______________________________________________
| template-haskell mailing list
| template-haskell@haskell.org
| http://www.haskell.org/mailman/listinfo/template-haskell