Hi,
I am upgrading SafeCopy to version 0.10.4.1 and discovered following
unpleased behavior. Mostly I concerned with stumbling error message.
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
module Main where
import Data.SafeCopy
import Data.Serialize
import GHC.Generics
import Type.Reflection
import Prelude
newtype IntKey r = IntKey { intKey :: Int } deriving (Show, Eq, Generic, Serialize, Typeable)
instance Typeable r => SafeCopy (IntKey r)
The snipped above is just fine until I enable PolyKinds extension.
Error message makes impression like GHC is incapable to do the obvious thing!
• Could not deduce (Typeable k)
arising from the superclasses of an instance declaration
from the context: Typeable r
bound by the instance declaration
at Main.hs:31:10-43
• In the instance declaration for ‘SafeCopy (IntKey r)’
|
31 | instance Typeable r => SafeCopy (IntKey r)
Hi,
I am upgrading SafeCopy to version 0.10.4.1 and discovered following
unpleased behavior. Mostly I concerned with stumbling error message.
The snipped above is just fine until I enable PolyKinds extension.
Error message makes impression like GHC is incapable to do the obvious thing!