You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
Not surprisingly, this works: instance Typeable (r :: *) => SafeCopy (IntKey r), I can't think of a way to do this in the library code off the top of my head. I does seem my version bump was too optimistic.
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!
The text was updated successfully, but these errors were encountered: