[Haskell-cafe] "SameConstraints?" type constraints
Leza Morais Lutonda
leza.ml at fecrd.cujae.edu.cu
Fri Jun 19 12:09:05 UTC 2015
On 06/19/2015 03:02 AM, MigMit wrote:
> Typo.
>
> {-# LANGUAGE ConstraintKinds, GADTs #-}
> data SC c e where SC :: c d => d -> e -> SC c e
Yes, I have activated the GADTs extension too and the data definition itself typechecks but the Show instance do not:
instance Show e => Show (S c e) where
show (SC x y) = show x ⧺ show y
Because: Could not deduce (Show d) arising from a use of ‘show’
--
Leza Morais Lutonda, Lemol-C
http://lemol.github.io
50 Aniversario de la Cujae. Inaugurada por Fidel el 2 de diciembre de 1964 http://cujae.edu.cu
More information about the Haskell-Cafe
mailing list