ghc-lib-0.20190423: The GHC API, decoupled from GHC versions

Safe HaskellNone
LanguageHaskell2010

Match

Documentation

match Source #

Arguments

:: [MatchId]

Variables rep'ing the exprs we're matching with ^ See Note [Match Ids]

-> Type

Type of the case expression

-> [EquationInfo]

Info about patterns, etc. (type synonym below)

-> DsM MatchResult

Desugared result!

matchWrapper Source #

Arguments

:: HsMatchContext Name

For shadowing warning messages

-> Maybe (LHsExpr GhcTc)

Scrutinee, if we check a case expr

-> MatchGroup GhcTc (LHsExpr GhcTc)

Matches being desugared

-> DsM ([Id], CoreExpr)

Results (usually passed to match)

matchSimply Source #

Arguments

:: CoreExpr

Scrutinee

-> HsMatchContext Name

Match kind

-> LPat GhcTc

Pattern it should match

-> CoreExpr

Return this if it matches

-> CoreExpr

Return this if it doesn't

-> DsM CoreExpr