module GHC.Vacuum.ClosureType
( ClosureType(..)
, isFun
, isThunk
, isCon
) where
#if __GLASGOW_HASKELL__ == 700
import GHC.Vacuum.ClosureType.V700 (ClosureType(..))
#elif __GLASGOW_HASKELL__ == 702
import GHC.Vacuum.ClosureType.V702 (ClosureType(..))
#elif __GLASGOW_HASKELL__ == 704
import GHC.Vacuum.ClosureType.V704 (ClosureType(..))
#elif __GLASGOW_HASKELL__ == 706
import GHC.Vacuum.ClosureType.V706 (ClosureType(..))
#elif __GLASGOW_HASKELL__ == 708
import GHC.Vacuum.ClosureType.V708 (ClosureType(..))
#else
#error Unsupported GHC version in ClosureTypes.hs!
#endif
isFun :: ClosureType -> Bool
isFun FUN = True
isFun FUN_1_0 = True
isFun FUN_0_1 = True
isFun FUN_2_0 = True
isFun FUN_1_1 = True
isFun FUN_0_2 = True
isFun FUN_STATIC = True
isFun _ = False
isThunk :: ClosureType -> Bool
isThunk AP = True
isThunk THUNK = True
isThunk THUNK_1_0 = True
isThunk THUNK_0_1 = True
isThunk THUNK_2_0 = True
isThunk THUNK_1_1 = True
isThunk THUNK_0_2 = True
isThunk THUNK_STATIC = True
isThunk THUNK_SELECTOR = True
isThunk _ = False
isCon :: ClosureType -> Bool
isCon CONSTR = True
isCon CONSTR_1_0 = True
isCon CONSTR_0_1 = True
isCon CONSTR_2_0 = True
isCon CONSTR_1_1 = True
isCon CONSTR_0_2 = True
isCon CONSTR_STATIC = True
isCon CONSTR_NOCAF_STATIC = True
isCon _ = False