Re: [Haskell-cafe] Typeable typeclass and type-level naturals

2013-06-06 Thread José Pedro Magalhães
Hi, On Wed, Jun 5, 2013 at 11:21 PM, TP paratribulati...@free.fr wrote: José Pedro Magalhães wrote: Oh, it should probably be simply deriving instance Typeable 'Zero deriving instance Typeable 'Succ Yes, that's how it should be. Please let me know if that doesn't work.

Re: [Haskell-cafe] Typeable typeclass and type-level naturals

2013-06-05 Thread Roman Cheplyaka
* TP paratribulati...@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.

Re: [Haskell-cafe] Typeable typeclass and type-level naturals

2013-06-05 Thread José Pedro Magalhães
On Wed, Jun 5, 2013 at 8:46 AM, Roman Cheplyaka r...@ro-che.info wrote: * TP paratribulati...@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

Re: [Haskell-cafe] Typeable typeclass and type-level naturals

2013-06-05 Thread TP
José Pedro Magalhães wrote: Oh, it should probably be simply deriving instance Typeable 'Zero deriving instance Typeable 'Succ Yes, that's how it should be. Please let me know if that doesn't work. Thanks, it works perfectly like that. I don't understand exactly why the previous

Re: [Haskell-cafe] Typeable typeclass and type-level naturals

2013-06-04 Thread TP
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 =,

[Haskell-cafe] Typeable typeclass and type-level naturals

2013-06-02 Thread TP
Hi all, I try to play with the Typeable typeclass, and I have some difficulties to make it work in this simple case where I use type-level naturals: - {-# LANGUAGE GADTs #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-#

Re: [Haskell-cafe] Typeable typeclass and type-level naturals

2013-06-02 Thread Roman Cheplyaka
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.) Roman * TP paratribulati...@free.fr [2013-06-02 18:08:02+0200] Hi all, I try to play with the Typeable typeclass, and