ghc-8.2.1: The GHC API

Safe HaskellNone
LanguageHaskell2010

PmExpr

Synopsis

Documentation

data PmExpr Source #

Lifted expressions for pattern match checking.

data PmLit Source #

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

Constructors

PmSLit HsLit 
PmOLit Bool (HsOverLit Id) 

type SimpleEq = (Id, PmExpr) Source #

Term equalities

eqPmLit :: PmLit -> PmLit -> Bool Source #

Equality between literals for pattern match checking.

isTruePmExpr :: PmExpr -> Bool Source #

Check whether a PmExpr is syntactically equal to term True.

isFalsePmExpr :: PmExpr -> Bool Source #

Check whether a PmExpr is syntactically equal to term False.

isNotPmExprOther :: PmExpr -> Bool Source #

Check if an expression is lifted or not

substComplexEq :: Name -> PmExpr -> ComplexEq -> Either ComplexEq ComplexEq Source #

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

filterComplex :: [ComplexEq] -> [PmNegLitCt] Source #

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