Created
January 15, 2012 20:57
-
-
Save ranha/1617302 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
template<typename T> | |
void f(T,T){} | |
int main() | |
{ | |
f("",0); | |
return 0; | |
} |
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
{-# 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