| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
GHC.HsToCore.Match
Documentation
Arguments
| :: [MatchId] | Variables rep'ing the exprs we're matching with ^ See Note [Match Ids] ^ Note that the Match Ids carry not only a name, but ^ also the multiplicity at which each column has been ^ type checked. |
| -> Type | Type of the case expression |
| -> [EquationInfo] | Info about patterns, etc. (type synonym below) |
| -> DsM (MatchResult CoreExpr) | Desugared result! |
matchEquations :: HsMatchContext GhcRn -> [MatchId] -> [EquationInfo] -> Type -> DsM CoreExpr #
Arguments
| :: HsMatchContext GhcRn | For shadowing warning messages |
| -> Maybe (LHsExpr GhcTc) | Scrutinee. (Just scrut) for a case expr case scrut of { p1 -> e1 ... } (and in this case the MatchGroup will have all singleton patterns) Nothing for a function definition f p1 q1 = ... -- No "scrutinee" f p2 q2 = ... -- in this case |
| -> MatchGroup GhcTc (LHsExpr GhcTc) | Matches being desugared |
| -> DsM ([Id], CoreExpr) | Results (usually passed to |
matchSinglePat :: CoreExpr -> HsMatchContext GhcRn -> LPat GhcTc -> Type -> MatchResult CoreExpr -> DsM (MatchResult CoreExpr) #
matchSinglePatVar :: Id -> HsMatchContext GhcRn -> LPat GhcTc -> Type -> MatchResult CoreExpr -> DsM (MatchResult CoreExpr) #