Last active
June 16, 2016 05:32
-
-
Save jwatte/3c308ac0afbdc1df268ca0c837756127 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class A a where | |
getB :: B b => a -> b | |
class B b where | |
getA :: A a => b -> a | |
data X = X | |
instance A X where | |
getB x = x | |
instance B X where | |
getA x = x | |
{- | |
Foo.hs:16:14: | |
Could not deduce (b ~ X) | |
from the context (B b) | |
bound by the type signature for getB :: B b => X -> b | |
at Foo.hs:16:5-14 | |
`b' is a rigid type variable bound by | |
the type signature for getB :: B b => X -> b at Foo.hs:16:5 | |
In the expression: x | |
In an equation for `getB': getB x = x | |
In the instance declaration for `A X' | |
Foo.hs:19:14: | |
Could not deduce (a ~ X) | |
from the context (A a) | |
bound by the type signature for getA :: A a => X -> a | |
at Foo.hs:19:5-14 | |
`a' is a rigid type variable bound by | |
the type signature for getA :: A a => X -> a at Foo.hs:19:5 | |
In the expression: x | |
In an equation for `getA': getA x = x | |
In the instance declaration for `B X' | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment