Is it evil to add "deriving Typeable" to newtype Q?
Leonel Fonseca <[email protected]> Wed, 5 May 2010 02:13:27 -0600
| Newsgroups | gmane.comp.lang.haskell.template |
|---|---|
| Message-ID | <[email protected]> |
--===============1405830150== Content-Type: multipart/alternative; boundary=001636b2b15498f91a0485d46648 --001636b2b15498f91a0485d46648 Content-Type: text/plain; charset=UTF-8 Hi everybody, Is it reasonable to add "deriving Typeable" to newtype Q? In case you wonder why I want to do that, it is because I've constructed a Q [Dec] inside a monad, I want to extract it from the monad (via runIO) and the monad has constraint "Typeable" over this parameter. I've also tried to write the Typeable instance in my own module (not Language.Haskell.TH.Syntax). But I've got no luck since the Q type constructor is exported but the data constructor is not. Thanks. -- Leonel Fonseca. --001636b2b15498f91a0485d46648 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi everybody,<br><br>Is it reasonable to add "deriving Typeable" = to newtype Q?<br><br>In case you wonder why I want to do that, it is becaus= e I've constructed a Q [Dec] inside a monad, I want to extract=C2=A0 it= from the monad (via runIO) and the monad has constraint "Typeable&quo= t; over this parameter.<br> <br>I've also tried to write the Typeable instance in my own module (no= t Language.Haskell.TH.Syntax). But I've got no luck since the Q type co= nstructor is exported but the data constructor is not.<br clear=3D"all"> <br>Thanks.<br>-- <br><br>Leonel Fonseca.<br> --001636b2b15498f91a0485d46648-- --===============1405830150== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ template-haskell mailing list [email protected] http://www.haskell.org/mailman/listinfo/template-haskell --===============1405830150==--