GHC.HsToCore.Binds

ghc-9.10.0.20240413: The GHC API

Safe Haskell | None
Language | GHC2021

GHC.HsToCore.Binds

Synopsis

- dsTopLHsBinds :: LHsBinds GhcTc -> DsM (OrdList (Id, CoreExpr))
- dsLHsBinds :: LHsBinds GhcTc -> DsM ([Id], [(Id, CoreExpr)])
- decomposeRuleLhs :: DynFlags -> [Var] -> CoreExpr -> VarSet -> Either DsMessage ([Var], Id, [CoreExpr])
- dsSpec :: Maybe CoreExpr -> Located TcSpecPrag -> DsM (Maybe (OrdList (Id, CoreExpr), CoreRule))
- dsHsWrapper :: HsWrapper -> ((CoreExpr -> CoreExpr) -> DsM a) -> DsM a
- dsHsWrappers :: [HsWrapper] -> ([CoreExpr -> CoreExpr] -> DsM a) -> DsM a
- dsEvTerm :: EvTerm -> DsM CoreExpr
- dsTcEvBinds :: TcEvBinds -> ([CoreBind] -> DsM a) -> DsM a
- dsTcEvBinds_s :: [TcEvBinds] -> ([CoreBind] -> DsM a) -> DsM a
- dsEvBinds :: Bag EvBind -> ([CoreBind] -> DsM a) -> DsM a
- dsWarnOrphanRule :: CoreRule -> DsM ()

# Documentation

dsTopLHsBinds :: LHsBinds GhcTc -> DsM (OrdList (Id, CoreExpr)) Source #

Desugar top level binds, strict binds are treated like normal binds since there is no good time to force before first usage.

dsLHsBinds :: LHsBinds GhcTc -> DsM ([Id], [(Id, CoreExpr)]) Source #

Desugar all other kind of bindings, Ids of strict binds are returned to later be forced in the binding group body, see Note [Desugar Strict binds]

Invariant: the desugared bindings are returned in dependency order, see Note [Return non-recursive bindings in dependency order]

decomposeRuleLhs :: DynFlags -> [Var] -> CoreExpr -> VarSet -> Either DsMessage ([Var], Id, [CoreExpr]) Source #

dsSpec :: Maybe CoreExpr -> Located TcSpecPrag -> DsM (Maybe (OrdList (Id, CoreExpr), CoreRule)) Source #

dsHsWrapper :: HsWrapper -> ((CoreExpr -> CoreExpr) -> DsM a) -> DsM a Source #

dsHsWrappers :: [HsWrapper] -> ([CoreExpr -> CoreExpr] -> DsM a) -> DsM a Source #

dsEvTerm :: EvTerm -> DsM CoreExpr Source #

dsTcEvBinds :: TcEvBinds -> ([CoreBind] -> DsM a) -> DsM a Source #

dsTcEvBinds_s :: [TcEvBinds] -> ([CoreBind] -> DsM a) -> DsM a Source #

dsEvBinds :: Bag EvBind -> ([CoreBind] -> DsM a) -> DsM a Source #

dsWarnOrphanRule :: CoreRule -> DsM () Source #