Re: [Haskell-cafe] question about type constructors

2013-05-23 Thread Roman Cheplyaka
* TP paratribulati...@free.fr [2013-05-23 00:34:57+0200] Hi, In the program I am trying to write, I have a problem that can be reduced to the following dummy example: -- {-# LANGUAGE GADTs #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-#

Re: [Haskell-cafe] question about type constructors

2013-05-23 Thread TP
Roman Cheplyaka wrote: The rule of thumb is that you should never use IncoherentInstances. The proper way to do it is: data Person :: Gender - * where Person :: String - Person b Child :: (PrettyPrint a, PrettyPrint b) = String - Person a - Person b -

Re: [Haskell-cafe] question about type constructors

2013-05-23 Thread Roman Cheplyaka
* TP paratribulati...@free.fr [2013-05-23 13:23:36+0200] Roman Cheplyaka wrote: The rule of thumb is that you should never use IncoherentInstances. The proper way to do it is: data Person :: Gender - * where Person :: String - Person b Child ::

[Haskell-cafe] question about type constructors

2013-05-22 Thread TP
Hi, In the program I am trying to write, I have a problem that can be reduced to the following dummy example: -- {-# LANGUAGE GADTs #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE IncoherentInstances #-}