-
-
Save hgiasac/c7f5093c3773c252083d5d78a570a0eb 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
INSTANCE_TYPEABLE0(Bool,boolTc,"Bool") | |
tup2Tc :: TyCon | |
tup2Tc = mkTyCon "," | |
instance (Typeable a, Typeable b) => Typeable (a,b) where | |
typeOf tu = mkAppTy tup2Tc [typeOf ((undefined :: (a,b) -> a) tu), | |
typeOf ((undefined :: (a,b) -> b) tu)] | |
tup3Tc :: TyCon | |
tup3Tc = mkTyCon ",," | |
instance ( Typeable a , Typeable b , Typeable c) => Typeable (a,b,c) where | |
... | |
tup4Tc :: TyCon | |
tup4Tc = mkTyCon ",,," -- too much boilerplate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment