ArchiveOrangemail archive

Discussion about Template Haskell


template-haskell.haskell.org
(List home) (Recent threads) (38 other Haskell lists)

Subscription Options

  • RSS or Atom: Read-only subscription using a browser or aggregator. This is the recommended way if you don't need to send messages to the list. You can learn more about feed syndication and clients here.
  • Conventional: All messages are delivered to your mail address, and you can reply. To subscribe, send an email to the list's subscribe address with "subscribe" in the subject line, or visit the list's homepage here.
  • This list contains about 752 messages, beginning Jan 2003
  • This list doesn't seem to be active
Report the Spam
This button sends a spam report to the moderator. Please use it sparingly. For other removal requests, read this.
Are you sure? yes no

Is it evil to add deriving Typeable to newtype Q?

Ad
Leonel Fonseca 1273047213Wed, 05 May 2010 08:13:33 +0000 (UTC)
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.
Robert Greayer 1273072939Wed, 05 May 2010 15:22:19 +0000 (UTC)
On Wed, May 5, 2010 at 4:13 AM, Leonel Fonseca wrote: > 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. > > _______________________________________________ > template-haskell mailing list > > http://www.haskell.org/mailman/listinfo/templ... > >
This question might be better asked at Haskell-Cafe -- template-haskell (the mailing list) is pretty quiet, and TH questions are perfectly appropriate on -Cafe. The separate template-haskell mailing list is perhaps edging toward retirement.
Home | About | Privacy