Skip to content

Instantly share code, notes, and snippets.

@tokiwoousaka
Created February 2, 2013 11:11
Show Gist options
  • Save tokiwoousaka/4696909 to your computer and use it in GitHub Desktop.
Save tokiwoousaka/4696909 to your computer and use it in GitHub Desktop.
困った
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
@func-hs
Copy link

func-hs commented Mar 18, 2013

この書き方をどうにかしたいなら、MultiParamTypeClassesとTypeFamiliesを組み合わせるしかないような気がする

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment