ghc-8.4.4: The GHC API

Safe HaskellNone
LanguageHaskell2010

DsUtils

Description

Utility functions for constructing Core syntax, principally for desugaring

Synopsis

Documentation

data EquationInfo Source #

Constructors

EqnInfo 
Instances
Outputable EquationInfo Source # 
Instance details

Defined in DsMonad

data CanItFail Source #

Constructors

CanFail 
CantFail 

data CaseAlt a Source #

Constructors

MkCaseAlt 

mkSelectorBinds Source #

Arguments

:: [[Tickish Id]]

ticks to add, possibly

-> LPat GhcTc

The pattern

-> CoreExpr

Expression to which the pattern is bound

-> DsM (Id, [(Id, CoreExpr)])

Id the rhs is bound to, for desugaring strict binds (see Note [Desugar Strict binds] in DsBinds) and all the desugared binds

decideBangHood Source #

Arguments

:: DynFlags 
-> LPat id

Original pattern

-> LPat id 

Use -XStrict to add a ! or remove a ~

Examples: ~pat => pat -- when -XStrict (even if pat = ~pat') !pat => !pat -- always pat => !pat -- when -XStrict pat => pat -- otherwise

addBang Source #

Arguments

:: LPat id

Original pattern

-> LPat id

Banged pattern

Unconditionally make a Pat strict.