GHC.Tc.Gen.Do

ghc-9.14.0.20251028: The GHC API

Safe Haskell | None
Language | GHC2021

GHC.Tc.Gen.Do

Description

Expand `Do` block statements into `(>>=)`, `(>>)` and `let`s After renaming but right ebefore type checking

Synopsis

- expandDoStmts :: HsDoFlavour -> [ExprLStmt GhcRn] -> TcM (LHsExpr GhcRn)

# Documentation

expandDoStmts :: HsDoFlavour -> [ExprLStmt GhcRn] -> TcM (LHsExpr GhcRn) Source #

Expand the `do`-statments into expressions right after renaming so that they can be typechecked. See Note [Expanding HsDo with XXExprGhcRn] below for `HsDo` specific commentary and Note [Handling overloaded and rebindable constructs] for high level commentary