{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
module TextShow.TH.Names (
evtCloseValName,
eventIsValName,
fdKeyTypeName,
uniqueTypeName,
asInt64ValName,
#if MIN_VERSION_base(4,8,0)
giveGCStatsTypeName,
doCostCentresTypeName,
doHeapProfileTypeName,
doTraceTypeName,
#endif
) where
import Language.Haskell.TH.Syntax
#if MIN_VERSION_base(4,8,2)
import GHC.RTS.Flags (GiveGCStats, DoCostCentres, DoHeapProfile, DoTrace)
#endif
mkEventName_v :: String -> Name
#if MIN_VERSION_base(4,20,0)
mkEventName_v = mkNameG_v "ghc-internal" "GHC.Internal.Event.Internal.Types"
#elif MIN_VERSION_base(4,15,0)
mkEventName_v :: String -> Name
mkEventName_v = String -> String -> String -> Name
mkNameG_v String
"base" String
"GHC.Event.Internal.Types"
#else
mkEventName_v = mkNameG_v "base" "GHC.Event.Internal"
#endif
evtCloseValName :: Name
evtCloseValName :: Name
evtCloseValName = String -> Name
mkEventName_v String
"evtClose"
eventIsValName :: Name
eventIsValName :: Name
eventIsValName = String -> Name
mkEventName_v String
"eventIs"
fdKeyTypeName :: Name
#if MIN_VERSION_base(4,20,0)
fdKeyTypeName = mkNameG_tc "ghc-internal" "GHC.Internal.Event.Manager" "FdKey"
#else
fdKeyTypeName :: Name
fdKeyTypeName = String -> String -> String -> Name
mkNameG_tc String
"base" String
"GHC.Event.Manager" String
"FdKey"
#endif
uniqueTypeName :: Name
#if MIN_VERSION_base(4,20,0)
uniqueTypeName = mkNameG_tc "ghc-internal" "GHC.Internal.Event.Unique" "Unique"
#else
uniqueTypeName :: Name
uniqueTypeName = String -> String -> String -> Name
mkNameG_tc String
"base" String
"GHC.Event.Unique" String
"Unique"
#endif
asInt64ValName :: Name
#if MIN_VERSION_base(4,20,0)
asInt64ValName = mkNameG_fld "ghc-internal" "GHC.Internal.Event.Unique" "Unique" "asInt"
#elif MIN_VERSION_base(4,19,0)
asInt64ValName = mkNameG_fld "base" "GHC.Event.Unique" "Unique" "asInt"
#elif MIN_VERSION_base(4,10,0)
asInt64ValName :: Name
asInt64ValName = String -> String -> String -> Name
mkNameG_v String
"base" String
"GHC.Event.Unique" String
"asInt"
#else
asInt64ValName = mkNameG_v "base" "GHC.Event.Unique" "asInt64"
#endif
#if MIN_VERSION_base(4,8,0)
giveGCStatsTypeName :: Name
# if MIN_VERSION_base(4,8,2)
giveGCStatsTypeName :: Name
giveGCStatsTypeName = ''GiveGCStats
# else
giveGCStatsTypeName = mkFlagsName_tc "GiveGCStats"
# endif
doCostCentresTypeName :: Name
# if MIN_VERSION_base(4,8,2)
doCostCentresTypeName :: Name
doCostCentresTypeName = ''DoCostCentres
# else
doCostCentresTypeName = mkFlagsName_tc "DoCostCentres"
# endif
doHeapProfileTypeName :: Name
# if MIN_VERSION_base(4,8,2)
doHeapProfileTypeName :: Name
doHeapProfileTypeName = ''DoHeapProfile
# else
doHeapProfileTypeName = mkFlagsName_tc "DoHeapProfile"
# endif
doTraceTypeName :: Name
# if MIN_VERSION_base(4,8,2)
doTraceTypeName :: Name
doTraceTypeName = ''DoTrace
# else
doTraceTypeName = mkFlagsName_tc "DoTrace"
# endif
# if !(MIN_VERSION_base(4,8,2))
mkFlagsName_tc :: String -> Name
mkFlagsName_tc = mkNameG_tc "base" "GHC.RTS.Flags"
# endif
#endif