GHC.Parser.PostProcess

ghc-9.0.2: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Parser.PostProcess

Synopsis

- mkHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> HsExpr GhcPs
- mkHsIntegral :: IntegralLit -> HsOverLit GhcPs
- mkHsFractional :: FractionalLit -> HsOverLit GhcPs
- mkHsIsString :: SourceText -> FastString -> HsOverLit GhcPs
- mkHsDo :: HsStmtContext GhcRn -> [ExprLStmt GhcPs] -> HsExpr GhcPs
- mkSpliceDecl :: LHsExpr GhcPs -> HsDecl GhcPs
- mkRoleAnnotDecl :: SrcSpan -> Located RdrName -> [Located (Maybe FastString)] -> P (LRoleAnnotDecl GhcPs)
- mkClassDecl :: SrcSpan -> Located (Maybe (LHsContext GhcPs), LHsType GhcPs) -> Located (a, [LHsFunDep GhcPs]) -> OrdList (LHsDecl GhcPs) -> LayoutInfo -> P (LTyClDecl GhcPs)
- mkTyData :: SrcSpan -> NewOrData -> Maybe (Located CType) -> Located (Maybe (LHsContext GhcPs), LHsType GhcPs) -> Maybe (LHsKind GhcPs) -> [LConDecl GhcPs] -> HsDeriving GhcPs -> P (LTyClDecl GhcPs)
- mkDataFamInst :: SrcSpan -> NewOrData -> Maybe (Located CType) -> (Maybe (LHsContext GhcPs), Maybe [LHsTyVarBndr () GhcPs], LHsType GhcPs) -> Maybe (LHsKind GhcPs) -> [LConDecl GhcPs] -> HsDeriving GhcPs -> P (LInstDecl GhcPs)
- mkTySynonym :: SrcSpan -> LHsType GhcPs -> LHsType GhcPs -> P (LTyClDecl GhcPs)
- mkTyFamInstEqn :: Maybe [LHsTyVarBndr () GhcPs] -> LHsType GhcPs -> LHsType GhcPs -> P (TyFamInstEqn GhcPs, [AddAnn])
- mkStandaloneKindSig :: SrcSpan -> Located [Located RdrName] -> LHsKind GhcPs -> P (LStandaloneKindSig GhcPs)
- mkTyFamInst :: SrcSpan -> TyFamInstEqn GhcPs -> P (LInstDecl GhcPs)
- mkFamDecl :: SrcSpan -> FamilyInfo GhcPs -> LHsType GhcPs -> Located (FamilyResultSig GhcPs) -> Maybe (LInjectivityAnn GhcPs) -> P (LTyClDecl GhcPs)
- mkLHsSigType :: LHsType GhcPs -> LHsSigType GhcPs
- mkInlinePragma :: SourceText -> (InlineSpec, RuleMatchInfo) -> Maybe Activation -> InlinePragma
- mkPatSynMatchGroup :: Located RdrName -> Located (OrdList (LHsDecl GhcPs)) -> P (MatchGroup GhcPs (LHsExpr GhcPs))
- mkRecConstrOrUpdate :: LHsExpr GhcPs -> SrcSpan -> ([LHsRecField GhcPs (LHsExpr GhcPs)], Maybe SrcSpan) -> PV (HsExpr GhcPs)
- mkTyClD :: LTyClDecl (GhcPass p) -> LHsDecl (GhcPass p)
- mkInstD :: LInstDecl (GhcPass p) -> LHsDecl (GhcPass p)
- mkRdrRecordCon :: Located RdrName -> HsRecordBinds GhcPs -> HsExpr GhcPs
- mkRdrRecordUpd :: LHsExpr GhcPs -> [LHsRecUpdField GhcPs] -> HsExpr GhcPs
- setRdrNameSpace :: RdrName -> NameSpace -> RdrName
- filterCTuple :: RdrName -> RdrName
- fromSpecTyVarBndr :: LHsTyVarBndr Specificity GhcPs -> P (LHsTyVarBndr () GhcPs)
- fromSpecTyVarBndrs :: [LHsTyVarBndr Specificity GhcPs] -> P [LHsTyVarBndr () GhcPs]
- cvBindGroup :: OrdList (LHsDecl GhcPs) -> P (HsValBinds GhcPs)
- cvBindsAndSigs :: OrdList (LHsDecl GhcPs) -> P (LHsBinds GhcPs, [LSig GhcPs], [LFamilyDecl GhcPs], [LTyFamInstDecl GhcPs], [LDataFamInstDecl GhcPs], [LDocDecl])
- cvTopDecls :: OrdList (LHsDecl GhcPs) -> [LHsDecl GhcPs]
- placeHolderPunRhs :: DisambECP b => PV (Located b)
- mkImport :: Located CCallConv -> Located Safety -> (Located StringLiteral, Located RdrName, LHsSigType GhcPs) -> P (HsDecl GhcPs)
- parseCImport :: Located CCallConv -> Located Safety -> FastString -> String -> Located SourceText -> Maybe ForeignImport
- mkExport :: Located CCallConv -> (Located StringLiteral, Located RdrName, LHsSigType GhcPs) -> P (HsDecl GhcPs)
- mkExtName :: RdrName -> CLabelString
- mkGadtDecl :: [Located RdrName] -> LHsType GhcPs -> P (ConDecl GhcPs, [AddAnn])
- mkConDeclH98 :: Located RdrName -> Maybe [LHsTyVarBndr Specificity GhcPs] -> Maybe (LHsContext GhcPs) -> HsConDeclDetails GhcPs -> ConDecl GhcPs
- checkImportDecl :: Maybe (Located Token) -> Maybe (Located Token) -> P ()
- checkExpBlockArguments :: LHsExpr GhcPs -> PV ()
- checkCmdBlockArguments :: LHsCmd GhcPs -> PV ()
- checkPrecP :: Located (SourceText, Int) -> Located (OrdList (Located RdrName)) -> P ()
- checkContext :: LHsType GhcPs -> P ([AddAnn], LHsContext GhcPs)
- checkPattern :: Located (PatBuilder GhcPs) -> P (LPat GhcPs)
- checkPattern_msg :: SDoc -> PV (Located (PatBuilder GhcPs)) -> P (LPat GhcPs)
- checkMonadComp :: PV (HsStmtContext GhcRn)
- checkValDef :: Located (PatBuilder GhcPs) -> Maybe (LHsType GhcPs) -> Located (a, GRHSs GhcPs (LHsExpr GhcPs)) -> P ([AddAnn], HsBind GhcPs)
- checkValSigLhs :: LHsExpr GhcPs -> P (Located RdrName)
- type LRuleTyTmVar = Located RuleTyTmVar
- data RuleTyTmVar = RuleTyTmVar (Located RdrName) (Maybe (LHsType GhcPs))
- mkRuleBndrs :: [LRuleTyTmVar] -> [LRuleBndr GhcPs]
- mkRuleTyVarBndrs :: [LRuleTyTmVar] -> [LHsTyVarBndr () GhcPs]
- checkRuleTyVarBndrNames :: [LHsTyVarBndr flag GhcPs] -> P ()
- checkRecordSyntax :: (MonadP m, Outputable a) => Located a -> m (Located a)
- checkEmptyGADTs :: Located ([AddAnn], [LConDecl GhcPs]) -> P (Located ([AddAnn], [LConDecl GhcPs]))
- addFatalError :: MonadP m => SrcSpan -> SDoc -> m a
- hintBangPat :: SrcSpan -> Pat GhcPs -> PV ()
- data TyEl
  - = TyElOpr RdrName
  - | TyElOpd (HsType GhcPs)
  - | TyElKindApp SrcSpan (LHsType GhcPs)
  - | TyElUnpackedness ([AddAnn], SourceText, SrcUnpackedness)
- mergeOps :: [Located TyEl] -> P (LHsType GhcPs)
- mergeDataCon :: [Located TyEl] -> P (Located RdrName, HsConDeclDetails GhcPs)
- mkBangTy :: SrcStrictness -> LHsType GhcPs -> HsType GhcPs
- mkMultTy :: IsUnicodeSyntax -> Located Token -> LHsType GhcPs -> (HsArrow GhcPs, AddAnn)
- data ImpExpSubSpec
  - = ImpExpAbs
  - | ImpExpAll
  - | ImpExpList [Located ImpExpQcSpec]
  - | ImpExpAllWith [Located ImpExpQcSpec]
- data ImpExpQcSpec
  - = ImpExpQcName (Located RdrName)
  - | ImpExpQcType (Located RdrName)
  - | ImpExpQcWildcard
- mkModuleImpExp :: Located ImpExpQcSpec -> ImpExpSubSpec -> P (IE GhcPs)
- mkTypeImpExp :: Located RdrName -> P (Located RdrName)
- mkImpExpSubSpec :: [Located ImpExpQcSpec] -> P ([AddAnn], ImpExpSubSpec)
- checkImportSpec :: Located [LIE GhcPs] -> P (Located [LIE GhcPs])
- forallSym :: Bool -> String
- starSym :: Bool -> String
- warnStarIsType :: SrcSpan -> P ()
- warnPrepositiveQualifiedModule :: SrcSpan -> P ()
- failOpFewArgs :: Located RdrName -> P a
- failOpNotEnabledImportQualifiedPost :: SrcSpan -> P ()
- failOpImportQualifiedTwice :: SrcSpan -> P ()
- data SumOrTuple b
  - = Sum ConTag Arity (Located b)
  - | Tuple [Located (Maybe (Located b))]
- data PV a
- runPV :: PV a -> P a
- newtype ECP = ECP {
  - runECP_PV :: forall b. DisambECP b => PV (Located b)
  }
- runECP_P :: DisambECP b => ECP -> P (Located b)
- class DisambInfixOp b where
  - mkHsVarOpPV :: Located RdrName -> PV (Located b)
  - mkHsConOpPV :: Located RdrName -> PV (Located b)
  - mkHsInfixHolePV :: SrcSpan -> PV (Located b)
- class b ~ Body b GhcPs => DisambECP b where
  - type Body b :: Type -> Type
  - type InfixOp b
  - type FunArg b
  - ecpFromCmd' :: LHsCmd GhcPs -> PV (Located b)
  - ecpFromExp' :: LHsExpr GhcPs -> PV (Located b)
  - mkHsLamPV :: SrcSpan -> MatchGroup GhcPs (Located b) -> PV (Located b)
  - mkHsLetPV :: SrcSpan -> LHsLocalBinds GhcPs -> Located b -> PV (Located b)
  - superInfixOp :: (DisambInfixOp (InfixOp b) => PV (Located b)) -> PV (Located b)
  - mkHsOpAppPV :: SrcSpan -> Located b -> Located (InfixOp b) -> Located b -> PV (Located b)
  - mkHsCasePV :: SrcSpan -> LHsExpr GhcPs -> MatchGroup GhcPs (Located b) -> PV (Located b)
  - mkHsLamCasePV :: SrcSpan -> MatchGroup GhcPs (Located b) -> PV (Located b)
  - superFunArg :: (DisambECP (FunArg b) => PV (Located b)) -> PV (Located b)
  - mkHsAppPV :: SrcSpan -> Located b -> Located (FunArg b) -> PV (Located b)
  - mkHsAppTypePV :: SrcSpan -> Located b -> LHsType GhcPs -> PV (Located b)
  - mkHsIfPV :: SrcSpan -> LHsExpr GhcPs -> Bool -> Located b -> Bool -> Located b -> PV (Located b)
  - mkHsDoPV :: SrcSpan -> Maybe ModuleName -> Located [LStmt GhcPs (Located b)] -> PV (Located b)
  - mkHsParPV :: SrcSpan -> Located b -> PV (Located b)
  - mkHsVarPV :: Located RdrName -> PV (Located b)
  - mkHsLitPV :: Located (HsLit GhcPs) -> PV (Located b)
  - mkHsOverLitPV :: Located (HsOverLit GhcPs) -> PV (Located b)
  - mkHsWildCardPV :: SrcSpan -> PV (Located b)
  - mkHsTySigPV :: SrcSpan -> Located b -> LHsType GhcPs -> PV (Located b)
  - mkHsExplicitListPV :: SrcSpan -> [Located b] -> PV (Located b)
  - mkHsSplicePV :: Located (HsSplice GhcPs) -> PV (Located b)
  - mkHsRecordPV :: SrcSpan -> SrcSpan -> Located b -> ([LHsRecField GhcPs (Located b)], Maybe SrcSpan) -> PV (Located b)
  - mkHsNegAppPV :: SrcSpan -> Located b -> PV (Located b)
  - mkHsSectionR_PV :: SrcSpan -> Located (InfixOp b) -> Located b -> PV (Located b)
  - mkHsViewPatPV :: SrcSpan -> LHsExpr GhcPs -> Located b -> PV (Located b)
  - mkHsAsPatPV :: SrcSpan -> Located RdrName -> Located b -> PV (Located b)
  - mkHsLazyPatPV :: SrcSpan -> Located b -> PV (Located b)
  - mkHsBangPatPV :: SrcSpan -> Located b -> PV (Located b)
  - mkSumOrTuplePV :: SrcSpan -> Boxity -> SumOrTuple b -> PV (Located b)
  - rejectPragmaPV :: Located b -> PV ()
- ecpFromExp :: LHsExpr GhcPs -> ECP
- ecpFromCmd :: LHsCmd GhcPs -> ECP
- data PatBuilder p

# Documentation

mkHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> HsExpr GhcPs Source #

A useful function for building `OpApps`. The operator is always a variable, and we don't know the fixity yet.

mkHsIntegral :: IntegralLit -> HsOverLit GhcPs Source #

mkHsFractional :: FractionalLit -> HsOverLit GhcPs Source #

mkHsIsString :: SourceText -> FastString -> HsOverLit GhcPs Source #

mkHsDo :: HsStmtContext GhcRn -> [ExprLStmt GhcPs] -> HsExpr GhcPs Source #

mkSpliceDecl :: LHsExpr GhcPs -> HsDecl GhcPs Source #

mkRoleAnnotDecl :: SrcSpan -> Located RdrName -> [Located (Maybe FastString)] -> P (LRoleAnnotDecl GhcPs) Source #

mkClassDecl :: SrcSpan -> Located (Maybe (LHsContext GhcPs), LHsType GhcPs) -> Located (a, [LHsFunDep GhcPs]) -> OrdList (LHsDecl GhcPs) -> LayoutInfo -> P (LTyClDecl GhcPs) Source #

mkTyData :: SrcSpan -> NewOrData -> Maybe (Located CType) -> Located (Maybe (LHsContext GhcPs), LHsType GhcPs) -> Maybe (LHsKind GhcPs) -> [LConDecl GhcPs] -> HsDeriving GhcPs -> P (LTyClDecl GhcPs) Source #

mkDataFamInst :: SrcSpan -> NewOrData -> Maybe (Located CType) -> (Maybe (LHsContext GhcPs), Maybe [LHsTyVarBndr () GhcPs], LHsType GhcPs) -> Maybe (LHsKind GhcPs) -> [LConDecl GhcPs] -> HsDeriving GhcPs -> P (LInstDecl GhcPs) Source #

mkTySynonym :: SrcSpan -> LHsType GhcPs -> LHsType GhcPs -> P (LTyClDecl GhcPs) Source #

mkTyFamInstEqn :: Maybe [LHsTyVarBndr () GhcPs] -> LHsType GhcPs -> LHsType GhcPs -> P (TyFamInstEqn GhcPs, [AddAnn]) Source #

mkStandaloneKindSig :: SrcSpan -> Located [Located RdrName] -> LHsKind GhcPs -> P (LStandaloneKindSig GhcPs) Source #

mkTyFamInst :: SrcSpan -> TyFamInstEqn GhcPs -> P (LInstDecl GhcPs) Source #

mkFamDecl :: SrcSpan -> FamilyInfo GhcPs -> LHsType GhcPs -> Located (FamilyResultSig GhcPs) -> Maybe (LInjectivityAnn GhcPs) -> P (LTyClDecl GhcPs) Source #

mkLHsSigType :: LHsType GhcPs -> LHsSigType GhcPs Source #

mkInlinePragma :: SourceText -> (InlineSpec, RuleMatchInfo) -> Maybe Activation -> InlinePragma Source #

mkPatSynMatchGroup :: Located RdrName -> Located (OrdList (LHsDecl GhcPs)) -> P (MatchGroup GhcPs (LHsExpr GhcPs)) Source #

mkRecConstrOrUpdate :: LHsExpr GhcPs -> SrcSpan -> ([LHsRecField GhcPs (LHsExpr GhcPs)], Maybe SrcSpan) -> PV (HsExpr GhcPs) Source #

mkTyClD :: LTyClDecl (GhcPass p) -> LHsDecl (GhcPass p) Source #

mkClassDecl builds a RdrClassDecl, filling in the names for tycon and datacon by deriving them from the name of the class. We fill in the names for the tycon and datacon corresponding to the class, by deriving them from the name of the class itself. This saves recording the names in the interface file (which would be equally good).

mkInstD :: LInstDecl (GhcPass p) -> LHsDecl (GhcPass p) Source #

mkRdrRecordCon :: Located RdrName -> HsRecordBinds GhcPs -> HsExpr GhcPs Source #

mkRdrRecordUpd :: LHsExpr GhcPs -> [LHsRecUpdField GhcPs] -> HsExpr GhcPs Source #

setRdrNameSpace :: RdrName -> NameSpace -> RdrName Source #

This rather gruesome function is used mainly by the parser. When parsing:

    data T a = T | T1 Int

we parse the data constructors as types because of parser ambiguities, so then we need to change the type constr to a data constr

The exact-name case can occur when parsing:

    data [] a = [] | a : [a]

For the exact-name case we return an original name.

filterCTuple :: RdrName -> RdrName Source #

Replaces constraint tuple names with corresponding boxed ones.

fromSpecTyVarBndr :: LHsTyVarBndr Specificity GhcPs -> P (LHsTyVarBndr () GhcPs) Source #

Converts `LHsTyVarBndr` annotated with its `Specificity` to one without annotations. Only accepts specified variables, and errors if the provided binder has an `InferredSpec` annotation.

fromSpecTyVarBndrs :: [LHsTyVarBndr Specificity GhcPs] -> P [LHsTyVarBndr () GhcPs] Source #

Converts a list of `LHsTyVarBndr`s annotated with their `Specificity` to binders without annotations. Only accepts specified variables, and errors if any of the provided binders has an `InferredSpec` annotation.

cvBindGroup :: OrdList (LHsDecl GhcPs) -> P (HsValBinds GhcPs) Source #

cvBindsAndSigs :: OrdList (LHsDecl GhcPs) -> P (LHsBinds GhcPs, [LSig GhcPs], [LFamilyDecl GhcPs], [LTyFamInstDecl GhcPs], [LDataFamInstDecl GhcPs], [LDocDecl]) Source #

cvTopDecls :: OrdList (LHsDecl GhcPs) -> [LHsDecl GhcPs] Source #

Function definitions are restructured here. Each is assumed to be recursive initially, and non recursive definitions are discovered by the dependency analyser.

placeHolderPunRhs :: DisambECP b => PV (Located b) Source #

mkImport :: Located CCallConv -> Located Safety -> (Located StringLiteral, Located RdrName, LHsSigType GhcPs) -> P (HsDecl GhcPs) Source #

parseCImport :: Located CCallConv -> Located Safety -> FastString -> String -> Located SourceText -> Maybe ForeignImport Source #

mkExport :: Located CCallConv -> (Located StringLiteral, Located RdrName, LHsSigType GhcPs) -> P (HsDecl GhcPs) Source #

mkExtName :: RdrName -> CLabelString Source #

mkGadtDecl :: [Located RdrName] -> LHsType GhcPs -> P (ConDecl GhcPs, [AddAnn]) Source #

Construct a GADT-style data constructor from the constructor names and their type. Some interesting aspects of this function:

- This splits up the constructor type into its quantified type variables (if provided), context (if provided), argument types, and result type, and records whether this is a prefix or record GADT constructor. See Note [GADT abstract syntax] in GHC.Hs.Decls for more details.

mkConDeclH98 :: Located RdrName -> Maybe [LHsTyVarBndr Specificity GhcPs] -> Maybe (LHsContext GhcPs) -> HsConDeclDetails GhcPs -> ConDecl GhcPs Source #

checkImportDecl :: Maybe (Located Token) -> Maybe (Located Token) -> P () Source #

checkExpBlockArguments :: LHsExpr GhcPs -> PV () Source #

Yield a parse error if we have a function applied directly to a do block etc. and BlockArguments is not enabled.

checkCmdBlockArguments :: LHsCmd GhcPs -> PV () Source #

checkPrecP Source #

Arguments

:: Located (SourceText, Int) | precedence
-> Located (OrdList (Located RdrName)) | operators
-> P () |

Check if a fixity is valid. We support bypassing the usual bound checks for some special operators.

checkContext :: LHsType GhcPs -> P ([AddAnn], LHsContext GhcPs) Source #

Validate the context constraints and break up a context into a list of predicates.

        (Eq a, Ord b)        -->  [Eq a, Ord b]
        Eq a                 -->  [Eq a]
        (Eq a)               -->  [Eq a]
        (((Eq a)))           -->  [Eq a]

checkPattern :: Located (PatBuilder GhcPs) -> P (LPat GhcPs) Source #

checkPattern_msg :: SDoc -> PV (Located (PatBuilder GhcPs)) -> P (LPat GhcPs) Source #

checkMonadComp :: PV (HsStmtContext GhcRn) Source #

Check for monad comprehensions

If the flag MonadComprehensions is set, return a `MonadComp` context, otherwise use the usual `ListComp` context

checkValDef :: Located (PatBuilder GhcPs) -> Maybe (LHsType GhcPs) -> Located (a, GRHSs GhcPs (LHsExpr GhcPs)) -> P ([AddAnn], HsBind GhcPs) Source #

checkValSigLhs :: LHsExpr GhcPs -> P (Located RdrName) Source #

type LRuleTyTmVar = Located RuleTyTmVar Source #

data RuleTyTmVar Source #

Essentially a wrapper for a `RuleBndr GhcPs`

Constructors

RuleTyTmVar (Located RdrName) (Maybe (LHsType GhcPs)) |

mkRuleBndrs :: [LRuleTyTmVar] -> [LRuleBndr GhcPs] Source #

mkRuleTyVarBndrs :: [LRuleTyTmVar] -> [LHsTyVarBndr () GhcPs] Source #

checkRuleTyVarBndrNames :: [LHsTyVarBndr flag GhcPs] -> P () Source #

checkRecordSyntax :: (MonadP m, Outputable a) => Located a -> m (Located a) Source #

checkEmptyGADTs :: Located ([AddAnn], [LConDecl GhcPs]) -> P (Located ([AddAnn], [LConDecl GhcPs])) Source #

Check if the gadt_constrlist is empty. Only raise parse error for `data T where` to avoid affecting existing error message, see #8258.

addFatalError :: MonadP m => SrcSpan -> SDoc -> m a Source #

Add a fatal error. This will be the last error reported by the parser, and the parser will not produce any result, ending in a `PFailed` state.

hintBangPat :: SrcSpan -> Pat GhcPs -> PV () Source #

Hint about bang patterns, assuming `BangPatterns` is off.

data TyEl Source #

Either an operator or an operand.

Constructors

TyElOpr RdrName |
TyElOpd (HsType GhcPs) |
TyElKindApp SrcSpan (LHsType GhcPs) |
TyElUnpackedness ([AddAnn], SourceText, SrcUnpackedness) |

#### Instances

Instances details

Outputable TyEl Source # |
Instance details Defined in GHC.Parser.PostProcess Methods ppr :: TyEl -> SDoc Source # pprPrec :: Rational -> TyEl -> SDoc Source #

mergeOps :: [Located TyEl] -> P (LHsType GhcPs) Source #

Merge a reversed and non-empty soup of operators and operands into a type.

User input: `F x y + G a b * X` Input to `mergeOps`: [X, *, b, a, G, +, y, x, F] Output corresponds to what the user wrote assuming all operators are of the same fixity and right-associative.

It's a bit silly that we're doing it at all, as the renamer will have to rearrange this, and it'd be easier to keep things separate.

See Note [Parsing data constructors is hard]

mergeDataCon :: [Located TyEl] -> P (Located RdrName, HsConDeclDetails GhcPs) Source #

Merge a reversed and non-empty soup of operators and operands into a data constructor.

User input: `C !A B -- ^ doc` Input to `mergeDataCon`: ["doc", B, !A, C] Output: (C, PrefixCon [!A, B], "doc")

See Note [Parsing data constructors is hard]

mkBangTy :: SrcStrictness -> LHsType GhcPs -> HsType GhcPs Source #

mkMultTy :: IsUnicodeSyntax -> Located Token -> LHsType GhcPs -> (HsArrow GhcPs, AddAnn) Source #

data ImpExpSubSpec Source #

Constructors

ImpExpAbs |
ImpExpAll |
ImpExpList [Located ImpExpQcSpec] |
ImpExpAllWith [Located ImpExpQcSpec] |

data ImpExpQcSpec Source #

Constructors

ImpExpQcName (Located RdrName) |
ImpExpQcType (Located RdrName) |
ImpExpQcWildcard |

mkModuleImpExp :: Located ImpExpQcSpec -> ImpExpSubSpec -> P (IE GhcPs) Source #

mkTypeImpExp :: Located RdrName -> P (Located RdrName) Source #

mkImpExpSubSpec :: [Located ImpExpQcSpec] -> P ([AddAnn], ImpExpSubSpec) Source #

checkImportSpec :: Located [LIE GhcPs] -> P (Located [LIE GhcPs]) Source #

forallSym :: Bool -> String Source #

starSym :: Bool -> String Source #

warnStarIsType :: SrcSpan -> P () Source #

warnPrepositiveQualifiedModule :: SrcSpan -> P () Source #

failOpFewArgs :: Located RdrName -> P a Source #

failOpNotEnabledImportQualifiedPost :: SrcSpan -> P () Source #

failOpImportQualifiedTwice :: SrcSpan -> P () Source #

data SumOrTuple b Source #

Constructors

Sum ConTag Arity (Located b) |
Tuple [Located (Maybe (Located b))] |

data PV a Source #

#### Instances

Instances details

Applicative PV Source # |
Instance details Defined in GHC.Parser.PostProcess Methods pure :: a -> PV a Source # (<*>) :: PV (a -> b) -> PV a -> PV b Source # liftA2 :: (a -> b -> c) -> PV a -> PV b -> PV c Source # (*>) :: PV a -> PV b -> PV b Source # (<*) :: PV a -> PV b -> PV a Source #
Functor PV Source # |
Instance details Defined in GHC.Parser.PostProcess Methods fmap :: (a -> b) -> PV a -> PV b Source # (<$) :: a -> PV b -> PV a Source #
Monad PV Source # |
Instance details Defined in GHC.Parser.PostProcess Methods (>>=) :: PV a -> (a -> PV b) -> PV b Source # (>>) :: PV a -> PV b -> PV b Source # return :: a -> PV a Source #
MonadP PV Source # |
Instance details Defined in GHC.Parser.PostProcess Methods addError :: SrcSpan -> SDoc -> PV () Source # addWarning :: WarningFlag -> SrcSpan -> SDoc -> PV () Source # addFatalError :: SrcSpan -> SDoc -> PV a Source # getBit :: ExtBits -> PV Bool Source # addAnnotation :: SrcSpan -> AnnKeywordId -> SrcSpan -> PV () Source #

runPV :: PV a -> P a Source #

newtype ECP Source #

Constructors

ECP |
Fields runECP_PV :: forall b. DisambECP b => PV (Located b)

runECP_P :: DisambECP b => ECP -> P (Located b) Source #

class DisambInfixOp b where Source #

Disambiguate infix operators. See Note [Ambiguous syntactic categories]

Methods

mkHsVarOpPV :: Located RdrName -> PV (Located b) Source #

mkHsConOpPV :: Located RdrName -> PV (Located b) Source #

mkHsInfixHolePV :: SrcSpan -> PV (Located b) Source #

#### Instances

Instances details

DisambInfixOp RdrName Source # |
Instance details Defined in GHC.Parser.PostProcess Methods mkHsVarOpPV :: Located RdrName -> PV (Located RdrName) Source # mkHsConOpPV :: Located RdrName -> PV (Located RdrName) Source # mkHsInfixHolePV :: SrcSpan -> PV (Located RdrName) Source #
DisambInfixOp (HsExpr GhcPs) Source # |
Instance details Defined in GHC.Parser.PostProcess Methods mkHsVarOpPV :: Located RdrName -> PV (Located (HsExpr GhcPs)) Source # mkHsConOpPV :: Located RdrName -> PV (Located (HsExpr GhcPs)) Source # mkHsInfixHolePV :: SrcSpan -> PV (Located (HsExpr GhcPs)) Source #

class b ~ Body b GhcPs => DisambECP b where Source #

Disambiguate constructs that may appear when we do not know ahead of time whether we are parsing an expression, a command, or a pattern. See Note [Ambiguous syntactic categories]

Associated Types

type Body b :: Type -> Type Source #

See Note [Body in DisambECP]

type InfixOp b Source #

Infix operator representation

type FunArg b Source #

Function argument representation

Methods

ecpFromCmd' :: LHsCmd GhcPs -> PV (Located b) Source #

Return a command without ambiguity, or fail in a non-command context.

ecpFromExp' :: LHsExpr GhcPs -> PV (Located b) Source #

Return an expression without ambiguity, or fail in a non-expression context.

mkHsLamPV :: SrcSpan -> MatchGroup GhcPs (Located b) -> PV (Located b) Source #

Disambiguate "... -> ..." (lambda)

mkHsLetPV :: SrcSpan -> LHsLocalBinds GhcPs -> Located b -> PV (Located b) Source #

Disambiguate "let ... in ..."

superInfixOp :: (DisambInfixOp (InfixOp b) => PV (Located b)) -> PV (Located b) Source #

Bring superclass constraints on InfixOp into scope. See Note [UndecidableSuperClasses for associated types]

mkHsOpAppPV :: SrcSpan -> Located b -> Located (InfixOp b) -> Located b -> PV (Located b) Source #

Disambiguate "f # x" (infix operator)

mkHsCasePV :: SrcSpan -> LHsExpr GhcPs -> MatchGroup GhcPs (Located b) -> PV (Located b) Source #

Disambiguate "case ... of ..."

mkHsLamCasePV :: SrcSpan -> MatchGroup GhcPs (Located b) -> PV (Located b) Source #

Disambiguate `\case ...` (lambda case)

superFunArg :: (DisambECP (FunArg b) => PV (Located b)) -> PV (Located b) Source #

Bring superclass constraints on FunArg into scope. See Note [UndecidableSuperClasses for associated types]

mkHsAppPV :: SrcSpan -> Located b -> Located (FunArg b) -> PV (Located b) Source #

Disambiguate "f x" (function application)

mkHsAppTypePV :: SrcSpan -> Located b -> LHsType GhcPs -> PV (Located b) Source #

Disambiguate "f @t" (visible type application)

mkHsIfPV :: SrcSpan -> LHsExpr GhcPs -> Bool -> Located b -> Bool -> Located b -> PV (Located b) Source #

Disambiguate "if ... then ... else ..."

mkHsDoPV :: SrcSpan -> Maybe ModuleName -> Located [LStmt GhcPs (Located b)] -> PV (Located b) Source #

Disambiguate "do { ... }" (do notation)

mkHsParPV :: SrcSpan -> Located b -> PV (Located b) Source #

Disambiguate "( ... )" (parentheses)

mkHsVarPV :: Located RdrName -> PV (Located b) Source #

Disambiguate a variable "f" or a data constructor MkF.

mkHsLitPV :: Located (HsLit GhcPs) -> PV (Located b) Source #

Disambiguate a monomorphic literal

mkHsOverLitPV :: Located (HsOverLit GhcPs) -> PV (Located b) Source #

Disambiguate an overloaded literal

mkHsWildCardPV :: SrcSpan -> PV (Located b) Source #

Disambiguate a wildcard

mkHsTySigPV :: SrcSpan -> Located b -> LHsType GhcPs -> PV (Located b) Source #

Disambiguate "a :: t" (type annotation)

mkHsExplicitListPV :: SrcSpan -> [Located b] -> PV (Located b) Source #

Disambiguate "[a,b,c]" (list syntax)

mkHsSplicePV :: Located (HsSplice GhcPs) -> PV (Located b) Source #

Disambiguate "$(...)" and "[quasi|...|]" (TH splices)

mkHsRecordPV :: SrcSpan -> SrcSpan -> Located b -> ([LHsRecField GhcPs (Located b)], Maybe SrcSpan) -> PV (Located b) Source #

Disambiguate "f { a = b, ... }" syntax (record construction and record updates)

mkHsNegAppPV :: SrcSpan -> Located b -> PV (Located b) Source #

Disambiguate "-a" (negation)

mkHsSectionR_PV :: SrcSpan -> Located (InfixOp b) -> Located b -> PV (Located b) Source #

Disambiguate "(# a)" (right operator section)

mkHsViewPatPV :: SrcSpan -> LHsExpr GhcPs -> Located b -> PV (Located b) Source #

Disambiguate "(a -> b)" (view pattern)

mkHsAsPatPV :: SrcSpan -> Located RdrName -> Located b -> PV (Located b) Source #

Disambiguate "a@b" (as-pattern)

mkHsLazyPatPV :: SrcSpan -> Located b -> PV (Located b) Source #

Disambiguate "~a" (lazy pattern)

mkHsBangPatPV :: SrcSpan -> Located b -> PV (Located b) Source #

Disambiguate "!a" (bang pattern)

mkSumOrTuplePV :: SrcSpan -> Boxity -> SumOrTuple b -> PV (Located b) Source #

Disambiguate tuple sections and unboxed sums

rejectPragmaPV :: Located b -> PV () Source #

Validate infixexp LHS to reject unwanted {-# SCC ... #-} pragmas

#### Instances

Instances details

DisambECP (HsCmd GhcPs) Source # |
Instance details Defined in GHC.Parser.PostProcess Associated Types type Body (HsCmd GhcPs) :: Type -> Type Source # type InfixOp (HsCmd GhcPs) Source # type FunArg (HsCmd GhcPs) Source # Methods ecpFromCmd' :: LHsCmd GhcPs -> PV (Located (HsCmd GhcPs)) Source # ecpFromExp' :: LHsExpr GhcPs -> PV (Located (HsCmd GhcPs)) Source # mkHsLamPV :: SrcSpan -> MatchGroup GhcPs (Located (HsCmd GhcPs)) -> PV (Located (HsCmd GhcPs)) Source # mkHsLetPV :: SrcSpan -> LHsLocalBinds GhcPs -> Located (HsCmd GhcPs) -> PV (Located (HsCmd GhcPs)) Source # superInfixOp :: (DisambInfixOp (InfixOp (HsCmd GhcPs)) => PV (Located (HsCmd GhcPs))) -> PV (Located (HsCmd GhcPs)) Source # mkHsOpAppPV :: SrcSpan -> Located (HsCmd GhcPs) -> Located (InfixOp (HsCmd GhcPs)) -> Located (HsCmd GhcPs) -> PV (Located (HsCmd GhcPs)) Source # mkHsCasePV :: SrcSpan -> LHsExpr GhcPs -> MatchGroup GhcPs (Located (HsCmd GhcPs)) -> PV (Located (HsCmd GhcPs)) Source # mkHsLamCasePV :: SrcSpan -> MatchGroup GhcPs (Located (HsCmd GhcPs)) -> PV (Located (HsCmd GhcPs)) Source # superFunArg :: (DisambECP (FunArg (HsCmd GhcPs)) => PV (Located (HsCmd GhcPs))) -> PV (Located (HsCmd GhcPs)) Source # mkHsAppPV :: SrcSpan -> Located (HsCmd GhcPs) -> Located (FunArg (HsCmd GhcPs)) -> PV (Located (HsCmd GhcPs)) Source # mkHsAppTypePV :: SrcSpan -> Located (HsCmd GhcPs) -> LHsType GhcPs -> PV (Located (HsCmd GhcPs)) Source # mkHsIfPV :: SrcSpan -> LHsExpr GhcPs -> Bool -> Located (HsCmd GhcPs) -> Bool -> Located (HsCmd GhcPs) -> PV (Located (HsCmd GhcPs)) Source # mkHsDoPV :: SrcSpan -> Maybe ModuleName -> Located [LStmt GhcPs (Located (HsCmd GhcPs))] -> PV (Located (HsCmd GhcPs)) Source # mkHsParPV :: SrcSpan -> Located (HsCmd GhcPs) -> PV (Located (HsCmd GhcPs)) Source # mkHsVarPV :: Located RdrName -> PV (Located (HsCmd GhcPs)) Source # mkHsLitPV :: Located (HsLit GhcPs) -> PV (Located (HsCmd GhcPs)) Source # mkHsOverLitPV :: Located (HsOverLit GhcPs) -> PV (Located (HsCmd GhcPs)) Source # mkHsWildCardPV :: SrcSpan -> PV (Located (HsCmd GhcPs)) Source # mkHsTySigPV :: SrcSpan -> Located (HsCmd GhcPs) -> LHsType GhcPs -> PV (Located (HsCmd GhcPs)) Source # mkHsExplicitListPV :: SrcSpan -> [Located (HsCmd GhcPs)] -> PV (Located (HsCmd GhcPs)) Source # mkHsSplicePV :: Located (HsSplice GhcPs) -> PV (Located (HsCmd GhcPs)) Source # mkHsRecordPV :: SrcSpan -> SrcSpan -> Located (HsCmd GhcPs) -> ([LHsRecField GhcPs (Located (HsCmd GhcPs))], Maybe SrcSpan) -> PV (Located (HsCmd GhcPs)) Source # mkHsNegAppPV :: SrcSpan -> Located (HsCmd GhcPs) -> PV (Located (HsCmd GhcPs)) Source # mkHsSectionR_PV :: SrcSpan -> Located (InfixOp (HsCmd GhcPs)) -> Located (HsCmd GhcPs) -> PV (Located (HsCmd GhcPs)) Source # mkHsViewPatPV :: SrcSpan -> LHsExpr GhcPs -> Located (HsCmd GhcPs) -> PV (Located (HsCmd GhcPs)) Source # mkHsAsPatPV :: SrcSpan -> Located RdrName -> Located (HsCmd GhcPs) -> PV (Located (HsCmd GhcPs)) Source # mkHsLazyPatPV :: SrcSpan -> Located (HsCmd GhcPs) -> PV (Located (HsCmd GhcPs)) Source # mkHsBangPatPV :: SrcSpan -> Located (HsCmd GhcPs) -> PV (Located (HsCmd GhcPs)) Source # mkSumOrTuplePV :: SrcSpan -> Boxity -> SumOrTuple (HsCmd GhcPs) -> PV (Located (HsCmd GhcPs)) Source # rejectPragmaPV :: Located (HsCmd GhcPs) -> PV () Source #
DisambECP (HsExpr GhcPs) Source # |
Instance details Defined in GHC.Parser.PostProcess Associated Types type Body (HsExpr GhcPs) :: Type -> Type Source # type InfixOp (HsExpr GhcPs) Source # type FunArg (HsExpr GhcPs) Source # Methods ecpFromCmd' :: LHsCmd GhcPs -> PV (Located (HsExpr GhcPs)) Source # ecpFromExp' :: LHsExpr GhcPs -> PV (Located (HsExpr GhcPs)) Source # mkHsLamPV :: SrcSpan -> MatchGroup GhcPs (Located (HsExpr GhcPs)) -> PV (Located (HsExpr GhcPs)) Source # mkHsLetPV :: SrcSpan -> LHsLocalBinds GhcPs -> Located (HsExpr GhcPs) -> PV (Located (HsExpr GhcPs)) Source # superInfixOp :: (DisambInfixOp (InfixOp (HsExpr GhcPs)) => PV (Located (HsExpr GhcPs))) -> PV (Located (HsExpr GhcPs)) Source # mkHsOpAppPV :: SrcSpan -> Located (HsExpr GhcPs) -> Located (InfixOp (HsExpr GhcPs)) -> Located (HsExpr GhcPs) -> PV (Located (HsExpr GhcPs)) Source # mkHsCasePV :: SrcSpan -> LHsExpr GhcPs -> MatchGroup GhcPs (Located (HsExpr GhcPs)) -> PV (Located (HsExpr GhcPs)) Source # mkHsLamCasePV :: SrcSpan -> MatchGroup GhcPs (Located (HsExpr GhcPs)) -> PV (Located (HsExpr GhcPs)) Source # superFunArg :: (DisambECP (FunArg (HsExpr GhcPs)) => PV (Located (HsExpr GhcPs))) -> PV (Located (HsExpr GhcPs)) Source # mkHsAppPV :: SrcSpan -> Located (HsExpr GhcPs) -> Located (FunArg (HsExpr GhcPs)) -> PV (Located (HsExpr GhcPs)) Source # mkHsAppTypePV :: SrcSpan -> Located (HsExpr GhcPs) -> LHsType GhcPs -> PV (Located (HsExpr GhcPs)) Source # mkHsIfPV :: SrcSpan -> LHsExpr GhcPs -> Bool -> Located (HsExpr GhcPs) -> Bool -> Located (HsExpr GhcPs) -> PV (Located (HsExpr GhcPs)) Source # mkHsDoPV :: SrcSpan -> Maybe ModuleName -> Located [LStmt GhcPs (Located (HsExpr GhcPs))] -> PV (Located (HsExpr GhcPs)) Source # mkHsParPV :: SrcSpan -> Located (HsExpr GhcPs) -> PV (Located (HsExpr GhcPs)) Source # mkHsVarPV :: Located RdrName -> PV (Located (HsExpr GhcPs)) Source # mkHsLitPV :: Located (HsLit GhcPs) -> PV (Located (HsExpr GhcPs)) Source # mkHsOverLitPV :: Located (HsOverLit GhcPs) -> PV (Located (HsExpr GhcPs)) Source # mkHsWildCardPV :: SrcSpan -> PV (Located (HsExpr GhcPs)) Source # mkHsTySigPV :: SrcSpan -> Located (HsExpr GhcPs) -> LHsType GhcPs -> PV (Located (HsExpr GhcPs)) Source # mkHsExplicitListPV :: SrcSpan -> [Located (HsExpr GhcPs)] -> PV (Located (HsExpr GhcPs)) Source # mkHsSplicePV :: Located (HsSplice GhcPs) -> PV (Located (HsExpr GhcPs)) Source # mkHsRecordPV :: SrcSpan -> SrcSpan -> Located (HsExpr GhcPs) -> ([LHsRecField GhcPs (Located (HsExpr GhcPs))], Maybe SrcSpan) -> PV (Located (HsExpr GhcPs)) Source # mkHsNegAppPV :: SrcSpan -> Located (HsExpr GhcPs) -> PV (Located (HsExpr GhcPs)) Source # mkHsSectionR_PV :: SrcSpan -> Located (InfixOp (HsExpr GhcPs)) -> Located (HsExpr GhcPs) -> PV (Located (HsExpr GhcPs)) Source # mkHsViewPatPV :: SrcSpan -> LHsExpr GhcPs -> Located (HsExpr GhcPs) -> PV (Located (HsExpr GhcPs)) Source # mkHsAsPatPV :: SrcSpan -> Located RdrName -> Located (HsExpr GhcPs) -> PV (Located (HsExpr GhcPs)) Source # mkHsLazyPatPV :: SrcSpan -> Located (HsExpr GhcPs) -> PV (Located (HsExpr GhcPs)) Source # mkHsBangPatPV :: SrcSpan -> Located (HsExpr GhcPs) -> PV (Located (HsExpr GhcPs)) Source # mkSumOrTuplePV :: SrcSpan -> Boxity -> SumOrTuple (HsExpr GhcPs) -> PV (Located (HsExpr GhcPs)) Source # rejectPragmaPV :: Located (HsExpr GhcPs) -> PV () Source #
DisambECP (PatBuilder GhcPs) Source # |
Instance details Defined in GHC.Parser.PostProcess Associated Types type Body (PatBuilder GhcPs) :: Type -> Type Source # type InfixOp (PatBuilder GhcPs) Source # type FunArg (PatBuilder GhcPs) Source # Methods ecpFromCmd' :: LHsCmd GhcPs -> PV (Located (PatBuilder GhcPs)) Source # ecpFromExp' :: LHsExpr GhcPs -> PV (Located (PatBuilder GhcPs)) Source # mkHsLamPV :: SrcSpan -> MatchGroup GhcPs (Located (PatBuilder GhcPs)) -> PV (Located (PatBuilder GhcPs)) Source # mkHsLetPV :: SrcSpan -> LHsLocalBinds GhcPs -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # superInfixOp :: (DisambInfixOp (InfixOp (PatBuilder GhcPs)) => PV (Located (PatBuilder GhcPs))) -> PV (Located (PatBuilder GhcPs)) Source # mkHsOpAppPV :: SrcSpan -> Located (PatBuilder GhcPs) -> Located (InfixOp (PatBuilder GhcPs)) -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsCasePV :: SrcSpan -> LHsExpr GhcPs -> MatchGroup GhcPs (Located (PatBuilder GhcPs)) -> PV (Located (PatBuilder GhcPs)) Source # mkHsLamCasePV :: SrcSpan -> MatchGroup GhcPs (Located (PatBuilder GhcPs)) -> PV (Located (PatBuilder GhcPs)) Source # superFunArg :: (DisambECP (FunArg (PatBuilder GhcPs)) => PV (Located (PatBuilder GhcPs))) -> PV (Located (PatBuilder GhcPs)) Source # mkHsAppPV :: SrcSpan -> Located (PatBuilder GhcPs) -> Located (FunArg (PatBuilder GhcPs)) -> PV (Located (PatBuilder GhcPs)) Source # mkHsAppTypePV :: SrcSpan -> Located (PatBuilder GhcPs) -> LHsType GhcPs -> PV (Located (PatBuilder GhcPs)) Source # mkHsIfPV :: SrcSpan -> LHsExpr GhcPs -> Bool -> Located (PatBuilder GhcPs) -> Bool -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsDoPV :: SrcSpan -> Maybe ModuleName -> Located [LStmt GhcPs (Located (PatBuilder GhcPs))] -> PV (Located (PatBuilder GhcPs)) Source # mkHsParPV :: SrcSpan -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsVarPV :: Located RdrName -> PV (Located (PatBuilder GhcPs)) Source # mkHsLitPV :: Located (HsLit GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsOverLitPV :: Located (HsOverLit GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsWildCardPV :: SrcSpan -> PV (Located (PatBuilder GhcPs)) Source # mkHsTySigPV :: SrcSpan -> Located (PatBuilder GhcPs) -> LHsType GhcPs -> PV (Located (PatBuilder GhcPs)) Source # mkHsExplicitListPV :: SrcSpan -> [Located (PatBuilder GhcPs)] -> PV (Located (PatBuilder GhcPs)) Source # mkHsSplicePV :: Located (HsSplice GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsRecordPV :: SrcSpan -> SrcSpan -> Located (PatBuilder GhcPs) -> ([LHsRecField GhcPs (Located (PatBuilder GhcPs))], Maybe SrcSpan) -> PV (Located (PatBuilder GhcPs)) Source # mkHsNegAppPV :: SrcSpan -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsSectionR_PV :: SrcSpan -> Located (InfixOp (PatBuilder GhcPs)) -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsViewPatPV :: SrcSpan -> LHsExpr GhcPs -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsAsPatPV :: SrcSpan -> Located RdrName -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsLazyPatPV :: SrcSpan -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsBangPatPV :: SrcSpan -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkSumOrTuplePV :: SrcSpan -> Boxity -> SumOrTuple (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # rejectPragmaPV :: Located (PatBuilder GhcPs) -> PV () Source #

ecpFromExp :: LHsExpr GhcPs -> ECP Source #

ecpFromCmd :: LHsCmd GhcPs -> ECP Source #

data PatBuilder p Source #

See Note [Ambiguous syntactic categories] and Note [PatBuilder]

#### Instances

Instances details

DisambECP (PatBuilder GhcPs) Source # |
Instance details Defined in GHC.Parser.PostProcess Associated Types type Body (PatBuilder GhcPs) :: Type -> Type Source # type InfixOp (PatBuilder GhcPs) Source # type FunArg (PatBuilder GhcPs) Source # Methods ecpFromCmd' :: LHsCmd GhcPs -> PV (Located (PatBuilder GhcPs)) Source # ecpFromExp' :: LHsExpr GhcPs -> PV (Located (PatBuilder GhcPs)) Source # mkHsLamPV :: SrcSpan -> MatchGroup GhcPs (Located (PatBuilder GhcPs)) -> PV (Located (PatBuilder GhcPs)) Source # mkHsLetPV :: SrcSpan -> LHsLocalBinds GhcPs -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # superInfixOp :: (DisambInfixOp (InfixOp (PatBuilder GhcPs)) => PV (Located (PatBuilder GhcPs))) -> PV (Located (PatBuilder GhcPs)) Source # mkHsOpAppPV :: SrcSpan -> Located (PatBuilder GhcPs) -> Located (InfixOp (PatBuilder GhcPs)) -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsCasePV :: SrcSpan -> LHsExpr GhcPs -> MatchGroup GhcPs (Located (PatBuilder GhcPs)) -> PV (Located (PatBuilder GhcPs)) Source # mkHsLamCasePV :: SrcSpan -> MatchGroup GhcPs (Located (PatBuilder GhcPs)) -> PV (Located (PatBuilder GhcPs)) Source # superFunArg :: (DisambECP (FunArg (PatBuilder GhcPs)) => PV (Located (PatBuilder GhcPs))) -> PV (Located (PatBuilder GhcPs)) Source # mkHsAppPV :: SrcSpan -> Located (PatBuilder GhcPs) -> Located (FunArg (PatBuilder GhcPs)) -> PV (Located (PatBuilder GhcPs)) Source # mkHsAppTypePV :: SrcSpan -> Located (PatBuilder GhcPs) -> LHsType GhcPs -> PV (Located (PatBuilder GhcPs)) Source # mkHsIfPV :: SrcSpan -> LHsExpr GhcPs -> Bool -> Located (PatBuilder GhcPs) -> Bool -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsDoPV :: SrcSpan -> Maybe ModuleName -> Located [LStmt GhcPs (Located (PatBuilder GhcPs))] -> PV (Located (PatBuilder GhcPs)) Source # mkHsParPV :: SrcSpan -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsVarPV :: Located RdrName -> PV (Located (PatBuilder GhcPs)) Source # mkHsLitPV :: Located (HsLit GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsOverLitPV :: Located (HsOverLit GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsWildCardPV :: SrcSpan -> PV (Located (PatBuilder GhcPs)) Source # mkHsTySigPV :: SrcSpan -> Located (PatBuilder GhcPs) -> LHsType GhcPs -> PV (Located (PatBuilder GhcPs)) Source # mkHsExplicitListPV :: SrcSpan -> [Located (PatBuilder GhcPs)] -> PV (Located (PatBuilder GhcPs)) Source # mkHsSplicePV :: Located (HsSplice GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsRecordPV :: SrcSpan -> SrcSpan -> Located (PatBuilder GhcPs) -> ([LHsRecField GhcPs (Located (PatBuilder GhcPs))], Maybe SrcSpan) -> PV (Located (PatBuilder GhcPs)) Source # mkHsNegAppPV :: SrcSpan -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsSectionR_PV :: SrcSpan -> Located (InfixOp (PatBuilder GhcPs)) -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsViewPatPV :: SrcSpan -> LHsExpr GhcPs -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsAsPatPV :: SrcSpan -> Located RdrName -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsLazyPatPV :: SrcSpan -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkHsBangPatPV :: SrcSpan -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # mkSumOrTuplePV :: SrcSpan -> Boxity -> SumOrTuple (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) Source # rejectPragmaPV :: Located (PatBuilder GhcPs) -> PV () Source #
Outputable (PatBuilder GhcPs) Source # |
Instance details Defined in GHC.Parser.PostProcess Methods ppr :: PatBuilder GhcPs -> SDoc Source # pprPrec :: Rational -> PatBuilder GhcPs -> SDoc Source #
type Body (PatBuilder GhcPs) Source # |
Instance details Defined in GHC.Parser.PostProcess type Body (PatBuilder GhcPs) = PatBuilder
type FunArg (PatBuilder GhcPs) Source # |
Instance details Defined in GHC.Parser.PostProcess type FunArg (PatBuilder GhcPs) = PatBuilder GhcPs
type InfixOp (PatBuilder GhcPs) Source # |
Instance details Defined in GHC.Parser.PostProcess type InfixOp (PatBuilder GhcPs) = RdrName