[Haskell-cafe] Non-derivable Typeable
roma at ro-che.info
Tue Jan 22 14:43:58 CET 2013
It doesn't seem to — am I doing something wrong?
GHCi, version 22.214.171.12421207: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :set -XDeriveDataTypeable -XStandaloneDeriving
Prelude> :m +Data.Typeable
Prelude Data.Typeable> data Foo m = Foo (m ())
Prelude Data.Typeable> deriving instance Typeable1 m => Typeable (Foo m)
Can't make a derived instance of `Typeable (Foo m)':
`Foo' must only have arguments of kind `*'
In the stand-alone deriving instance for
`Typeable1 m => Typeable (Foo m)'
* José Pedro Magalhães <jpm at cs.uu.nl> [2013-01-22 13:36:26+0000]
> Won't it derive it with StandaloneDeriving?
> On Tue, Jan 22, 2013 at 1:28 PM, Roman Cheplyaka <roma at ro-che.info> wrote:
> > I need to declare a Typeable instance for a type which has an argument
> > of kind * -> *. GHC refuses to derive it.
> > What is a recommended way to go about it?
> > In particular, if I write the instance by hand, how important is the
> > fingerprint, and how could I generate it?
> > Roman
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-Cafe at haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
More information about the Haskell-Cafe