Getting a Typeable instance for (':)
I'm trying to get a Typeable instance for (':)
I am using DataKinds and [*].
I have TypeOperators, StandaloneDeriving and PolyKinds enabled
I cannot get an instance like
I tried
deriving instance Typeable (':)
and
deriving instance Typeable ':
and
deriving instance Typeable ((':))
but they all get parsing errors.
I know that if I write
data List a = Cons a (List a) | Empty
deriving instance Typeable (Cons)
I get the expected result, but I don't want to rewrite my existing code to use my own list type.
+3
source to share