ghc-7.0.3: The GHC API

HsPat

# Documentation

data Pat id

Constructors

WildPat PostTcType |
VarPat id |
VarPatOut id TcEvBinds |
LazyPat (LPat id) |
AsPat (Located id) (LPat id) |
ParPat (LPat id) |
BangPat (LPat id) |
ListPat [LPat id] PostTcType |
TuplePat [LPat id] Boxity PostTcType |
PArrPat [LPat id] PostTcType |
ConPatIn (Located id) (HsConPatDetails id) |
ConPatOut |

Fields

pat_con :: Located DataCon
pat_tvs :: [TyVar]
pat_dicts :: [EvVar]
pat_binds :: TcEvBinds
pat_args :: HsConPatDetails id
pat_ty :: Type

ViewPat (LHsExpr id) (LPat id) PostTcType |
QuasiQuotePat (HsQuasiQuote id) |
LitPat HsLit |
NPat (HsOverLit id) (Maybe (SyntaxExpr id)) (SyntaxExpr id) |
NPlusKPat (Located id) (HsOverLit id) (SyntaxExpr id) (SyntaxExpr id) |
TypePat (LHsType id) |
SigPatIn (LPat id) (LHsType id) |
SigPatOut (LPat id) Type |
CoPat HsWrapper (Pat id) Type |

Instances

Typeable1 Pat |
Data id => Data (Pat id) |
OutputableBndr name => Outputable (Pat name) |

type InPat id = LPat id

type OutPat id = LPat id

type LPat id = Located (Pat id)

data HsConDetails arg rec

Constructors

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

Instances

Typeable2 HsConDetails |
(Data arg, Data rec) => Data (HsConDetails arg rec) |

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

hsConPatArgs :: HsConPatDetails id -> [LPat id]

data HsRecFields id arg

Constructors

HsRecFields |

Fields

rec_flds :: [HsRecField id arg]
rec_dotdot :: Maybe Int

Instances

Typeable2 HsRecFields |
(Data id, Data arg) => Data (HsRecFields id arg) |
(OutputableBndr id, Outputable arg) => Outputable (HsRecFields id arg) |

data HsRecField id arg

Constructors

HsRecField |

Fields

hsRecFieldId :: Located id
hsRecFieldArg :: arg
hsRecPun :: Bool

Instances

Typeable2 HsRecField |
(Data id, Data arg) => Data (HsRecField id arg) |
(OutputableBndr id, Outputable arg) => Outputable (HsRecField id arg) |

hsRecFields :: HsRecFields id arg -> [id]

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

mkCharLitPat :: Char -> OutPat id

mkNilPat :: Type -> OutPat id

isBangHsBind :: HsBind id -> Bool

isBangLPat :: LPat id -> Bool

hsPatNeedsParens :: Pat a -> Bool

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

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