Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Pat p
- = WildPat (XWildPat p)
- | VarPat (XVarPat p) (LIdP p)
- | LazyPat (XLazyPat p) (LPat p)
- | AsPat (XAsPat p) (LIdP p) (LPat p)
- | ParPat (XParPat p) !(LHsToken "(" p) (LPat p) !(LHsToken ")" p)
- | BangPat (XBangPat p) (LPat p)
- | ListPat (XListPat p) [LPat p]
- | TuplePat (XTuplePat p) [LPat p] Boxity
- | SumPat (XSumPat p) (LPat p) ConTag Arity
- | ConPat {
- pat_con_ext :: XConPat p
- pat_con :: XRec p (ConLikeP p)
- pat_args :: HsConPatDetails p
- | ViewPat (XViewPat p) (LHsExpr p) (LPat p)
- | SplicePat (XSplicePat p) (HsSplice p)
- | LitPat (XLitPat p) (HsLit p)
- | NPat (XNPat p) (XRec p (HsOverLit p)) (Maybe (SyntaxExpr p)) (SyntaxExpr p)
- | NPlusKPat (XNPlusKPat p) (LIdP p) (XRec p (HsOverLit p)) (HsOverLit p) (SyntaxExpr p) (SyntaxExpr p)
- | SigPat (XSigPat p) (LPat p) (HsPatSigType (NoGhcTc p))
- | XPat !(XXPat p)
- type LPat p = XRec p (Pat p)
- data EpAnnSumPat = EpAnnSumPat {}
- data ConPatTc = ConPatTc {}
- type family ConLikeP x
- data HsPatExpansion a b = HsPatExpanded a b
- data XXPatGhcTc
- type HsConPatDetails p = HsConDetails (HsPatSigType (NoGhcTc p)) (LPat p) (HsRecFields p (LPat p))
- hsConPatArgs :: forall p. UnXRec p => HsConPatDetails p -> [LPat p]
- data HsRecFields p arg = HsRecFields {
- rec_flds :: [LHsRecField p arg]
- rec_dotdot :: Maybe (Located Int)
- data HsFieldBind lhs rhs = HsFieldBind {}
- type LHsFieldBind p id arg = XRec p (HsFieldBind id arg)
- type HsRecField p arg = HsFieldBind (LFieldOcc p) arg
- type LHsRecField p arg = XRec p (HsRecField p arg)
- type HsRecUpdField p = HsFieldBind (LAmbiguousFieldOcc p) (LHsExpr p)
- type LHsRecUpdField p = XRec p (HsRecUpdField p)
- hsRecFields :: forall p arg. UnXRec p => HsRecFields p arg -> [XCFieldOcc p]
- hsRecFieldSel :: forall p arg. UnXRec p => HsRecField p arg -> XCFieldOcc p
- hsRecFieldId :: HsRecField GhcTc arg -> Id
- hsRecFieldsArgs :: forall p arg. UnXRec p => HsRecFields p arg -> [arg]
- hsRecUpdFieldId :: HsFieldBind (LAmbiguousFieldOcc GhcTc) arg -> Located Id
- hsRecUpdFieldOcc :: HsFieldBind (LAmbiguousFieldOcc GhcTc) arg -> LFieldOcc GhcTc
- hsRecUpdFieldRdr :: HsRecUpdField (GhcPass p) -> Located RdrName
- mkPrefixConPat :: DataCon -> [LPat GhcTc] -> [Type] -> LPat GhcTc
- mkCharLitPat :: SourceText -> Char -> LPat GhcTc
- mkNilPat :: Type -> LPat GhcTc
- isSimplePat :: LPat (GhcPass x) -> Maybe (IdP (GhcPass x))
- looksLazyPatBind :: HsBind GhcTc -> Bool
- isBangedLPat :: LPat (GhcPass p) -> Bool
- gParPat :: LPat (GhcPass pass) -> Pat (GhcPass pass)
- patNeedsParens :: forall p. IsPass p => PprPrec -> Pat (GhcPass p) -> Bool
- parenthesizePat :: IsPass p => PprPrec -> LPat (GhcPass p) -> LPat (GhcPass p)
- isIrrefutableHsPat :: forall p. OutputableBndrId p => DynFlags -> LPat (GhcPass p) -> Bool
- collectEvVarsPat :: Pat GhcTc -> Bag EvVar
- collectEvVarsPats :: [Pat GhcTc] -> Bag EvVar
- pprParendLPat :: OutputableBndrId p => PprPrec -> LPat (GhcPass p) -> SDoc
- pprConArgs :: (OutputableBndrId p, Outputable (Anno (IdGhcP p))) => HsConPatDetails (GhcPass p) -> SDoc
- pprLPat :: OutputableBndrId p => LPat (GhcPass p) -> SDoc
Documentation
Pattern
WildPat (XWildPat p) | Wildcard Pattern The sole reason for a type on a WildPat is to support hsPatType :: Pat Id -> Type |
VarPat (XVarPat p) (LIdP p) | Variable Pattern |
LazyPat (XLazyPat p) (LPat p) | Lazy Pattern
^ - |
AsPat (XAsPat p) (LIdP p) (LPat p) | As pattern
^ - |
ParPat | |
BangPat (XBangPat p) (LPat p) | Bang pattern
^ - |
ListPat (XListPat p) [LPat p] | Syntactic List
|
TuplePat (XTuplePat p) [LPat p] Boxity | Tuple sub-patterns
|
SumPat (XSumPat p) (LPat p) ConTag Arity | Anonymous sum pattern
|
ConPat | Constructor Pattern |
| |
ViewPat | |
SplicePat |
|
| |
LitPat (XLitPat p) (HsLit p) | Literal Pattern Used for *non-overloaded* literal patterns: Int#, Char#, Int, Char, String, etc. |
NPat (XNPat p) (XRec p (HsOverLit p)) (Maybe (SyntaxExpr p)) (SyntaxExpr p) | Natural Pattern |
NPlusKPat (XNPlusKPat p) (LIdP p) (XRec p (HsOverLit p)) (HsOverLit p) (SyntaxExpr p) (SyntaxExpr p) | n+k pattern |
SigPat | |
| |
XPat !(XXPat p) |
Instances
Data (Pat GhcPs) Source # | |
Defined in GHC.Hs.Instances gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pat GhcPs -> c (Pat GhcPs) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Pat GhcPs) # toConstr :: Pat GhcPs -> Constr # dataTypeOf :: Pat GhcPs -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Pat GhcPs)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Pat GhcPs)) # gmapT :: (forall b. Data b => b -> b) -> Pat GhcPs -> Pat GhcPs # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pat GhcPs -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pat GhcPs -> r # gmapQ :: (forall d. Data d => d -> u) -> Pat GhcPs -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Pat GhcPs -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pat GhcPs -> m (Pat GhcPs) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pat GhcPs -> m (Pat GhcPs) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pat GhcPs -> m (Pat GhcPs) # | |
Data (Pat GhcRn) Source # | |
Defined in GHC.Hs.Instances gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pat GhcRn -> c (Pat GhcRn) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Pat GhcRn) # toConstr :: Pat GhcRn -> Constr # dataTypeOf :: Pat GhcRn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Pat GhcRn)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Pat GhcRn)) # gmapT :: (forall b. Data b => b -> b) -> Pat GhcRn -> Pat GhcRn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pat GhcRn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pat GhcRn -> r # gmapQ :: (forall d. Data d => d -> u) -> Pat GhcRn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Pat GhcRn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pat GhcRn -> m (Pat GhcRn) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pat GhcRn -> m (Pat GhcRn) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pat GhcRn -> m (Pat GhcRn) # | |
Data (Pat GhcTc) Source # | |
Defined in GHC.Hs.Instances gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pat GhcTc -> c (Pat GhcTc) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Pat GhcTc) # toConstr :: Pat GhcTc -> Constr # dataTypeOf :: Pat GhcTc -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Pat GhcTc)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Pat GhcTc)) # gmapT :: (forall b. Data b => b -> b) -> Pat GhcTc -> Pat GhcTc # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pat GhcTc -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pat GhcTc -> r # gmapQ :: (forall d. Data d => d -> u) -> Pat GhcTc -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Pat GhcTc -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pat GhcTc -> m (Pat GhcTc) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pat GhcTc -> m (Pat GhcTc) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pat GhcTc -> m (Pat GhcTc) # | |
OutputableBndrId p => Outputable (Pat (GhcPass p)) Source # | |
type Anno (Pat (GhcPass p)) Source # | |
Defined in GHC.Hs.Pat |
data EpAnnSumPat Source #
EpAnnSumPat | |
|
Instances
Data EpAnnSumPat Source # | |
Defined in GHC.Hs.Pat gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EpAnnSumPat -> c EpAnnSumPat # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EpAnnSumPat # toConstr :: EpAnnSumPat -> Constr # dataTypeOf :: EpAnnSumPat -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EpAnnSumPat) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EpAnnSumPat) # gmapT :: (forall b. Data b => b -> b) -> EpAnnSumPat -> EpAnnSumPat # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EpAnnSumPat -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EpAnnSumPat -> r # gmapQ :: (forall d. Data d => d -> u) -> EpAnnSumPat -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EpAnnSumPat -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EpAnnSumPat -> m EpAnnSumPat # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EpAnnSumPat -> m EpAnnSumPat # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EpAnnSumPat -> m EpAnnSumPat # |
This is the extension field for ConPat, added after typechecking It adds quite a few extra fields, to support elaboration of pattern matching.
ConPatTc | |
|
Instances
Data ConPatTc Source # | |
Defined in GHC.Hs.Instances gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConPatTc -> c ConPatTc # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ConPatTc # toConstr :: ConPatTc -> Constr # dataTypeOf :: ConPatTc -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ConPatTc) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConPatTc) # gmapT :: (forall b. Data b => b -> b) -> ConPatTc -> ConPatTc # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConPatTc -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConPatTc -> r # gmapQ :: (forall d. Data d => d -> u) -> ConPatTc -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ConPatTc -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConPatTc -> m ConPatTc # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConPatTc -> m ConPatTc # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConPatTc -> m ConPatTc # |
data HsPatExpansion a b Source #
HsPatExpanded a b |
Instances
(Data a, Data b) => Data (HsPatExpansion a b) Source # | |
Defined in GHC.Hs.Pat gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> HsPatExpansion a b -> c (HsPatExpansion a b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsPatExpansion a b) # toConstr :: HsPatExpansion a b -> Constr # dataTypeOf :: HsPatExpansion a b -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsPatExpansion a b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsPatExpansion a b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> HsPatExpansion a b -> HsPatExpansion a b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsPatExpansion a b -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsPatExpansion a b -> r # gmapQ :: (forall d. Data d => d -> u) -> HsPatExpansion a b -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsPatExpansion a b -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsPatExpansion a b -> m (HsPatExpansion a b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsPatExpansion a b -> m (HsPatExpansion a b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsPatExpansion a b -> m (HsPatExpansion a b) # | |
(Outputable a, Outputable b) => Outputable (HsPatExpansion a b) Source # | |
Defined in GHC.Hs.Pat ppr :: HsPatExpansion a b -> SDoc Source # |
data XXPatGhcTc Source #
Extension constructor for Pat, added after typechecking.
CoPat | Coercion Pattern (translation only) During desugaring a (CoPat co pat) turns into a cast with |
| |
ExpansionPat (Pat GhcRn) (Pat GhcTc) | Pattern expansion: original pattern, and desugared pattern, for RebindableSyntax and other overloaded syntax such as OverloadedLists. See Note [Rebindable syntax and HsExpansion]. |
Instances
Data XXPatGhcTc Source # | |
Defined in GHC.Hs.Instances gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> XXPatGhcTc -> c XXPatGhcTc # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c XXPatGhcTc # toConstr :: XXPatGhcTc -> Constr # dataTypeOf :: XXPatGhcTc -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c XXPatGhcTc) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c XXPatGhcTc) # gmapT :: (forall b. Data b => b -> b) -> XXPatGhcTc -> XXPatGhcTc # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> XXPatGhcTc -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> XXPatGhcTc -> r # gmapQ :: (forall d. Data d => d -> u) -> XXPatGhcTc -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> XXPatGhcTc -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> XXPatGhcTc -> m XXPatGhcTc # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> XXPatGhcTc -> m XXPatGhcTc # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> XXPatGhcTc -> m XXPatGhcTc # |
type HsConPatDetails p = HsConDetails (HsPatSigType (NoGhcTc p)) (LPat p) (HsRecFields p (LPat p)) Source #
Haskell Constructor Pattern Details
hsConPatArgs :: forall p. UnXRec p => HsConPatDetails p -> [LPat p] Source #
data HsRecFields p arg Source #
Haskell Record Fields
HsRecFields is used only for patterns and expressions (not data type declarations)
HsRecFields | |
|
Instances
Data body => Data (HsRecFields GhcPs body) Source # | |
Defined in GHC.Hs.Instances gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsRecFields GhcPs body -> c (HsRecFields GhcPs body) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsRecFields GhcPs body) # toConstr :: HsRecFields GhcPs body -> Constr # dataTypeOf :: HsRecFields GhcPs body -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsRecFields GhcPs body)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsRecFields GhcPs body)) # gmapT :: (forall b. Data b => b -> b) -> HsRecFields GhcPs body -> HsRecFields GhcPs body # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsRecFields GhcPs body -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsRecFields GhcPs body -> r # gmapQ :: (forall d. Data d => d -> u) -> HsRecFields GhcPs body -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsRecFields GhcPs body -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsRecFields GhcPs body -> m (HsRecFields GhcPs body) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsRecFields GhcPs body -> m (HsRecFields GhcPs body) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsRecFields GhcPs body -> m (HsRecFields GhcPs body) # | |
Data body => Data (HsRecFields GhcRn body) Source # | |
Defined in GHC.Hs.Instances gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsRecFields GhcRn body -> c (HsRecFields GhcRn body) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsRecFields GhcRn body) # toConstr :: HsRecFields GhcRn body -> Constr # dataTypeOf :: HsRecFields GhcRn body -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsRecFields GhcRn body)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsRecFields GhcRn body)) # gmapT :: (forall b. Data b => b -> b) -> HsRecFields GhcRn body -> HsRecFields GhcRn body # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsRecFields GhcRn body -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsRecFields GhcRn body -> r # gmapQ :: (forall d. Data d => d -> u) -> HsRecFields GhcRn body -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsRecFields GhcRn body -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsRecFields GhcRn body -> m (HsRecFields GhcRn body) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsRecFields GhcRn body -> m (HsRecFields GhcRn body) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsRecFields GhcRn body -> m (HsRecFields GhcRn body) # | |
Data body => Data (HsRecFields GhcTc body) Source # | |
Defined in GHC.Hs.Instances gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsRecFields GhcTc body -> c (HsRecFields GhcTc body) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsRecFields GhcTc body) # toConstr :: HsRecFields GhcTc body -> Constr # dataTypeOf :: HsRecFields GhcTc body -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsRecFields GhcTc body)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsRecFields GhcTc body)) # gmapT :: (forall b. Data b => b -> b) -> HsRecFields GhcTc body -> HsRecFields GhcTc body # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsRecFields GhcTc body -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsRecFields GhcTc body -> r # gmapQ :: (forall d. Data d => d -> u) -> HsRecFields GhcTc body -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsRecFields GhcTc body -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsRecFields GhcTc body -> m (HsRecFields GhcTc body) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsRecFields GhcTc body -> m (HsRecFields GhcTc body) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsRecFields GhcTc body -> m (HsRecFields GhcTc body) # | |
(Outputable arg, Outputable (XRec p (HsRecField p arg))) => Outputable (HsRecFields p arg) Source # | |
Defined in Language.Haskell.Syntax.Pat ppr :: HsRecFields p arg -> SDoc Source # |
data HsFieldBind lhs rhs Source #
Haskell Field Binding
For details on above see Note [exact print annotations] in GHC.Parser.Annotation
Instances
Foldable (HsFieldBind lhs) Source # | |
Defined in Language.Haskell.Syntax.Pat fold :: Monoid m => HsFieldBind lhs m -> m # foldMap :: Monoid m => (a -> m) -> HsFieldBind lhs a -> m # foldMap' :: Monoid m => (a -> m) -> HsFieldBind lhs a -> m # foldr :: (a -> b -> b) -> b -> HsFieldBind lhs a -> b # foldr' :: (a -> b -> b) -> b -> HsFieldBind lhs a -> b # foldl :: (b -> a -> b) -> b -> HsFieldBind lhs a -> b # foldl' :: (b -> a -> b) -> b -> HsFieldBind lhs a -> b # foldr1 :: (a -> a -> a) -> HsFieldBind lhs a -> a # foldl1 :: (a -> a -> a) -> HsFieldBind lhs a -> a # toList :: HsFieldBind lhs a -> [a] # null :: HsFieldBind lhs a -> Bool # length :: HsFieldBind lhs a -> Int # elem :: Eq a => a -> HsFieldBind lhs a -> Bool # maximum :: Ord a => HsFieldBind lhs a -> a # minimum :: Ord a => HsFieldBind lhs a -> a # sum :: Num a => HsFieldBind lhs a -> a # product :: Num a => HsFieldBind lhs a -> a # | |
Traversable (HsFieldBind lhs) Source # | |
Defined in Language.Haskell.Syntax.Pat traverse :: Applicative f => (a -> f b) -> HsFieldBind lhs a -> f (HsFieldBind lhs b) # sequenceA :: Applicative f => HsFieldBind lhs (f a) -> f (HsFieldBind lhs a) # mapM :: Monad m => (a -> m b) -> HsFieldBind lhs a -> m (HsFieldBind lhs b) # sequence :: Monad m => HsFieldBind lhs (m a) -> m (HsFieldBind lhs a) # | |
Functor (HsFieldBind lhs) Source # | |
Defined in Language.Haskell.Syntax.Pat fmap :: (a -> b) -> HsFieldBind lhs a -> HsFieldBind lhs b # (<$) :: a -> HsFieldBind lhs b -> HsFieldBind lhs a # | |
(Data a, Data b) => Data (HsFieldBind a b) Source # | |
Defined in GHC.Hs.Instances gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> HsFieldBind a b -> c (HsFieldBind a b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsFieldBind a b) # toConstr :: HsFieldBind a b -> Constr # dataTypeOf :: HsFieldBind a b -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsFieldBind a b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsFieldBind a b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> HsFieldBind a b -> HsFieldBind a b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsFieldBind a b -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsFieldBind a b -> r # gmapQ :: (forall d. Data d => d -> u) -> HsFieldBind a b -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsFieldBind a b -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsFieldBind a b -> m (HsFieldBind a b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsFieldBind a b -> m (HsFieldBind a b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsFieldBind a b -> m (HsFieldBind a b) # | |
(Outputable p, OutputableBndr p, Outputable arg) => Outputable (HsFieldBind p arg) Source # | |
Defined in Language.Haskell.Syntax.Pat ppr :: HsFieldBind p arg -> SDoc Source # | |
type Anno (HsFieldBind lhs rhs) Source # | |
Defined in GHC.Hs.Pat |
type LHsFieldBind p id arg = XRec p (HsFieldBind id arg) Source #
Located Haskell Record Field
type HsRecField p arg = HsFieldBind (LFieldOcc p) arg Source #
Haskell Record Field
type LHsRecField p arg = XRec p (HsRecField p arg) Source #
Located Haskell Record Field
type HsRecUpdField p = HsFieldBind (LAmbiguousFieldOcc p) (LHsExpr p) Source #
Haskell Record Update Field
type LHsRecUpdField p = XRec p (HsRecUpdField p) Source #
Located Haskell Record Update Field
hsRecFields :: forall p arg. UnXRec p => HsRecFields p arg -> [XCFieldOcc p] Source #
hsRecFieldSel :: forall p arg. UnXRec p => HsRecField p arg -> XCFieldOcc p Source #
hsRecFieldId :: HsRecField GhcTc arg -> Id Source #
hsRecFieldsArgs :: forall p arg. UnXRec p => HsRecFields p arg -> [arg] Source #
hsRecUpdFieldId :: HsFieldBind (LAmbiguousFieldOcc GhcTc) arg -> Located Id Source #
hsRecUpdFieldOcc :: HsFieldBind (LAmbiguousFieldOcc GhcTc) arg -> LFieldOcc GhcTc Source #
hsRecUpdFieldRdr :: HsRecUpdField (GhcPass p) -> Located RdrName Source #
mkCharLitPat :: SourceText -> Char -> LPat GhcTc Source #
isSimplePat :: LPat (GhcPass x) -> Maybe (IdP (GhcPass x)) Source #
Is the pattern any of combination of:
- (pat)
- pat :: Type
- ~pat
- !pat
- x (variable)
gParPat :: LPat (GhcPass pass) -> Pat (GhcPass pass) Source #
Parenthesize a pattern without token information
patNeedsParens :: forall p. IsPass p => PprPrec -> Pat (GhcPass p) -> Bool Source #
returns patNeedsParens
p patTrue
if the pattern pat
needs
parentheses under precedence p
.
parenthesizePat :: IsPass p => PprPrec -> LPat (GhcPass p) -> LPat (GhcPass p) Source #
checks if parenthesizePat
p pat
is true, and
if so, surrounds patNeedsParens
p patpat
with a ParPat
. Otherwise, it simply returns pat
.
isIrrefutableHsPat :: forall p. OutputableBndrId p => DynFlags -> LPat (GhcPass p) -> Bool Source #
pprParendLPat :: OutputableBndrId p => PprPrec -> LPat (GhcPass p) -> SDoc Source #
pprConArgs :: (OutputableBndrId p, Outputable (Anno (IdGhcP p))) => HsConPatDetails (GhcPass p) -> SDoc Source #