Created
February 2, 2013 11:11
-
-
Save tokiwoousaka/4696909 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
module Main where | |
class C c where | |
class A a where | |
cFrom :: C b => a -> b | |
instance C c => A ((,) c a) where | |
cFrom x = fst x --ghc cant deduce c 2 b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
この書き方をどうにかしたいなら、MultiParamTypeClassesとTypeFamiliesを組み合わせるしかないような気がする