HsPat

ghc-7.8.2: The GHC API

Safe Haskell | None
Language | Haskell98

HsPat

# Documentation

data Pat id Source

Constructors

WildPat PostTcType |
VarPat id |
LazyPat (LPat id) |
AsPat (Located id) (LPat id) |
ParPat (LPat id) |
BangPat (LPat id) |
ListPat [LPat id] PostTcType (Maybe (PostTcType, SyntaxExpr id)) |
TuplePat [LPat id] Boxity PostTcType |
PArrPat [LPat id] PostTcType |
ConPatIn (Located id) (HsConPatDetails id) |
ConPatOut |
Fields pat_con :: Located ConLike pat_tvs :: [TyVar] pat_dicts :: [EvVar] pat_binds :: TcEvBinds pat_args :: HsConPatDetails id pat_ty :: Type pat_wrap :: HsWrapper
ViewPat (LHsExpr id) (LPat id) PostTcType |
SplicePat (HsSplice id) |
QuasiQuotePat (HsQuasiQuote id) |
LitPat HsLit |
NPat (HsOverLit id) (Maybe (SyntaxExpr id)) (SyntaxExpr id) |
NPlusKPat (Located id) (HsOverLit id) (SyntaxExpr id) (SyntaxExpr id) |
SigPatIn (LPat id) (HsWithBndrs (LHsType id)) |
SigPatOut (LPat id) Type |
CoPat HsWrapper (Pat id) Type |

Instances

Data id => Data (Pat id) |
OutputableBndr name => Outputable (Pat name) |
Typeable (* -> *) Pat |

type InPat id = LPat id Source

type OutPat id = LPat id Source

type LPat id = Located (Pat id) Source

data HsConDetails arg rec Source

Constructors

PrefixCon [arg] |
RecCon rec |
InfixCon arg arg |

Instances

(Data arg, Data rec) => Data (HsConDetails arg rec) |
Typeable (* -> * -> *) HsConDetails |

type HsConPatDetails id = HsConDetails (LPat id) (HsRecFields id (LPat id)) Source

hsConPatArgs :: HsConPatDetails id -> [LPat id] Source

data HsRecFields id arg Source

Constructors

HsRecFields |
Fields rec_flds :: [HsRecField id arg] rec_dotdot :: Maybe Int

Instances

(Data id, Data arg) => Data (HsRecFields id arg) |
(OutputableBndr id, Outputable arg) => Outputable (HsRecFields id arg) |
Typeable (* -> * -> *) HsRecFields |

data HsRecField id arg Source

Constructors

HsRecField |
Fields hsRecFieldId :: Located id hsRecFieldArg :: arg hsRecPun :: Bool

Instances

(Data id, Data arg) => Data (HsRecField id arg) |
(OutputableBndr id, Outputable arg) => Outputable (HsRecField id arg) |
Typeable (* -> * -> *) HsRecField |

hsRecFields :: HsRecFields id arg -> [id] Source

mkPrefixConPat :: DataCon -> [OutPat id] -> Type -> OutPat id Source

mkCharLitPat :: Char -> OutPat id Source

mkNilPat :: Type -> OutPat id Source

isStrictHsBind :: HsBind id -> Bool Source

looksLazyPatBind :: HsBind id -> Bool Source

isStrictLPat :: LPat id -> Bool Source

hsPatNeedsParens :: Pat a -> Bool Source

isIrrefutableHsPat :: OutputableBndr id => LPat id -> Bool Source

pprParendLPat :: OutputableBndr name => LPat name -> SDoc Source