ghc-8.0.0.20160111: The GHC API

Safe HaskellNone
LanguageHaskell2010

PmExpr

Synopsis

Documentation

data PmExpr

Lifted expressions for pattern match checking.

Instances

data PmLit

Literals (simple and overloaded ones) for pattern match checking.

Constructors

PmSLit HsLit 
PmOLit Bool (HsOverLit Id) 

Instances

type SimpleEq = (Id, PmExpr)

Term equalities

eqPmLit :: PmLit -> PmLit -> Bool

Equality between literals for pattern match checking.

truePmExpr :: PmExpr

Expression True

falsePmExpr :: PmExpr

Expression False

isTruePmExpr :: PmExpr -> Bool

Check whether a PmExpr is syntactically equal to term True.

isFalsePmExpr :: PmExpr -> Bool

Check whether a PmExpr is syntactically equal to term False.

isNotPmExprOther :: PmExpr -> Bool

Check if an expression is lifted or not

substComplexEq :: Id -> PmExpr -> ComplexEq -> Either ComplexEq ComplexEq

Substitute in a complex equality. We return (Left eq) if the substitution affected the equality or (Right eq) if nothing happened.

filterComplex :: [ComplexEq] -> [PmNegLitCt]

runPmPprM :: PmPprM a -> [PmNegLitCt] -> (a, [(SDoc, [PmLit])])