ghc-lib-0.20201101: The GHC API, decoupled from GHC versions
Safe HaskellNone
LanguageHaskell2010

GHC.HsToCore.Match.Literal

Synopsis

Documentation

dsLit :: HsLit GhcRn -> DsM CoreExpr Source #

dsOverLit :: HsOverLit GhcTc -> DsM CoreExpr Source #

Post-typechecker, the HsExpr field of an OverLit contains (an expression for) the literal value itself.

hsLitKey :: Platform -> HsLit GhcTc -> Literal Source #

tidyLitPat :: HsLit GhcTc -> Pat GhcTc Source #

tidyNPat :: HsOverLit GhcTc -> Maybe (SyntaxExpr GhcTc) -> SyntaxExpr GhcTc -> Type -> Pat GhcTc Source #

matchLiterals Source #

Arguments

:: NonEmpty Id 
-> Type

Type of the whole case expression

-> NonEmpty (NonEmpty EquationInfo)

All PgLits

-> DsM (MatchResult CoreExpr) 

warnAboutIdentities :: DynFlags -> CoreExpr -> Type -> DsM () Source #

warnAboutOverflowedOverLit :: HsOverLit GhcTc -> DsM () Source #

Emit warnings on overloaded integral literals which overflow the bounds implied by their type.

warnAboutOverflowedLit :: HsLit GhcTc -> DsM () Source #

Emit warnings on integral literals which overflow the bounds implied by their type.

warnAboutEmptyEnumerations :: FamInstEnvs -> DynFlags -> LHsExpr GhcTc -> Maybe (LHsExpr GhcTc) -> LHsExpr GhcTc -> DsM () Source #

Warns about [2,3 .. 1] or [b .. a] which return the empty list. For numeric literals, only works for integral types, not floating point.