[Haskell-cafe] Typeable typeclass and type-level naturals
roma at ro-che.info
Wed Jun 5 09:46:09 CEST 2013
* TP <paratribulations at free.fr> [2013-06-05 00:37:36+0200]
> Roman Cheplyaka wrote:
> > Try adding
> > deriving instance Typeable 'Zero
> > deriving instance Typeable a => Typeable ('Succ a)
> > to your module.
> > (I haven't tested it — you might need to tweak it a bit.)
> Thanks Roman.
> Unfortunately, I already tried that (without the constraint "Typeable a =>",
> what a fool), but it did not work. The error is the same with the
> Derived typeable instance must be of form (Typeable 'Succ)
> In the stand-alone deriving instance for
> ‛Typeable a => Typeable (Succ a)’
> What is the problem?
Oh, it should probably be simply
deriving instance Typeable 'Zero
deriving instance Typeable 'Succ
More information about the Haskell-Cafe