module Util where
import Data.Typeable
#if MIN_VERSION_base(4,4,0)
#else
mkTyCon3 _ m t = mkTyCon $ m++"."++t
#endif
packageName :: String
packageName = "logic-TPTP"
getTyRep1 :: forall c. Typeable1 c => c () -> TypeRep
getTyRep1 _ = mkTyConApp (typeRepTyCon (typeOf1 (undefined :: c ()))) []
mkTypeOfForRank2Kind :: forall x c. Typeable1 c => String -> String -> x c -> TypeRep
mkTypeOfForRank2Kind moduleName typeName = const tr
where
tc = mkTyCon3 packageName moduleName typeName
tr = mkTyConApp tc [getTyRep1 (undefined :: c ())]