Created
July 26, 2012 08:47
-
-
Save cutsea110/3181052 to your computer and use it in GitHub Desktop.
てすと
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeSynonymInstances #-} | |
{-# LANGUAGE RankNTypes #-} | |
module Test where | |
data X = X String | |
deriving Show | |
type Y = Int | |
class Z a where | |
instance Z X | |
instance Z Y | |
data D = D { x :: X | |
, y :: Y | |
, z :: (Show a, Z a) => a | |
} | |
deriving Show | |
{- | |
*Test> :load "/home/cutsea110/devel/haskell/metadata/Test.hs" | |
[1 of 1] Compiling Test ( /home/cutsea110/devel/haskell/metadata/Test.hs, interpreted ) | |
/home/cutsea110/devel/haskell/metadata/Test.hs:18:17: | |
Can't make a derived instance of `Show D': | |
Constructor `D' must have a Haskell-98 type | |
Possible fix: use a standalone deriving declaration instead | |
In the data type declaration for `D' | |
Failed, modules loaded: none. | |
Prelude> | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment