Is it evil to add "deriving Typeable" to newtype Q?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it evil to add "deriving Typeable" to newtype Q?

Leonel Fonseca
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
[hidden email]
http://www.haskell.org/mailman/listinfo/template-haskell
Reply | Threaded
Open this post in threaded view
|

Re: Is it evil to add "deriving Typeable" to newtype Q?

Robert Greayer-2
On Wed, May 5, 2010 at 4:13 AM, Leonel Fonseca <[hidden email]> 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
> [hidden email]
> http://www.haskell.org/mailman/listinfo/template-haskell
>
>

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.
_______________________________________________
template-haskell mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/template-haskell