GHC.Stg.Utils

ghc-9.4.0.20220501: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Stg.Utils

Synopsis

- mkStgAltTypeFromStgAlts :: forall p. Id -> [GenStgAlt p] -> AltType
- bindersOf :: BinderP a ~ Id => GenStgBinding a -> [Id]
- bindersOfX :: GenStgBinding a -> [BinderP a]
- bindersOfTop :: BinderP a ~ Id => GenStgTopBinding a -> [Id]
- bindersOfTopBinds :: BinderP a ~ Id => [GenStgTopBinding a] -> [Id]
- stripStgTicksTop :: (StgTickish -> Bool) -> GenStgExpr p -> ([StgTickish], GenStgExpr p)
- stripStgTicksTopE :: (StgTickish -> Bool) -> GenStgExpr p -> GenStgExpr p
- idArgs :: [StgArg] -> [Id]
- mkUnarisedId :: MonadUnique m => FastString -> UnaryType -> m Id
- mkUnarisedIds :: MonadUnique m => FastString -> [UnaryType] -> m [Id]

# Documentation

mkStgAltTypeFromStgAlts :: forall p. Id -> [GenStgAlt p] -> AltType Source #

bindersOf :: BinderP a ~ Id => GenStgBinding a -> [Id] Source #

bindersOfX :: GenStgBinding a -> [BinderP a] Source #

bindersOfTop :: BinderP a ~ Id => GenStgTopBinding a -> [Id] Source #

bindersOfTopBinds :: BinderP a ~ Id => [GenStgTopBinding a] -> [Id] Source #

stripStgTicksTop :: (StgTickish -> Bool) -> GenStgExpr p -> ([StgTickish], GenStgExpr p) Source #

Strip ticks of a given type from an STG expression.

stripStgTicksTopE :: (StgTickish -> Bool) -> GenStgExpr p -> GenStgExpr p Source #

Strip ticks of a given type from an STG expression returning only the expression.

idArgs :: [StgArg] -> [Id] Source #

mkUnarisedId :: MonadUnique m => FastString -> UnaryType -> m Id Source #

mkUnarisedIds :: MonadUnique m => FastString -> [UnaryType] -> m [Id] Source #