{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
module TextShow.TH.Names (
evtCloseValName,
eventIsValName,
fdKeyTypeName,
uniqueTypeName,
asInt64ValName,
#if MIN_VERSION_base(4,6,0)
numberTypeName,
#endif
#if MIN_VERSION_base(4,8,0)
giveGCStatsTypeName,
doCostCentresTypeName,
doHeapProfileTypeName,
doTraceTypeName,
#endif
) where
import Language.Haskell.TH.Syntax
#if MIN_VERSION_base(4,7,0)
import Text.Read.Lex (Number)
#endif
#if MIN_VERSION_base(4,8,2)
import GHC.RTS.Flags (GiveGCStats, DoCostCentres, DoHeapProfile, DoTrace)
#endif
mkEventName_v :: String -> Name
mkEventName_v = mkNameG_v "base" "GHC.Event.Internal"
evtCloseValName :: Name
evtCloseValName = mkEventName_v "evtClose"
eventIsValName :: Name
eventIsValName = mkEventName_v "eventIs"
fdKeyTypeName :: Name
fdKeyTypeName = mkNameG_tc "base" "GHC.Event.Manager" "FdKey"
uniqueTypeName :: Name
uniqueTypeName = mkNameG_tc "base" "GHC.Event.Unique" "Unique"
asInt64ValName :: Name
#if MIN_VERSION_base(4,10,0)
asInt64ValName = mkNameG_v "base" "GHC.Event.Unique" "asInt"
#else
asInt64ValName = mkNameG_v "base" "GHC.Event.Unique" "asInt64"
#endif
#if MIN_VERSION_base(4,6,0)
numberTypeName :: Name
# if MIN_VERSION_base(4,7,0)
numberTypeName = ''Number
# else
numberTypeName = mkNameG_tc "base" "Text.Read.Lex" "Number"
# endif
#endif
#if MIN_VERSION_base(4,8,0)
giveGCStatsTypeName :: Name
# if MIN_VERSION_base(4,8,2)
giveGCStatsTypeName = ''GiveGCStats
# else
giveGCStatsTypeName = mkFlagsName_tc "GiveGCStats"
# endif
doCostCentresTypeName :: Name
# if MIN_VERSION_base(4,8,2)
doCostCentresTypeName = ''DoCostCentres
# else
doCostCentresTypeName = mkFlagsName_tc "DoCostCentres"
# endif
doHeapProfileTypeName :: Name
# if MIN_VERSION_base(4,8,2)
doHeapProfileTypeName = ''DoHeapProfile
# else
doHeapProfileTypeName = mkFlagsName_tc "DoHeapProfile"
# endif
doTraceTypeName :: Name
# if MIN_VERSION_base(4,8,2)
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