Skip to content

Instantly share code, notes, and snippets.

@ranha
Created January 15, 2012 20:57
Show Gist options
  • Save ranha/1617302 to your computer and use it in GitHub Desktop.
Save ranha/1617302 to your computer and use it in GitHub Desktop.
template<typename T>
void f(T,T){}
int main()
{
f("",0);
return 0;
}
{-# LANGUAGE RankNTypes , TypeSynonymInstances #-}
class C a where
x :: a
instance C Int where
x = 0
instance C String where
x = "0"
f :: forall a . a -> a -> ()
f _ _ = ()
main = print $ show $ f "" x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment