Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Refact.Compat
Contents
- ApiAnnotation / GHC.Parser.ApiAnnotation
- BasicTypes / GHC.Types.Basic
- DynFlags / GHC.Driver.Session
- ErrUtils
- FastString / GHC.Data.FastString
- HeaderInfo / GHC.Parser.Header
- HsExpr / GHC.Hs.Expr
- HsSyn / GHC.Hs
- Name OccName GHC.Types.Name
- Outputable / GHC.Utils.Outputable
- Panic / GHC.Utils.Panic
- RdrName / GHC.Types.Name.Reader
- SrcLoc / GHC.Types.SrcLoc
- StringBuffer
- Misc
- Non-GHC stuff
Synopsis
- data AnnKeywordId
- = AnnAnyclass
- | AnnAs
- | AnnAt
- | AnnBang
- | AnnBackquote
- | AnnBy
- | AnnCase
- | AnnClass
- | AnnClose
- | AnnCloseB
- | AnnCloseBU
- | AnnCloseC
- | AnnCloseQ
- | AnnCloseQU
- | AnnCloseP
- | AnnClosePH
- | AnnCloseS
- | AnnColon
- | AnnComma
- | AnnCommaTuple
- | AnnDarrow
- | AnnDarrowU
- | AnnData
- | AnnDcolon
- | AnnDcolonU
- | AnnDefault
- | AnnDeriving
- | AnnDo
- | AnnDot
- | AnnDotdot
- | AnnElse
- | AnnEqual
- | AnnExport
- | AnnFamily
- | AnnForall
- | AnnForallU
- | AnnForeign
- | AnnFunId
- | AnnGroup
- | AnnHeader
- | AnnHiding
- | AnnIf
- | AnnImport
- | AnnIn
- | AnnInfix
- | AnnInstance
- | AnnLam
- | AnnLarrow
- | AnnLarrowU
- | AnnLet
- | AnnLollyU
- | AnnMdo
- | AnnMinus
- | AnnModule
- | AnnNewtype
- | AnnName
- | AnnOf
- | AnnOpen
- | AnnOpenB
- | AnnOpenBU
- | AnnOpenC
- | AnnOpenE
- | AnnOpenEQ
- | AnnOpenEQU
- | AnnOpenP
- | AnnOpenS
- | AnnOpenPH
- | AnnDollar
- | AnnDollarDollar
- | AnnPackageName
- | AnnPattern
- | AnnPercent
- | AnnPercentOne
- | AnnProc
- | AnnQualified
- | AnnRarrow
- | AnnRarrowU
- | AnnRec
- | AnnRole
- | AnnSafe
- | AnnSemi
- | AnnSimpleQuote
- | AnnSignature
- | AnnStatic
- | AnnStock
- | AnnThen
- | AnnThTyQuote
- | AnnTilde
- | AnnType
- | AnnUnit
- | AnnUsing
- | AnnVal
- | AnnValStr
- | AnnVbar
- | AnnVia
- | AnnWhere
- | Annlarrowtail
- | AnnlarrowtailU
- | Annrarrowtail
- | AnnrarrowtailU
- | AnnLarrowtail
- | AnnLarrowtailU
- | AnnRarrowtail
- | AnnRarrowtailU
- data DeltaPos
- = SameLine {
- deltaColumn :: !Int
- | DifferentLine {
- deltaLine :: !Int
- deltaColumn :: !Int
- = SameLine {
- data Fixity = Fixity SourceText Int FixityDirection
- data SourceText
- data FlagSpec flag = FlagSpec {
- flagSpecName :: String
- flagSpecFlag :: flag
- flagSpecAction :: TurnOnFlag -> DynP ()
- flagSpecGhcMode :: GhcFlagMode
- data GeneralFlag
- = Opt_DumpToFile
- | Opt_D_faststring_stats
- | Opt_D_dump_minimal_imports
- | Opt_DoCoreLinting
- | Opt_DoLinearCoreLinting
- | Opt_DoStgLinting
- | Opt_DoCmmLinting
- | Opt_DoAsmLinting
- | Opt_DoAnnotationLinting
- | Opt_DoBoundsChecking
- | Opt_NoLlvmMangler
- | Opt_FastLlvm
- | Opt_NoTypeableBinds
- | Opt_DistinctConstructorTables
- | Opt_InfoTableMap
- | Opt_WarnIsError
- | Opt_ShowWarnGroups
- | Opt_HideSourcePaths
- | Opt_PrintExplicitForalls
- | Opt_PrintExplicitKinds
- | Opt_PrintExplicitCoercions
- | Opt_PrintExplicitRuntimeReps
- | Opt_PrintEqualityRelations
- | Opt_PrintAxiomIncomps
- | Opt_PrintUnicodeSyntax
- | Opt_PrintExpandedSynonyms
- | Opt_PrintPotentialInstances
- | Opt_PrintTypecheckerElaboration
- | Opt_CallArity
- | Opt_Exitification
- | Opt_Strictness
- | Opt_LateDmdAnal
- | Opt_KillAbsence
- | Opt_KillOneShot
- | Opt_FullLaziness
- | Opt_FloatIn
- | Opt_LateSpecialise
- | Opt_Specialise
- | Opt_SpecialiseAggressively
- | Opt_CrossModuleSpecialise
- | Opt_InlineGenerics
- | Opt_InlineGenericsAggressively
- | Opt_StaticArgumentTransformation
- | Opt_CSE
- | Opt_StgCSE
- | Opt_StgLiftLams
- | Opt_LiberateCase
- | Opt_SpecConstr
- | Opt_SpecConstrKeen
- | Opt_DoLambdaEtaExpansion
- | Opt_IgnoreAsserts
- | Opt_DoEtaReduction
- | Opt_CaseMerge
- | Opt_CaseFolding
- | Opt_UnboxStrictFields
- | Opt_UnboxSmallStrictFields
- | Opt_DictsCheap
- | Opt_EnableRewriteRules
- | Opt_EnableThSpliceWarnings
- | Opt_RegsGraph
- | Opt_RegsIterative
- | Opt_PedanticBottoms
- | Opt_LlvmTBAA
- | Opt_LlvmFillUndefWithGarbage
- | Opt_IrrefutableTuples
- | Opt_CmmSink
- | Opt_CmmStaticPred
- | Opt_CmmElimCommonBlocks
- | Opt_AsmShortcutting
- | Opt_OmitYields
- | Opt_FunToThunk
- | Opt_DictsStrict
- | Opt_DmdTxDictSel
- | Opt_Loopification
- | Opt_CfgBlocklayout
- | Opt_WeightlessBlocklayout
- | Opt_CprAnal
- | Opt_WorkerWrapper
- | Opt_SolveConstantDicts
- | Opt_AlignmentSanitisation
- | Opt_CatchBottoms
- | Opt_NumConstantFolding
- | Opt_SimplPreInlining
- | Opt_IgnoreInterfacePragmas
- | Opt_OmitInterfacePragmas
- | Opt_ExposeAllUnfoldings
- | Opt_WriteInterface
- | Opt_WriteHie
- | Opt_AutoSccsOnIndividualCafs
- | Opt_ProfCountEntries
- | Opt_Pp
- | Opt_ForceRecomp
- | Opt_IgnoreOptimChanges
- | Opt_IgnoreHpcChanges
- | Opt_ExcessPrecision
- | Opt_EagerBlackHoling
- | Opt_NoHsMain
- | Opt_SplitSections
- | Opt_StgStats
- | Opt_HideAllPackages
- | Opt_HideAllPluginPackages
- | Opt_PrintBindResult
- | Opt_Haddock
- | Opt_HaddockOptions
- | Opt_BreakOnException
- | Opt_BreakOnError
- | Opt_PrintEvldWithShow
- | Opt_PrintBindContents
- | Opt_GenManifest
- | Opt_EmbedManifest
- | Opt_SharedImplib
- | Opt_BuildingCabalPackage
- | Opt_IgnoreDotGhci
- | Opt_GhciSandbox
- | Opt_GhciHistory
- | Opt_GhciLeakCheck
- | Opt_ValidateHie
- | Opt_LocalGhciHistory
- | Opt_NoIt
- | Opt_HelpfulErrors
- | Opt_DeferTypeErrors
- | Opt_DeferTypedHoles
- | Opt_DeferOutOfScopeVariables
- | Opt_PIC
- | Opt_PIE
- | Opt_PICExecutable
- | Opt_ExternalDynamicRefs
- | Opt_Ticky
- | Opt_Ticky_Allocd
- | Opt_Ticky_LNE
- | Opt_Ticky_Dyn_Thunk
- | Opt_RPath
- | Opt_RelativeDynlibPaths
- | Opt_CompactUnwind
- | Opt_Hpc
- | Opt_FamAppCache
- | Opt_ExternalInterpreter
- | Opt_OptimalApplicativeDo
- | Opt_VersionMacros
- | Opt_WholeArchiveHsLibs
- | Opt_SingleLibFolder
- | Opt_ExposeInternalSymbols
- | Opt_KeepCAFs
- | Opt_KeepGoing
- | Opt_ByteCode
- | Opt_LinkRts
- | Opt_ErrorSpans
- | Opt_DeferDiagnostics
- | Opt_DiagnosticsShowCaret
- | Opt_PprCaseAsLet
- | Opt_PprShowTicks
- | Opt_ShowHoleConstraints
- | Opt_ShowValidHoleFits
- | Opt_SortValidHoleFits
- | Opt_SortBySizeHoleFits
- | Opt_SortBySubsumHoleFits
- | Opt_AbstractRefHoleFits
- | Opt_UnclutterValidHoleFits
- | Opt_ShowTypeAppOfHoleFits
- | Opt_ShowTypeAppVarsOfHoleFits
- | Opt_ShowDocsOfHoleFits
- | Opt_ShowTypeOfHoleFits
- | Opt_ShowProvOfHoleFits
- | Opt_ShowMatchesOfHoleFits
- | Opt_ShowLoadedModules
- | Opt_HexWordLiterals
- | Opt_SuppressCoercions
- | Opt_SuppressVarKinds
- | Opt_SuppressModulePrefixes
- | Opt_SuppressTypeApplications
- | Opt_SuppressIdInfo
- | Opt_SuppressUnfoldings
- | Opt_SuppressTypeSignatures
- | Opt_SuppressUniques
- | Opt_SuppressStgExts
- | Opt_SuppressTicks
- | Opt_SuppressTimestamps
- | Opt_AutoLinkPackages
- | Opt_ImplicitImportQualified
- | Opt_KeepHscppFiles
- | Opt_KeepHiDiffs
- | Opt_KeepHcFiles
- | Opt_KeepSFiles
- | Opt_KeepTmpFiles
- | Opt_KeepRawTokenStream
- | Opt_KeepLlvmFiles
- | Opt_KeepHiFiles
- | Opt_KeepOFiles
- | Opt_BuildDynamicToo
- | Opt_DistrustAllPackages
- | Opt_PackageTrust
- | Opt_PluginTrustworthy
- | Opt_G_NoStateHack
- | Opt_G_NoOptCoercion
- gopt_set :: DynFlags -> GeneralFlag -> DynFlags
- gopt_unset :: DynFlags -> GeneralFlag -> DynFlags
- parseDynamicFilePragma :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
- xopt_set :: DynFlags -> Extension -> DynFlags
- xopt_unset :: DynFlags -> Extension -> DynFlags
- xFlags :: [FlagSpec Extension]
- type Errors = ErrorMessages
- type ErrorMessages = Bag (MsgEnvelope DecoratedSDoc)
- onError :: String -> Errors -> a
- data FastString
- mkFastString :: String -> FastString
- getOptions :: DynFlags -> StringBuffer -> FilePath -> [Located String]
- data GRHS p body
- = GRHS (XCGRHS p body) [GuardLStmt p] body
- | XGRHS !(XXGRHS p body)
- data HsExpr p
- = HsVar (XVar p) (LIdP p)
- | HsUnboundVar (XUnboundVar p) OccName
- | HsConLikeOut (XConLikeOut p) ConLike
- | HsRecFld (XRecFld p) (AmbiguousFieldOcc p)
- | HsOverLabel (XOverLabel p) FastString
- | HsIPVar (XIPVar p) HsIPName
- | HsOverLit (XOverLitE p) (HsOverLit p)
- | HsLit (XLitE p) (HsLit p)
- | HsLam (XLam p) (MatchGroup p (LHsExpr p))
- | HsLamCase (XLamCase p) (MatchGroup p (LHsExpr p))
- | HsApp (XApp p) (LHsExpr p) (LHsExpr p)
- | HsAppType (XAppTypeE p) (LHsExpr p) (LHsWcType (NoGhcTc p))
- | OpApp (XOpApp p) (LHsExpr p) (LHsExpr p) (LHsExpr p)
- | NegApp (XNegApp p) (LHsExpr p) (SyntaxExpr p)
- | HsPar (XPar p) (LHsExpr p)
- | SectionL (XSectionL p) (LHsExpr p) (LHsExpr p)
- | SectionR (XSectionR p) (LHsExpr p) (LHsExpr p)
- | ExplicitTuple (XExplicitTuple p) [HsTupArg p] Boxity
- | ExplicitSum (XExplicitSum p) ConTag Arity (LHsExpr p)
- | HsCase (XCase p) (LHsExpr p) (MatchGroup p (LHsExpr p))
- | HsIf (XIf p) (LHsExpr p) (LHsExpr p) (LHsExpr p)
- | HsMultiIf (XMultiIf p) [LGRHS p (LHsExpr p)]
- | HsLet (XLet p) (HsLocalBinds p) (LHsExpr p)
- | HsDo (XDo p) (HsStmtContext (HsDoRn p)) (XRec p [ExprLStmt p])
- | ExplicitList (XExplicitList p) [LHsExpr p]
- | RecordCon {
- rcon_ext :: XRecordCon p
- rcon_con :: XRec p (ConLikeP p)
- rcon_flds :: HsRecordBinds p
- | RecordUpd {
- rupd_ext :: XRecordUpd p
- rupd_expr :: LHsExpr p
- rupd_flds :: Either [LHsRecUpdField p] [LHsRecUpdProj p]
- | HsGetField { }
- | HsProjection {
- proj_ext :: XProjection p
- proj_flds :: NonEmpty (Located (HsFieldLabel p))
- | ExprWithTySig (XExprWithTySig p) (LHsExpr p) (LHsSigWcType (NoGhcTc p))
- | ArithSeq (XArithSeq p) (Maybe (SyntaxExpr p)) (ArithSeqInfo p)
- | HsBracket (XBracket p) (HsBracket p)
- | HsRnBracketOut (XRnBracketOut p) (HsBracket (HsBracketRn p)) [PendingRnSplice' p]
- | HsTcBracketOut (XTcBracketOut p) (Maybe QuoteWrapper) (HsBracket (HsBracketRn p)) [PendingTcSplice' p]
- | HsSpliceE (XSpliceE p) (HsSplice p)
- | HsProc (XProc p) (LPat p) (LHsCmdTop p)
- | HsStatic (XStatic p) (LHsExpr p)
- | HsTick (XTick p) CoreTickish (LHsExpr p)
- | HsBinTick (XBinTick p) Int Int (LHsExpr p)
- | HsPragE (XPragE p) (HsPragE p) (LHsExpr p)
- | XExpr !(XXExpr p)
- data HsMatchContext p
- data HsStmtContext p
- = ListComp
- | MonadComp
- | DoExpr (Maybe ModuleName)
- | MDoExpr (Maybe ModuleName)
- | ArrowExpr
- | GhciStmtCtxt
- | PatGuard (HsMatchContext p)
- | ParStmtCtxt (HsStmtContext p)
- | TransStmtCtxt (HsStmtContext p)
- data Match p body
- data MatchGroup p body
- = MG { }
- | XMatchGroup !(XXMatchGroup p body)
- data StmtLR idL idR body
- = LastStmt (XLastStmt idL idR body) body (Maybe Bool) (SyntaxExpr idR)
- | BindStmt (XBindStmt idL idR body) (LPat idL) body
- | ApplicativeStmt (XApplicativeStmt idL idR body) [(SyntaxExpr idR, ApplicativeArg idL)] (Maybe (SyntaxExpr idR))
- | BodyStmt (XBodyStmt idL idR body) body (SyntaxExpr idR) (SyntaxExpr idR)
- | LetStmt (XLetStmt idL idR body) (HsLocalBindsLR idL idR)
- | ParStmt (XParStmt idL idR body) [ParStmtBlock idL idR] (HsExpr idR) (SyntaxExpr idR)
- | TransStmt { }
- | RecStmt {
- recS_ext :: XRecStmt idL idR body
- recS_stmts :: XRec idR [LStmtLR idL idR body]
- recS_later_ids :: [IdP idR]
- recS_rec_ids :: [IdP idR]
- recS_bind_fn :: SyntaxExpr idR
- recS_ret_fn :: SyntaxExpr idR
- recS_mfix_fn :: SyntaxExpr idR
- | XStmtLR !(XXStmtLR idL idR body)
- data HsParsedModule = HsParsedModule {}
- data HsModule = HsModule {}
- data AnnsModule = AnnsModule {}
- class UnXRec p => CollectPass p where
- collectXXPat :: Proxy p -> CollectFlag p -> XXPat p -> [IdP p] -> [IdP p]
- data CollectFlag p where
- CollNoDictBinders :: forall p. CollectFlag p
- CollWithDictBinders :: CollectFlag (GhcPass 'Typechecked)
- unitRecStmtTc :: RecStmtTc
- unguardedRHS :: forall (p :: Pass) body. Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpan => EpAnn GrhsAnn -> SrcSpan -> LocatedA (body (GhcPass p)) -> [LGRHS (GhcPass p) (LocatedA (body (GhcPass p)))]
- unguardedGRHSs :: forall (p :: Pass) body. Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpan => SrcSpan -> LocatedA (body (GhcPass p)) -> EpAnn GrhsAnn -> GRHSs (GhcPass p) (LocatedA (body (GhcPass p)))
- spanHsLocaLBinds :: forall (p :: Pass). Data (HsLocalBinds (GhcPass p)) => HsLocalBinds (GhcPass p) -> SrcSpan
- nl_HsVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> HsExpr (GhcPass p)
- nlWildPatName :: LPat GhcRn
- nlWildPat :: LPat GhcPs
- nlWildConPat :: DataCon -> LPat GhcPs
- nlVarPat :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> LPat (GhcPass p)
- nlTuplePat :: [LPat GhcPs] -> Boxity -> LPat GhcPs
- nlParPat :: forall (name :: Pass). LPat (GhcPass name) -> LPat (GhcPass name)
- nlNullaryConPat :: RdrName -> LPat GhcPs
- nlLitPat :: HsLit GhcPs -> LPat GhcPs
- nlList :: [LHsExpr GhcPs] -> LHsExpr GhcPs
- nlInfixConPat :: RdrName -> LPat GhcPs -> LPat GhcPs -> LPat GhcPs
- nlHsVarApps :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> [IdP (GhcPass p)] -> LHsExpr (GhcPass p)
- nlHsVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> LHsExpr (GhcPass p)
- nlHsTyVar :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> LHsType (GhcPass p)
- nlHsTyConApp :: forall (p :: Pass) a. IsSrcSpanAnn p a => LexicalFixity -> IdP (GhcPass p) -> [LHsTypeArg (GhcPass p)] -> LHsType (GhcPass p)
- nlHsTyApps :: Id -> [Type] -> [LHsExpr GhcTc] -> LHsExpr GhcTc
- nlHsTyApp :: Id -> [Type] -> LHsExpr GhcTc
- nlHsSyntaxApps :: SyntaxExprTc -> [LHsExpr GhcTc] -> LHsExpr GhcTc
- nlHsParTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p)
- nlHsPar :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- nlHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs
- nlHsLit :: forall (p :: Pass). HsLit (GhcPass p) -> LHsExpr (GhcPass p)
- nlHsLam :: LMatch GhcPs (LHsExpr GhcPs) -> LHsExpr GhcPs
- nlHsIntLit :: forall (p :: Pass). Integer -> LHsExpr (GhcPass p)
- nlHsIf :: LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs
- nlHsFunTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- nlHsDo :: HsStmtContext GhcRn -> [LStmt GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs
- nlHsDataCon :: DataCon -> LHsExpr GhcTc
- nlHsCase :: LHsExpr GhcPs -> [LMatch GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs
- nlHsApps :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> [LHsExpr (GhcPass p)] -> LHsExpr (GhcPass p)
- nlHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- nlHsAppKindTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsKind (GhcPass p) -> LHsType (GhcPass p)
- nlHsApp :: forall (id :: Pass). IsPass id => LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- nlConVarPatName :: Name -> [Name] -> LPat GhcRn
- nlConVarPat :: RdrName -> [RdrName] -> LPat GhcPs
- nlConPatName :: Name -> [LPat GhcRn] -> LPat GhcRn
- nlConPat :: RdrName -> [LPat GhcPs] -> LPat GhcPs
- mkVarBind :: forall (p :: Pass). IdP (GhcPass p) -> LHsExpr (GhcPass p) -> LHsBind (GhcPass p)
- mkUntypedSplice :: EpAnn [AddEpAnn] -> SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs
- mkTypedSplice :: EpAnn [AddEpAnn] -> SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs
- mkTransformStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- mkTransformByStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- mkTopFunBind :: Origin -> LocatedN Name -> [LMatch GhcRn (LHsExpr GhcRn)] -> HsBind GhcRn
- mkTcBindStmt :: LPat GhcTc -> LocatedA (bodyR GhcTc) -> StmtLR GhcTc GhcTc (LocatedA (bodyR GhcTc))
- mkSimpleMatch :: forall (p :: Pass) body. (Anno (Match (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpanAnnA, Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpan) => HsMatchContext (NoGhcTc (GhcPass p)) -> [LPat (GhcPass p)] -> LocatedA (body (GhcPass p)) -> LMatch (GhcPass p) (LocatedA (body (GhcPass p)))
- mkSimpleGeneratedFunBind :: SrcSpan -> RdrName -> [LPat GhcPs] -> LHsExpr GhcPs -> LHsBind GhcPs
- mkRnBindStmt :: LPat GhcRn -> LocatedA (bodyR GhcRn) -> StmtLR GhcRn GhcRn (LocatedA (bodyR GhcRn))
- mkRecStmt :: forall (idL :: Pass) bodyR. Anno [GenLocated (Anno (StmtLR (GhcPass idL) GhcPs bodyR)) (StmtLR (GhcPass idL) GhcPs bodyR)] ~ SrcSpanAnnL => EpAnn AnnList -> LocatedL [LStmtLR (GhcPass idL) GhcPs bodyR] -> StmtLR (GhcPass idL) GhcPs bodyR
- mkPsBindStmt :: EpAnn [AddEpAnn] -> LPat GhcPs -> LocatedA (bodyR GhcPs) -> StmtLR GhcPs GhcPs (LocatedA (bodyR GhcPs))
- mkPrefixFunRhs :: LIdP p -> HsMatchContext p
- mkPatSynBind :: LocatedN RdrName -> HsPatSynDetails GhcPs -> LPat GhcPs -> HsPatSynDir GhcPs -> EpAnn [AddEpAnn] -> HsBind GhcPs
- mkParPat :: forall (p :: Pass). IsPass p => LPat (GhcPass p) -> LPat (GhcPass p)
- mkNPlusKPat :: LocatedN RdrName -> Located (HsOverLit GhcPs) -> EpAnn EpaLocation -> Pat GhcPs
- mkNPat :: Located (HsOverLit GhcPs) -> Maybe (SyntaxExpr GhcPs) -> EpAnn [AddEpAnn] -> Pat GhcPs
- mkMatchGroup :: forall (p :: Pass) body. AnnoBody p body => Origin -> LocatedL [LocatedA (Match (GhcPass p) (LocatedA (body (GhcPass p))))] -> MatchGroup (GhcPass p) (LocatedA (body (GhcPass p)))
- mkMatch :: forall (p :: Pass). IsPass p => HsMatchContext (NoGhcTc (GhcPass p)) -> [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> HsLocalBinds (GhcPass p) -> LMatch (GhcPass p) (LHsExpr (GhcPass p))
- mkLocatedList :: Semigroup a => [GenLocated (SrcAnn a) e2] -> LocatedAn an [GenLocated (SrcAnn a) e2]
- mkLetStmt :: EpAnn [AddEpAnn] -> HsLocalBinds GhcPs -> StmtLR GhcPs GhcPs (LocatedA b)
- mkLastStmt :: forall (idR :: Pass) bodyR (idL :: Pass). IsPass idR => LocatedA (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (LocatedA (bodyR (GhcPass idR)))
- mkLHsWrapCo :: TcCoercionN -> LHsExpr GhcTc -> LHsExpr GhcTc
- mkLHsWrap :: HsWrapper -> LHsExpr GhcTc -> LHsExpr GhcTc
- mkLHsVarTuple :: forall (p :: Pass) a. IsSrcSpanAnn p a => [IdP (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p)
- mkLHsTupleExpr :: forall (p :: Pass). [LHsExpr (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p)
- mkLHsPar :: forall (id :: Pass). IsPass id => LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- mkLHsCmdWrap :: HsWrapper -> LHsCmd GhcTc -> LHsCmd GhcTc
- mkHsWrapPatCo :: TcCoercionN -> Pat GhcTc -> Type -> Pat GhcTc
- mkHsWrapPat :: HsWrapper -> Pat GhcTc -> Type -> Pat GhcTc
- mkHsWrapCoR :: TcCoercionR -> HsExpr GhcTc -> HsExpr GhcTc
- mkHsWrapCo :: TcCoercionN -> HsExpr GhcTc -> HsExpr GhcTc
- mkHsWrap :: HsWrapper -> HsExpr GhcTc -> HsExpr GhcTc
- mkHsVarBind :: SrcSpan -> RdrName -> LHsExpr GhcPs -> LHsBind GhcPs
- mkHsStringPrimLit :: forall (p :: Pass). FastString -> HsLit (GhcPass p)
- mkHsString :: forall (p :: Pass). String -> HsLit (GhcPass p)
- mkHsSigEnv :: (LSig GhcRn -> Maybe ([LocatedN Name], a)) -> [LSig GhcRn] -> NameEnv a
- mkHsQuasiQuote :: RdrName -> SrcSpan -> FastString -> HsSplice GhcPs
- mkHsPar :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- mkHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> HsExpr GhcPs
- mkHsLams :: [TyVar] -> [EvVar] -> LHsExpr GhcTc -> LHsExpr GhcTc
- mkHsLam :: forall (p :: Pass). (IsPass p, XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ NoExtField) => [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
- mkHsIsString :: SourceText -> FastString -> HsOverLit GhcPs
- mkHsIntegral :: IntegralLit -> HsOverLit GhcPs
- mkHsIf :: LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs -> EpAnn AnnsIf -> HsExpr GhcPs
- mkHsFractional :: FractionalLit -> HsOverLit GhcPs
- mkHsDoAnns :: HsStmtContext GhcRn -> LocatedL [ExprLStmt GhcPs] -> EpAnn AnnList -> HsExpr GhcPs
- mkHsDo :: HsStmtContext GhcRn -> LocatedL [ExprLStmt GhcPs] -> HsExpr GhcPs
- mkHsDictLet :: TcEvBinds -> LHsExpr GhcTc -> LHsExpr GhcTc
- mkHsCompAnns :: HsStmtContext GhcRn -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> EpAnn AnnList -> HsExpr GhcPs
- mkHsComp :: HsStmtContext GhcRn -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> HsExpr GhcPs
- mkHsCmdWrap :: HsWrapper -> HsCmd GhcTc -> HsCmd GhcTc
- mkHsCmdIf :: LHsExpr GhcPs -> LHsCmd GhcPs -> LHsCmd GhcPs -> EpAnn AnnsIf -> HsCmd GhcPs
- mkHsCharPrimLit :: forall (p :: Pass). Char -> HsLit (GhcPass p)
- mkHsCaseAlt :: forall (p :: Pass) body. (Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpan, Anno (Match (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpanAnnA) => LPat (GhcPass p) -> LocatedA (body (GhcPass p)) -> LMatch (GhcPass p) (LocatedA (body (GhcPass p)))
- mkHsAppsWith :: forall (id :: Pass). (LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> HsExpr (GhcPass id) -> LHsExpr (GhcPass id)) -> LHsExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- mkHsApps :: forall (id :: Pass). LHsExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- mkHsAppWith :: forall (id :: Pass). (LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> HsExpr (GhcPass id) -> LHsExpr (GhcPass id)) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- mkHsAppTypes :: LHsExpr GhcRn -> [LHsWcType GhcRn] -> LHsExpr GhcRn
- mkHsAppType :: LHsExpr GhcRn -> LHsWcType GhcRn -> LHsExpr GhcRn
- mkHsApp :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- mkGroupUsingStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- mkGroupByUsingStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- mkFunBind :: Origin -> LocatedN RdrName -> [LMatch GhcPs (LHsExpr GhcPs)] -> HsBind GhcPs
- mkClassOpSigs :: [LSig GhcPs] -> [LSig GhcPs]
- mkChunkified :: ([a] -> a) -> [a] -> a
- mkBodyStmt :: forall bodyR (idL :: Pass). LocatedA (bodyR GhcPs) -> StmtLR (GhcPass idL) GhcPs (LocatedA (bodyR GhcPs))
- mkBigLHsVarTup :: forall (p :: Pass) a. IsSrcSpanAnn p a => [IdP (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p)
- mkBigLHsVarPatTup :: [IdP GhcRn] -> LPat GhcRn
- mkBigLHsTup :: forall (id :: Pass). [LHsExpr (GhcPass id)] -> XExplicitTuple (GhcPass id) -> LHsExpr (GhcPass id)
- mkBigLHsPatTup :: [LPat GhcRn] -> LPat GhcRn
- missingTupArg :: EpAnn EpaLocation -> HsTupArg GhcPs
- lStmtsImplicits :: forall (idR :: Pass) (body :: Type -> Type). [LStmtLR GhcRn (GhcPass idR) (LocatedA (body (GhcPass idR)))] -> [(SrcSpan, [Name])]
- lPatImplicits :: LPat GhcRn -> [(SrcSpan, [Name])]
- isUnliftedHsBind :: HsBind GhcTc -> Bool
- isInfixFunBind :: forall id1 id2. UnXRec id2 => HsBindLR id1 id2 -> Bool
- isBangedHsBind :: HsBind GhcTc -> Bool
- hsValBindsImplicits :: forall (idR :: Pass). HsValBindsLR GhcRn (GhcPass idR) -> [(SrcSpan, [Name])]
- hsTypeToHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs
- hsTypeToHsSigType :: LHsType GhcPs -> LHsSigType GhcPs
- hsTyClForeignBinders :: [TyClGroup GhcRn] -> [LForeignDecl GhcRn] -> [Name]
- hsPatSynSelectors :: forall (p :: Pass). IsPass p => HsValBinds (GhcPass p) -> [FieldOcc (GhcPass p)]
- hsLTyClDeclBinders :: forall (p :: Pass). IsPass p => LocatedA (TyClDecl (GhcPass p)) -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])
- hsGroupBinders :: HsGroup GhcRn -> [Name]
- hsForeignDeclsBinders :: forall (p :: Pass) a. (UnXRec (GhcPass p), IsSrcSpanAnn p a) => [LForeignDecl (GhcPass p)] -> [LIdP (GhcPass p)]
- hsDataFamInstBinders :: forall (p :: Pass). IsPass p => DataFamInstDecl (GhcPass p) -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])
- getPatSynBinds :: UnXRec id => [(RecFlag, LHsBinds id)] -> [PatSynBind id id]
- emptyTransStmt :: EpAnn [AddEpAnn] -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- emptyRecStmtName :: Anno [GenLocated (Anno (StmtLR GhcRn GhcRn bodyR)) (StmtLR GhcRn GhcRn bodyR)] ~ SrcSpanAnnL => StmtLR GhcRn GhcRn bodyR
- emptyRecStmtId :: Stmt GhcTc (LocatedA (HsCmd GhcTc))
- emptyRecStmt :: forall (idL :: Pass) bodyR. Anno [GenLocated (Anno (StmtLR (GhcPass idL) GhcPs bodyR)) (StmtLR (GhcPass idL) GhcPs bodyR)] ~ SrcSpanAnnL => StmtLR (GhcPass idL) GhcPs bodyR
- collectStmtsBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> [StmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
- collectStmtBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> StmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
- collectPatsBinders :: CollectPass p => CollectFlag p -> [LPat p] -> [IdP p]
- collectPatBinders :: CollectPass p => CollectFlag p -> LPat p -> [IdP p]
- collectMethodBinders :: UnXRec idL => LHsBindsLR idL idR -> [LIdP idL]
- collectLocalBinders :: forall (idL :: Pass) (idR :: Pass). CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- collectLStmtsBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> [LStmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
- collectLStmtBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> LStmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
- collectHsValBinders :: forall (idL :: Pass) (idR :: Pass). CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- collectHsIdBinders :: forall (idL :: Pass) (idR :: Pass). CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- collectHsBindsBinders :: CollectPass p => CollectFlag p -> LHsBindsLR p idR -> [IdP p]
- collectHsBindListBinders :: CollectPass p => CollectFlag p -> [LHsBindLR p idR] -> [IdP p]
- collectHsBindBinders :: CollectPass p => CollectFlag p -> HsBindLR p idR -> [IdP p]
- chunkify :: [a] -> [[a]]
- data XXExprGhcTc
- = WrapExpr !(HsWrap HsExpr)
- | ExpansionExpr !(HsExpansion (HsExpr GhcRn) (HsExpr GhcTc))
- data XBindStmtTc = XBindStmtTc {}
- data XBindStmtRn = XBindStmtRn {}
- data SyntaxExprTc
- = SyntaxExprTc { }
- | NoSyntaxExprTc
- data SyntaxExprRn
- type family SyntaxExprGhc (p :: Pass) = (r :: Type) | r -> p where ...
- data RecordUpdTc = RecordUpdTc {
- rupd_cons :: [ConLike]
- rupd_in_tys :: [Type]
- rupd_out_tys :: [Type]
- rupd_wrap :: HsWrapper
- data RecStmtTc = RecStmtTc {
- recS_bind_ty :: Type
- recS_later_rets :: [PostTcExpr]
- recS_rec_rets :: [PostTcExpr]
- recS_ret_ty :: Type
- type PostTcTable = [(Name, PostTcExpr)]
- type PostTcExpr = HsExpr GhcTc
- data PendingTcSplice = PendingTcSplice SplicePointName (LHsExpr GhcTc)
- data PendingRnSplice = PendingRnSplice UntypedSpliceFlavour SplicePointName (LHsExpr GhcRn)
- data HsWrap (hs_syn :: Type -> Type) = HsWrap HsWrapper (hs_syn GhcTc)
- newtype HsSplicedT = HsSplicedT DelayedSplice
- data HsExpansion a b = HsExpanded a b
- data GrhsAnn = GrhsAnn {}
- data EpAnnUnboundVar = EpAnnUnboundVar {}
- data EpAnnHsCase = EpAnnHsCase {}
- data DelayedSplice = DelayedSplice TcLclEnv (LHsExpr GhcRn) TcType (LHsExpr GhcTc)
- data CmdTopTc = CmdTopTc Type Type (CmdSyntaxTable GhcTc)
- data AnnsLet = AnnsLet {
- alLet :: EpaLocation
- alIn :: EpaLocation
- data AnnsIf = AnnsIf {}
- data AnnProjection = AnnProjection {}
- data AnnFieldLabel = AnnFieldLabel {}
- data AnnExplicitSum = AnnExplicitSum {}
- tupArgPresent :: forall (p :: Pass). HsTupArg (GhcPass p) -> Bool
- thTyBrackets :: SDoc -> SDoc
- thBrackets :: SDoc -> SDoc -> SDoc
- stripParensLHsExpr :: forall (p :: Pass). LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
- stripParensHsExpr :: forall (p :: Pass). HsExpr (GhcPass p) -> HsExpr (GhcPass p)
- ppr_splice_decl :: forall (p :: Pass). OutputableBndrId p => HsSplice (GhcPass p) -> SDoc
- ppr_splice :: forall (p :: Pass). OutputableBndrId p => SDoc -> IdP (GhcPass p) -> LHsExpr (GhcPass p) -> SDoc -> SDoc
- ppr_quasi :: OutputableBndr p => p -> p -> FastString -> SDoc
- ppr_module_name_prefix :: Maybe ModuleName -> SDoc
- ppr_lexpr :: forall (p :: Pass). OutputableBndrId p => LHsExpr (GhcPass p) -> SDoc
- ppr_lcmd :: forall (p :: Pass). OutputableBndrId p => LHsCmd (GhcPass p) -> SDoc
- ppr_infix_expr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> Maybe SDoc
- ppr_expr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> SDoc
- ppr_do_stmts :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA, Outputable body) => [LStmtLR (GhcPass idL) (GhcPass idR) body] -> SDoc
- ppr_cmd :: forall (p :: Pass). OutputableBndrId p => HsCmd (GhcPass p) -> SDoc
- ppr_apps :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> [Either (LHsExpr (GhcPass p)) (LHsWcType (NoGhcTc (GhcPass p)))] -> SDoc
- pprTransformStmt :: forall (p :: Pass). OutputableBndrId p => [IdP (GhcPass p)] -> LHsExpr (GhcPass p) -> Maybe (LHsExpr (GhcPass p)) -> SDoc
- pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc
- pprStmtInCtxt :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Outputable body, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA) => HsStmtContext (GhcPass idL) -> StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
- pprStmt :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA, Outputable body) => StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
- pprQuals :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc
- pprPendingSplice :: forall (p :: Pass). OutputableBndrId p => SplicePointName -> LHsExpr (GhcPass p) -> SDoc
- pprParendLExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc
- pprParendExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> HsExpr (GhcPass p) -> SDoc
- pprMatches :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => MatchGroup (GhcPass idR) body -> SDoc
- pprMatchInCtxt :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc
- pprMatch :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc
- pprLCmd :: forall (p :: Pass). OutputableBndrId p => LHsCmd (GhcPass p) -> SDoc
- pprHsBracket :: forall (p :: Pass). OutputableBndrId p => HsBracket (GhcPass p) -> SDoc
- pprGRHSs :: forall (idR :: Pass) body passL. (OutputableBndrId idR, Outputable body) => HsMatchContext passL -> GRHSs (GhcPass idR) body -> SDoc
- pprGRHS :: forall (idR :: Pass) body passL. (OutputableBndrId idR, Outputable body) => HsMatchContext passL -> GRHS (GhcPass idR) body -> SDoc
- pprDo :: forall (p :: Pass) body any. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => HsStmtContext any -> [LStmt (GhcPass p) body] -> SDoc
- pprDebugParendExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc
- pprComp :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc
- pprCmdArg :: forall (p :: Pass). OutputableBndrId p => HsCmdTop (GhcPass p) -> SDoc
- pprCmd :: forall (p :: Pass). OutputableBndrId p => HsCmd (GhcPass p) -> SDoc
- pprBy :: Outputable body => Maybe body -> SDoc
- pprBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
- pprBindStmt :: (Outputable pat, Outputable expr) => pat -> expr -> SDoc
- pprArg :: forall (idL :: Pass). OutputableBndrId idL => ApplicativeArg (GhcPass idL) -> SDoc
- pp_rhs :: Outputable body => HsMatchContext passL -> body -> SDoc
- pp_dotdot :: SDoc
- parenthesizeHsExpr :: forall (p :: Pass). IsPass p => PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
- noSyntaxExpr :: forall (p :: Pass). IsPass p => SyntaxExpr (GhcPass p)
- noExpr :: forall (p :: Pass). HsExpr (GhcPass p)
- mkSyntaxExpr :: HsExpr GhcRn -> SyntaxExprRn
- mkRnSyntaxExpr :: Name -> SyntaxExprRn
- matchGroupArity :: forall (id :: Pass) body. MatchGroup (GhcPass id) body -> Arity
- matchContextErrString :: forall (p :: Pass). OutputableBndrId p => HsMatchContext (GhcPass p) -> SDoc
- matchArrowContextErrString :: HsArrowMatchContext -> SDoc
- isSingletonMatchGroup :: forall (p :: Pass) body. [LMatch (GhcPass p) body] -> Bool
- isQuietHsExpr :: HsExpr id -> Bool
- isQuietHsCmd :: HsCmd id -> Bool
- isEmptyMatchGroup :: forall (p :: Pass) body. MatchGroup (GhcPass p) body -> Bool
- isAtomicHsExpr :: forall (p :: Pass). IsPass p => HsExpr (GhcPass p) -> Bool
- hsLMatchPats :: forall (id :: Pass) body. LMatch (GhcPass id) body -> [LPat (GhcPass id)]
- hsExprNeedsParens :: forall (p :: Pass). IsPass p => PprPrec -> HsExpr (GhcPass p) -> Bool
- data XViaStrategyPs = XViaStrategyPs (EpAnn [AddEpAnn]) (LHsSigType GhcPs)
- data HsRuleAnn = HsRuleAnn {}
- tyFamInstDeclName :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => TyFamInstDecl (GhcPass p) -> IdP (GhcPass p)
- tyFamInstDeclLName :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => TyFamInstDecl (GhcPass p) -> LocatedN (IdP (GhcPass p))
- tyClDeclLName :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => TyClDecl (GhcPass p) -> LocatedN (IdP (GhcPass p))
- tcdName :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => TyClDecl (GhcPass p) -> IdP (GhcPass p)
- standaloneKindSigName :: forall (p :: Pass). StandaloneKindSig (GhcPass p) -> IdP (GhcPass p)
- roleAnnotDeclName :: forall (p :: Pass). RoleAnnotDecl (GhcPass p) -> IdP (GhcPass p)
- resultVariableName :: forall (a :: Pass). FamilyResultSig (GhcPass a) -> Maybe (IdP (GhcPass a))
- pprTyFamInstDecl :: forall (p :: Pass). OutputableBndrId p => TopLevelFlag -> TyFamInstDecl (GhcPass p) -> SDoc
- pprTyClDeclFlavour :: forall (p :: Pass). TyClDecl (GhcPass p) -> SDoc
- pprHsFamInstLHS :: forall (p :: Pass). OutputableBndrId p => IdP (GhcPass p) -> HsOuterFamEqnTyVarBndrs (GhcPass p) -> HsTyPats (GhcPass p) -> LexicalFixity -> Maybe (LHsContext (GhcPass p)) -> SDoc
- pprDataFamInstFlavour :: forall (p :: Pass). DataFamInstDecl (GhcPass p) -> SDoc
- partitionBindsAndSigs :: [LHsDecl GhcPs] -> (LHsBinds GhcPs, [LSig GhcPs], [LFamilyDecl GhcPs], [LTyFamInstDecl GhcPs], [LDataFamInstDecl GhcPs], [LDocDecl GhcPs])
- mapDerivStrategy :: forall p (pass :: Pass). p ~ GhcPass pass => (XViaStrategy p -> XViaStrategy p) -> DerivStrategy p -> DerivStrategy p
- instDeclDataFamInsts :: forall (p :: Pass). [LInstDecl (GhcPass p)] -> [DataFamInstDecl (GhcPass p)]
- hsGroupTopLevelFixitySigs :: forall (p :: Pass). HsGroup (GhcPass p) -> [LFixitySig (GhcPass p)]
- hsDeclHasCusk :: TyClDecl GhcRn -> Bool
- hsConDeclTheta :: forall (p :: Pass). Maybe (LHsContext (GhcPass p)) -> [LHsType (GhcPass p)]
- getRecConArgs_maybe :: ConDecl GhcRn -> Maybe (LocatedL [LConDeclField GhcRn])
- getConNames :: ConDecl GhcRn -> [LocatedN Name]
- foldDerivStrategy :: forall p (pass :: Pass) r. p ~ GhcPass pass => r -> (XViaStrategy p -> r) -> DerivStrategy p -> r
- flattenRuleDecls :: forall (p :: Pass). [LRuleDecls (GhcPass p)] -> [LRuleDecl (GhcPass p)]
- familyDeclName :: forall (p :: Pass). FamilyDecl (GhcPass p) -> IdP (GhcPass p)
- familyDeclLName :: forall (p :: Pass). FamilyDecl (GhcPass p) -> XRec (GhcPass p) (IdP (GhcPass p))
- famResultKindSignature :: forall (p :: Pass). FamilyResultSig (GhcPass p) -> Maybe (LHsKind (GhcPass p))
- emptyRnGroup :: forall (p :: Pass). HsGroup (GhcPass p)
- emptyRdrGroup :: forall (p :: Pass). HsGroup (GhcPass p)
- appendGroups :: forall (p :: Pass). HsGroup (GhcPass p) -> HsGroup (GhcPass p) -> HsGroup (GhcPass p)
- data ListPatTc = ListPatTc Type (Maybe (Type, SyntaxExpr GhcTc))
- data EpAnnSumPat = EpAnnSumPat {}
- data ConPatTc = ConPatTc {}
- data CoPat = CoPat {}
- pprParendLPat :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LPat (GhcPass p) -> SDoc
- pprConArgs :: forall (p :: Pass). (OutputableBndrId p, Outputable (Anno (IdGhcP p))) => HsConPatDetails (GhcPass p) -> SDoc
- patNeedsParens :: forall (p :: Pass). IsPass p => PprPrec -> Pat (GhcPass p) -> Bool
- parenthesizePat :: forall (p :: Pass). IsPass p => PprPrec -> LPat (GhcPass p) -> LPat (GhcPass p)
- mkPrefixConPat :: DataCon -> [LPat GhcTc] -> [Type] -> LPat GhcTc
- mkNilPat :: Type -> LPat GhcTc
- mkCharLitPat :: SourceText -> Char -> LPat GhcTc
- looksLazyPatBind :: forall (p :: Pass). HsBind (GhcPass p) -> Bool
- isSimplePat :: forall (x :: Pass). LPat (GhcPass x) -> Maybe (IdP (GhcPass x))
- isIrrefutableHsPat :: forall (p :: Pass). OutputableBndrId p => DynFlags -> LPat (GhcPass p) -> Bool
- isBangedLPat :: forall (p :: Pass). LPat (GhcPass p) -> Bool
- hsRecUpdFieldRdr :: forall (p :: Pass). HsRecUpdField (GhcPass p) -> Located RdrName
- hsRecUpdFieldOcc :: HsRecField' (AmbiguousFieldOcc GhcTc) arg -> LFieldOcc GhcTc
- hsRecUpdFieldId :: HsRecField' (AmbiguousFieldOcc GhcTc) arg -> Located Id
- hsRecFieldId :: HsRecField GhcTc arg -> Located Id
- collectEvVarsPats :: [Pat GhcTc] -> Bag EvVar
- collectEvVarsPat :: Pat GhcTc -> Bag EvVar
- data NHsValBindsLR idL = NValBinds [(RecFlag, LHsBinds idL)] [LSig GhcRn]
- data AnnSig = AnnSig {}
- pragSrcBrackets :: SourceText -> String -> SDoc -> SDoc
- pragBrackets :: SDoc -> SDoc
- ppr_sig :: forall (p :: Pass). OutputableBndrId p => Sig (GhcPass p) -> SDoc
- ppr_monobind :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc
- pprVarSig :: OutputableBndr id => [id] -> SDoc -> SDoc
- pprTicks :: SDoc -> SDoc -> SDoc
- pprTcSpecPrags :: TcSpecPrags -> SDoc
- pprSpec :: OutputableBndr id => id -> SDoc -> InlinePragma -> SDoc
- pprMinimalSig :: OutputableBndr name => LBooleanFormula (GenLocated l name) -> SDoc
- pprLHsBindsForUser :: forall (idL :: Pass) (idR :: Pass) (id2 :: Pass). (OutputableBndrId idL, OutputableBndrId idR, OutputableBndrId id2) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc]
- pprLHsBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
- pprDeclList :: [SDoc] -> SDoc
- plusHsValBinds :: forall (a :: Pass). HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) -> HsValBinds (GhcPass a)
- isEmptyValBinds :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) -> Bool
- isEmptyLHsBinds :: forall (idL :: Pass) idR. LHsBindsLR (GhcPass idL) idR -> Bool
- isEmptyIPBindsTc :: HsIPBinds GhcTc -> Bool
- isEmptyIPBindsPR :: forall (p :: Pass). HsIPBinds (GhcPass p) -> Bool
- eqEmptyLocalBinds :: HsLocalBindsLR a b -> Bool
- emptyValBindsOut :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b)
- emptyValBindsIn :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b)
- emptyLocalBinds :: forall (a :: Pass) (b :: Pass). HsLocalBindsLR (GhcPass a) (GhcPass b)
- emptyLHsBinds :: forall (idL :: Pass) idR. LHsBindsLR (GhcPass idL) idR
- class OutputableBndrFlag flag (p :: Pass)
- type EpAnnForallTy = EpAnn (AddEpAnn, AddEpAnn)
- unambiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> FieldOcc GhcTc
- splitLHsSigmaTyInvis :: forall (p :: Pass). LHsType (GhcPass p) -> ([LHsTyVarBndr Specificity (GhcPass p)], Maybe (LHsContext (GhcPass p)), LHsType (GhcPass p))
- splitLHsQualTy :: forall (pass :: Pass). LHsType (GhcPass pass) -> (Maybe (LHsContext (GhcPass pass)), LHsType (GhcPass pass))
- splitLHsPatSynTy :: forall (p :: Pass). LHsSigType (GhcPass p) -> ([LHsTyVarBndr Specificity (GhcPass (NoGhcTcPass p))], Maybe (LHsContext (GhcPass p)), [LHsTyVarBndr Specificity (GhcPass p)], Maybe (LHsContext (GhcPass p)), LHsType (GhcPass p))
- splitLHsInstDeclTy :: LHsSigType GhcRn -> ([Name], Maybe (LHsContext GhcRn), LHsType GhcRn)
- splitLHsGadtTy :: LHsSigType GhcPs -> (HsOuterSigTyVarBndrs GhcPs, Maybe (LHsContext GhcPs), LHsType GhcPs)
- splitLHsForAllTyInvis_KP :: forall (pass :: Pass). LHsType (GhcPass pass) -> (Maybe (EpAnnForallTy, [LHsTyVarBndr Specificity (GhcPass pass)]), LHsType (GhcPass pass))
- splitLHsForAllTyInvis :: forall (pass :: Pass). LHsType (GhcPass pass) -> ((EpAnnForallTy, [LHsTyVarBndr Specificity (GhcPass pass)]), LHsType (GhcPass pass))
- splitHsFunType :: forall (p :: Pass). LHsType (GhcPass p) -> ([AddEpAnn], EpAnnComments, [HsScaled (GhcPass p) (LHsType (GhcPass p))], LHsType (GhcPass p))
- setHsTyVarBndrFlag :: forall flag flag' (pass :: Pass). flag -> HsTyVarBndr flag' (GhcPass pass) -> HsTyVarBndr flag (GhcPass pass)
- selectorAmbiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> Id
- rdrNameAmbiguousFieldOcc :: forall (p :: Pass). AmbiguousFieldOcc (GhcPass p) -> RdrName
- pprLHsContext :: forall (p :: Pass). OutputableBndrId p => Maybe (LHsContext (GhcPass p)) -> SDoc
- pprHsType :: forall (p :: Pass). OutputableBndrId p => HsType (GhcPass p) -> SDoc
- pprHsOuterSigTyVarBndrs :: forall (p :: Pass). OutputableBndrId p => HsOuterSigTyVarBndrs (GhcPass p) -> SDoc
- pprHsOuterFamEqnTyVarBndrs :: forall (p :: Pass). OutputableBndrId p => HsOuterFamEqnTyVarBndrs (GhcPass p) -> SDoc
- pprHsForAll :: forall (p :: Pass). OutputableBndrId p => HsForAllTelescope (GhcPass p) -> Maybe (LHsContext (GhcPass p)) -> SDoc
- pprConDeclFields :: forall (p :: Pass). OutputableBndrId p => [LConDeclField (GhcPass p)] -> SDoc
- pprAnonWildCard :: SDoc
- parenthesizeHsType :: forall (p :: Pass). PprPrec -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- parenthesizeHsContext :: forall (p :: Pass). PprPrec -> LHsContext (GhcPass p) -> LHsContext (GhcPass p)
- mkHsWildCardBndrs :: thing -> HsWildCardBndrs GhcPs thing
- mkHsQTvs :: [LHsTyVarBndr () GhcPs] -> LHsQTyVars GhcPs
- mkHsPatSigType :: EpAnn EpaLocation -> LHsType GhcPs -> HsPatSigType GhcPs
- mkHsOuterImplicit :: HsOuterTyVarBndrs flag GhcPs
- mkHsOuterExplicit :: EpAnnForallTy -> [LHsTyVarBndr flag GhcPs] -> HsOuterTyVarBndrs flag GhcPs
- mkHsOpTy :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => LHsType (GhcPass p) -> LocatedN (IdP (GhcPass p)) -> LHsType (GhcPass p) -> HsType (GhcPass p)
- mkHsImplicitSigType :: LHsType GhcPs -> HsSigType GhcPs
- mkHsForAllVisTele :: forall (p :: Pass). EpAnnForallTy -> [LHsTyVarBndr () (GhcPass p)] -> HsForAllTelescope (GhcPass p)
- mkHsForAllInvisTele :: forall (p :: Pass). EpAnnForallTy -> [LHsTyVarBndr Specificity (GhcPass p)] -> HsForAllTelescope (GhcPass p)
- mkHsExplicitSigType :: EpAnnForallTy -> [LHsTyVarBndr Specificity GhcPs] -> LHsType GhcPs -> HsSigType GhcPs
- mkHsAppTys :: forall (p :: Pass). LHsType (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p)
- mkHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- mkHsAppKindTy :: forall (p :: Pass). XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- mkFieldOcc :: LocatedN RdrName -> FieldOcc GhcPs
- mkEmptyWildCardBndrs :: thing -> HsWildCardBndrs GhcRn thing
- mkAnonWildCardTy :: HsType GhcPs
- mkAmbiguousFieldOcc :: LocatedN RdrName -> AmbiguousFieldOcc GhcPs
- lhsTypeArgSrcSpan :: forall (pass :: Pass). LHsTypeArg (GhcPass pass) -> SrcSpan
- isUnrestricted :: HsArrow GhcRn -> Bool
- ignoreParens :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p)
- hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name]
- hsTypeNeedsParens :: forall (p :: Pass). PprPrec -> HsType (GhcPass p) -> Bool
- hsTyVarName :: forall flag (p :: Pass). HsTyVarBndr flag (GhcPass p) -> IdP (GhcPass p)
- hsTyVarBndrFlag :: forall flag (pass :: Pass). HsTyVarBndr flag (GhcPass pass) -> flag
- hsTyKindSig :: forall (p :: Pass). LHsType (GhcPass p) -> Maybe (LHsKind (GhcPass p))
- hsTyGetAppHead_maybe :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => LHsType (GhcPass p) -> Maybe (LocatedN (IdP (GhcPass p)))
- hsTvbAllKinded :: forall (p :: Pass). LHsQTyVars (GhcPass p) -> Bool
- hsSigWcType :: UnXRec p => LHsSigWcType p -> LHsType p
- hsScopedTvs :: LHsSigType GhcRn -> [Name]
- hsOuterTyVarNames :: HsOuterTyVarBndrs flag GhcRn -> [Name]
- hsOuterExplicitBndrs :: forall flag (p :: Pass). HsOuterTyVarBndrs flag (GhcPass p) -> [LHsTyVarBndr flag (NoGhcTc (GhcPass p))]
- hsLTyVarNames :: forall flag (p :: Pass). [LHsTyVarBndr flag (GhcPass p)] -> [IdP (GhcPass p)]
- hsLTyVarName :: forall flag (p :: Pass). LHsTyVarBndr flag (GhcPass p) -> IdP (GhcPass p)
- hsLTyVarLocNames :: forall (p :: Pass). LHsQTyVars (GhcPass p) -> [LocatedN (IdP (GhcPass p))]
- hsLTyVarLocName :: forall flag (p :: Pass). LHsTyVarBndr flag (GhcPass p) -> LocatedN (IdP (GhcPass p))
- hsExplicitLTyVarNames :: forall (p :: Pass). LHsQTyVars (GhcPass p) -> [IdP (GhcPass p)]
- hsAllLTyVarNames :: LHsQTyVars GhcRn -> [Name]
- getLHsInstDeclHead :: forall (p :: Pass). LHsSigType (GhcPass p) -> LHsType (GhcPass p)
- getLHsInstDeclClass_maybe :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => LHsSigType (GhcPass p) -> Maybe (LocatedN (IdP (GhcPass p)))
- getBangType :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p)
- getBangStrictness :: forall (p :: Pass). LHsType (GhcPass p) -> HsSrcBang
- fromMaybeContext :: forall (p :: Pass). Maybe (LHsContext (GhcPass p)) -> HsContext (GhcPass p)
- emptyLHsQTvs :: LHsQTyVars GhcRn
- dropWildCards :: LHsSigWcType pass -> LHsSigType pass
- arrowToHsType :: HsArrow GhcRn -> LHsType GhcRn
- ambiguousFieldOcc :: FieldOcc GhcTc -> AmbiguousFieldOcc GhcTc
- data OverLitTc = OverLitTc {
- ol_rebindable :: Bool
- ol_type :: Type
- pp_st_suffix :: SourceText -> SDoc -> SDoc -> SDoc
- pmPprHsLit :: forall (x :: Pass). HsLit (GhcPass x) -> SDoc
- overLitType :: HsOverLit GhcTc -> Type
- convertLit :: forall (p1 :: Pass) (p2 :: Pass). HsLit (GhcPass p1) -> HsLit (GhcPass p2)
- pprSpliceDecl :: forall (p :: Pass). OutputableBndrId p => HsSplice (GhcPass p) -> SpliceExplicitFlag -> SDoc
- pprSplice :: forall (p :: Pass). OutputableBndrId p => HsSplice (GhcPass p) -> SDoc
- pprPatBind :: forall (bndr :: Pass) (p :: Pass). (OutputableBndrId bndr, OutputableBndrId p) => LPat (GhcPass bndr) -> GRHSs (GhcPass p) (LHsExpr (GhcPass p)) -> SDoc
- pprLExpr :: forall (p :: Pass). OutputableBndrId p => LHsExpr (GhcPass p) -> SDoc
- pprFunBind :: forall (idR :: Pass). OutputableBndrId idR => MatchGroup (GhcPass idR) (LHsExpr (GhcPass idR)) -> SDoc
- pprExpr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> SDoc
- data UntypedSpliceFlavour
- data TransForm
- newtype ThModFinalizers = ThModFinalizers [ForeignRef (Q ())]
- data StmtLR idL idR body
- = LastStmt (XLastStmt idL idR body) body (Maybe Bool) (SyntaxExpr idR)
- | BindStmt (XBindStmt idL idR body) (LPat idL) body
- | ApplicativeStmt (XApplicativeStmt idL idR body) [(SyntaxExpr idR, ApplicativeArg idL)] (Maybe (SyntaxExpr idR))
- | BodyStmt (XBodyStmt idL idR body) body (SyntaxExpr idR) (SyntaxExpr idR)
- | LetStmt (XLetStmt idL idR body) (HsLocalBindsLR idL idR)
- | ParStmt (XParStmt idL idR body) [ParStmtBlock idL idR] (HsExpr idR) (SyntaxExpr idR)
- | TransStmt { }
- | RecStmt {
- recS_ext :: XRecStmt idL idR body
- recS_stmts :: XRec idR [LStmtLR idL idR body]
- recS_later_ids :: [IdP idR]
- recS_rec_ids :: [IdP idR]
- recS_bind_fn :: SyntaxExpr idR
- recS_ret_fn :: SyntaxExpr idR
- recS_mfix_fn :: SyntaxExpr idR
- | XStmtLR !(XXStmtLR idL idR body)
- type SplicePointName = Name
- data SpliceDecoration
- type RecUpdProj p = RecProj p (LHsExpr p)
- type RecProj p arg = HsRecField' (FieldLabelStrings p) arg
- type family PendingTcSplice' p
- type family PendingRnSplice' p
- data ParStmtBlock idL idR
- = ParStmtBlock (XParStmtBlock idL idR) [ExprLStmt idL] [IdP idR] (SyntaxExpr idR)
- | XParStmtBlock !(XXParStmtBlock idL idR)
- data MatchGroupTc = MatchGroupTc {
- mg_arg_tys :: [Scaled Type]
- mg_res_ty :: Type
- data Match p body
- type LStmtLR idL idR body = XRec idL (StmtLR idL idR body)
- type LStmt id body = XRec id (StmtLR id id body)
- type LMatch id body = XRec id (Match id body)
- type LHsTupArg id = XRec id (HsTupArg id)
- type LHsRecUpdProj p = XRec p (RecUpdProj p)
- type LHsRecProj p arg = XRec p (RecProj p arg)
- type LHsCmdTop p = XRec p (HsCmdTop p)
- type LHsCmd id = XRec id (HsCmd id)
- type LGRHS id body = XRec id (GRHS id body)
- data HsTupArg id
- data HsStmtContext p
- = ListComp
- | MonadComp
- | DoExpr (Maybe ModuleName)
- | MDoExpr (Maybe ModuleName)
- | ArrowExpr
- | GhciStmtCtxt
- | PatGuard (HsMatchContext p)
- | ParStmtCtxt (HsStmtContext p)
- | TransStmtCtxt (HsStmtContext p)
- data HsSplicedThing id
- = HsSplicedExpr (HsExpr id)
- | HsSplicedTy (HsType id)
- | HsSplicedPat (Pat id)
- type HsRecordBinds p = HsRecFields p (LHsExpr p)
- data HsPragE p
- = HsPragSCC (XSCC p) SourceText StringLiteral
- | XHsPragE !(XXPragE p)
- data HsMatchContext p
- data HsFieldLabel p
- = HsFieldLabel { }
- | XHsFieldLabel !(XXHsFieldLabel p)
- type family HsDoRn p
- data HsCmdTop p
- data HsCmd id
- = HsCmdArrApp (XCmdArrApp id) (LHsExpr id) (LHsExpr id) HsArrAppType Bool
- | HsCmdArrForm (XCmdArrForm id) (LHsExpr id) LexicalFixity (Maybe Fixity) [LHsCmdTop id]
- | HsCmdApp (XCmdApp id) (LHsCmd id) (LHsExpr id)
- | HsCmdLam (XCmdLam id) (MatchGroup id (LHsCmd id))
- | HsCmdPar (XCmdPar id) (LHsCmd id)
- | HsCmdCase (XCmdCase id) (LHsExpr id) (MatchGroup id (LHsCmd id))
- | HsCmdLamCase (XCmdLamCase id) (MatchGroup id (LHsCmd id))
- | HsCmdIf (XCmdIf id) (SyntaxExpr id) (LHsExpr id) (LHsCmd id) (LHsCmd id)
- | HsCmdLet (XCmdLet id) (HsLocalBinds id) (LHsCmd id)
- | HsCmdDo (XCmdDo id) (XRec id [CmdLStmt id])
- | XCmd !(XXCmd id)
- type family HsBracketRn p
- data HsBracket p
- data HsArrowMatchContext
- data HsArrAppType
- type GuardStmt id = Stmt id (LHsExpr id)
- type GuardLStmt id = LStmt id (LHsExpr id)
- type GhciStmt id = Stmt id (LHsExpr id)
- type GhciLStmt id = LStmt id (LHsExpr id)
- data GRHS p body
- = GRHS (XCGRHS p body) [GuardLStmt p] body
- | XGRHS !(XXGRHS p body)
- newtype FieldLabelStrings p = FieldLabelStrings [Located (HsFieldLabel p)]
- type FailOperator id = Maybe (SyntaxExpr id)
- type ExprStmt id = Stmt id (LHsExpr id)
- type ExprLStmt id = LStmt id (LHsExpr id)
- type CmdSyntaxTable p = [(Name, HsExpr p)]
- type CmdStmt id = Stmt id (LHsCmd id)
- type CmdLStmt id = LStmt id (LHsCmd id)
- data ArithSeqInfo id
- type family ApplicativeArgStmCtxPass idL
- data ApplicativeArg idL
- = ApplicativeArgOne {
- xarg_app_arg_one :: XApplicativeArgOne idL
- app_arg_pattern :: LPat idL
- arg_expr :: LHsExpr idL
- is_body_stmt :: Bool
- | ApplicativeArgMany {
- xarg_app_arg_many :: XApplicativeArgMany idL
- app_stmts :: [ExprLStmt idL]
- final_expr :: HsExpr idL
- bv_pattern :: LPat idL
- stmt_context :: HsStmtContext (ApplicativeArgStmCtxPass idL)
- | XApplicativeArg !(XXApplicativeArg idL)
- = ApplicativeArgOne {
- qualifiedDoModuleName_maybe :: HsStmtContext p -> Maybe ModuleName
- prependQualified :: Maybe ModuleName -> SDoc -> SDoc
- pprStmtContext :: (Outputable (IdP p), UnXRec p) => HsStmtContext p -> SDoc
- pprMatchContextNoun :: (Outputable (IdP p), UnXRec p) => HsMatchContext p -> SDoc
- pprMatchContext :: (Outputable (IdP p), UnXRec p) => HsMatchContext p -> SDoc
- pprFieldLabelStrings :: FieldLabelStrings p -> SDoc
- pprExternalSrcLoc :: (StringLiteral, (Int, Int), (Int, Int)) -> SDoc
- pprArrowMatchContextNoun :: HsArrowMatchContext -> SDoc
- pprAStmtContext :: (Outputable (IdP p), UnXRec p) => HsStmtContext p -> SDoc
- matchSeparator :: HsMatchContext p -> SDoc
- isTypedSplice :: HsSplice id -> Bool
- isTypedBracket :: HsBracket id -> Bool
- isPatSynCtxt :: HsMatchContext p -> Bool
- isMonadStmtContext :: HsStmtContext id -> Bool
- isMonadCompContext :: HsStmtContext id -> Bool
- isInfixMatch :: Match id body -> Bool
- isComprehensionContext :: HsStmtContext id -> Bool
- data WarnDecls pass
- = Warnings {
- wd_ext :: XWarnings pass
- wd_src :: SourceText
- wd_warnings :: [LWarnDecl pass]
- | XWarnDecls !(XXWarnDecls pass)
- = Warnings {
- data WarnDecl pass
- = Warning (XWarning pass) [LIdP pass] WarningTxt
- | XWarnDecl !(XXWarnDecl pass)
- type TyFamInstEqn pass = FamEqn pass (LHsType pass)
- data TyFamInstDecl pass
- = TyFamInstDecl {
- tfid_xtn :: XCTyFamInstDecl pass
- tfid_eqn :: TyFamInstEqn pass
- | XTyFamInstDecl !(XXTyFamInstDecl pass)
- = TyFamInstDecl {
- type TyFamDefltDecl = TyFamInstDecl
- data TyClGroup pass
- = TyClGroup {
- group_ext :: XCTyClGroup pass
- group_tyclds :: [LTyClDecl pass]
- group_roles :: [LRoleAnnotDecl pass]
- group_kisigs :: [LStandaloneKindSig pass]
- group_instds :: [LInstDecl pass]
- | XTyClGroup !(XXTyClGroup pass)
- = TyClGroup {
- data TyClDecl pass
- = FamDecl {
- tcdFExt :: XFamDecl pass
- tcdFam :: FamilyDecl pass
- | SynDecl {
- tcdSExt :: XSynDecl pass
- tcdLName :: LIdP pass
- tcdTyVars :: LHsQTyVars pass
- tcdFixity :: LexicalFixity
- tcdRhs :: LHsType pass
- | DataDecl {
- tcdDExt :: XDataDecl pass
- tcdLName :: LIdP pass
- tcdTyVars :: LHsQTyVars pass
- tcdFixity :: LexicalFixity
- tcdDataDefn :: HsDataDefn pass
- | ClassDecl {
- tcdCExt :: XClassDecl pass
- tcdCtxt :: Maybe (LHsContext pass)
- tcdLName :: LIdP pass
- tcdTyVars :: LHsQTyVars pass
- tcdFixity :: LexicalFixity
- tcdFDs :: [LHsFunDep pass]
- tcdSigs :: [LSig pass]
- tcdMeths :: LHsBinds pass
- tcdATs :: [LFamilyDecl pass]
- tcdATDefs :: [LTyFamDefltDecl pass]
- tcdDocs :: [LDocDecl pass]
- | XTyClDecl !(XXTyClDecl pass)
- = FamDecl {
- data StandaloneKindSig pass
- = StandaloneKindSig (XStandaloneKindSig pass) (LIdP pass) (LHsSigType pass)
- | XStandaloneKindSig !(XXStandaloneKindSig pass)
- data SpliceDecl p
- = SpliceDecl (XSpliceDecl p) (XRec p (HsSplice p)) SpliceExplicitFlag
- | XSpliceDecl !(XXSpliceDecl p)
- data RuleDecls pass
- = HsRules {
- rds_ext :: XCRuleDecls pass
- rds_src :: SourceText
- rds_rules :: [LRuleDecl pass]
- | XRuleDecls !(XXRuleDecls pass)
- = HsRules {
- data RuleDecl pass
- data RuleBndr pass
- = RuleBndr (XCRuleBndr pass) (LIdP pass)
- | RuleBndrSig (XRuleBndrSig pass) (LIdP pass) (HsPatSigType pass)
- | XRuleBndr !(XXRuleBndr pass)
- data RoleAnnotDecl pass
- = RoleAnnotDecl (XCRoleAnnotDecl pass) (LIdP pass) [XRec pass (Maybe Role)]
- | XRoleAnnotDecl !(XXRoleAnnotDecl pass)
- data NewOrData
- type LWarnDecls pass = XRec pass (WarnDecls pass)
- type LWarnDecl pass = XRec pass (WarnDecl pass)
- type LTyFamInstEqn pass = XRec pass (TyFamInstEqn pass)
- type LTyFamInstDecl pass = XRec pass (TyFamInstDecl pass)
- type LTyFamDefltDecl pass = XRec pass (TyFamDefltDecl pass)
- type LTyClDecl pass = XRec pass (TyClDecl pass)
- type LStandaloneKindSig pass = XRec pass (StandaloneKindSig pass)
- type LSpliceDecl pass = XRec pass (SpliceDecl pass)
- type LRuleDecls pass = XRec pass (RuleDecls pass)
- type LRuleDecl pass = XRec pass (RuleDecl pass)
- type LRuleBndr pass = XRec pass (RuleBndr pass)
- type LRoleAnnotDecl pass = XRec pass (RoleAnnotDecl pass)
- type LInstDecl pass = XRec pass (InstDecl pass)
- type LInjectivityAnn pass = XRec pass (InjectivityAnn pass)
- type LHsFunDep pass = XRec pass (FunDep pass)
- type LHsDerivingClause pass = XRec pass (HsDerivingClause pass)
- type LHsDecl p = XRec p (HsDecl p)
- type LForeignDecl pass = XRec pass (ForeignDecl pass)
- type LFamilyResultSig pass = XRec pass (FamilyResultSig pass)
- type LFamilyDecl pass = XRec pass (FamilyDecl pass)
- type LDocDecl pass = XRec pass DocDecl
- type LDerivStrategy pass = XRec pass (DerivStrategy pass)
- type LDerivDecl pass = XRec pass (DerivDecl pass)
- type LDerivClauseTys pass = XRec pass (DerivClauseTys pass)
- type LDefaultDecl pass = XRec pass (DefaultDecl pass)
- type LDataFamInstDecl pass = XRec pass (DataFamInstDecl pass)
- type LConDecl pass = XRec pass (ConDecl pass)
- type LClsInstDecl pass = XRec pass (ClsInstDecl pass)
- type LAnnDecl pass = XRec pass (AnnDecl pass)
- data InstDecl pass
- = ClsInstD {
- cid_d_ext :: XClsInstD pass
- cid_inst :: ClsInstDecl pass
- | DataFamInstD {
- dfid_ext :: XDataFamInstD pass
- dfid_inst :: DataFamInstDecl pass
- | TyFamInstD {
- tfid_ext :: XTyFamInstD pass
- tfid_inst :: TyFamInstDecl pass
- | XInstDecl !(XXInstDecl pass)
- = ClsInstD {
- data InjectivityAnn pass
- = InjectivityAnn (XCInjectivityAnn pass) (LIdP pass) [LIdP pass]
- | XInjectivityAnn !(XXInjectivityAnn pass)
- type HsTyPats pass = [LHsTypeArg pass]
- data HsRuleRn = HsRuleRn NameSet NameSet
- data HsGroup p
- = HsGroup {
- hs_ext :: XCHsGroup p
- hs_valds :: HsValBinds p
- hs_splcds :: [LSpliceDecl p]
- hs_tyclds :: [TyClGroup p]
- hs_derivds :: [LDerivDecl p]
- hs_fixds :: [LFixitySig p]
- hs_defds :: [LDefaultDecl p]
- hs_fords :: [LForeignDecl p]
- hs_warnds :: [LWarnDecls p]
- hs_annds :: [LAnnDecl p]
- hs_ruleds :: [LRuleDecls p]
- hs_docs :: [LDocDecl p]
- | XHsGroup !(XXHsGroup p)
- = HsGroup {
- data HsDerivingClause pass
- = HsDerivingClause {
- deriv_clause_ext :: XCHsDerivingClause pass
- deriv_clause_strategy :: Maybe (LDerivStrategy pass)
- deriv_clause_tys :: LDerivClauseTys pass
- | XHsDerivingClause !(XXHsDerivingClause pass)
- = HsDerivingClause {
- type HsDeriving pass = [LHsDerivingClause pass]
- data HsDecl p
- = TyClD (XTyClD p) (TyClDecl p)
- | InstD (XInstD p) (InstDecl p)
- | DerivD (XDerivD p) (DerivDecl p)
- | ValD (XValD p) (HsBind p)
- | SigD (XSigD p) (Sig p)
- | KindSigD (XKindSigD p) (StandaloneKindSig p)
- | DefD (XDefD p) (DefaultDecl p)
- | ForD (XForD p) (ForeignDecl p)
- | WarningD (XWarningD p) (WarnDecls p)
- | AnnD (XAnnD p) (AnnDecl p)
- | RuleD (XRuleD p) (RuleDecls p)
- | SpliceD (XSpliceD p) (SpliceDecl p)
- | DocD (XDocD p) DocDecl
- | RoleAnnotD (XRoleAnnotD p) (RoleAnnotDecl p)
- | XHsDecl !(XXHsDecl p)
- data HsDataDefn pass
- = HsDataDefn {
- dd_ext :: XCHsDataDefn pass
- dd_ND :: NewOrData
- dd_ctxt :: Maybe (LHsContext pass)
- dd_cType :: Maybe (XRec pass CType)
- dd_kindSig :: Maybe (LHsKind pass)
- dd_cons :: [LConDecl pass]
- dd_derivs :: HsDeriving pass
- | XHsDataDefn !(XXHsDataDefn pass)
- = HsDataDefn {
- type HsConDeclH98Details pass = HsConDetails Void (HsScaled pass (LBangType pass)) (XRec pass [LConDeclField pass])
- data HsConDeclGADTDetails pass
- = PrefixConGADT [HsScaled pass (LBangType pass)]
- | RecConGADT (XRec pass [LConDeclField pass])
- data FunDep pass
- data ForeignImport = CImport (Located CCallConv) (Located Safety) (Maybe Header) CImportSpec (Located SourceText)
- data ForeignExport = CExport (Located CExportSpec) (Located SourceText)
- data ForeignDecl pass
- = ForeignImport {
- fd_i_ext :: XForeignImport pass
- fd_name :: LIdP pass
- fd_sig_ty :: LHsSigType pass
- fd_fi :: ForeignImport
- | ForeignExport {
- fd_e_ext :: XForeignExport pass
- fd_name :: LIdP pass
- fd_sig_ty :: LHsSigType pass
- fd_fe :: ForeignExport
- | XForeignDecl !(XXForeignDecl pass)
- = ForeignImport {
- data FamilyResultSig pass
- = NoSig (XNoSig pass)
- | KindSig (XCKindSig pass) (LHsKind pass)
- | TyVarSig (XTyVarSig pass) (LHsTyVarBndr () pass)
- | XFamilyResultSig !(XXFamilyResultSig pass)
- data FamilyInfo pass
- = DataFamily
- | OpenTypeFamily
- | ClosedTypeFamily (Maybe [LTyFamInstEqn pass])
- data FamilyDecl pass
- = FamilyDecl {
- fdExt :: XCFamilyDecl pass
- fdInfo :: FamilyInfo pass
- fdTopLevel :: TopLevelFlag
- fdLName :: LIdP pass
- fdTyVars :: LHsQTyVars pass
- fdFixity :: LexicalFixity
- fdResultSig :: LFamilyResultSig pass
- fdInjectivityAnn :: Maybe (LInjectivityAnn pass)
- | XFamilyDecl !(XXFamilyDecl pass)
- = FamilyDecl {
- data FamEqn pass rhs
- = FamEqn {
- feqn_ext :: XCFamEqn pass rhs
- feqn_tycon :: LIdP pass
- feqn_bndrs :: HsOuterFamEqnTyVarBndrs pass
- feqn_pats :: HsTyPats pass
- feqn_fixity :: LexicalFixity
- feqn_rhs :: rhs
- | XFamEqn !(XXFamEqn pass rhs)
- = FamEqn {
- data DocDecl
- data DerivStrategy pass
- = StockStrategy (XStockStrategy pass)
- | AnyclassStrategy (XAnyClassStrategy pass)
- | NewtypeStrategy (XNewtypeStrategy pass)
- | ViaStrategy (XViaStrategy pass)
- data DerivDecl pass
- = DerivDecl {
- deriv_ext :: XCDerivDecl pass
- deriv_type :: LHsSigWcType pass
- deriv_strategy :: Maybe (LDerivStrategy pass)
- deriv_overlap_mode :: Maybe (XRec pass OverlapMode)
- | XDerivDecl !(XXDerivDecl pass)
- = DerivDecl {
- data DerivClauseTys pass
- = DctSingle (XDctSingle pass) (LHsSigType pass)
- | DctMulti (XDctMulti pass) [LHsSigType pass]
- | XDerivClauseTys !(XXDerivClauseTys pass)
- data DefaultDecl pass
- = DefaultDecl (XCDefaultDecl pass) [LHsType pass]
- | XDefaultDecl !(XXDefaultDecl pass)
- newtype DataFamInstDecl pass = DataFamInstDecl {
- dfid_eqn :: FamEqn pass (HsDataDefn pass)
- data DataDeclRn = DataDeclRn {
- tcdDataCusk :: Bool
- tcdFVs :: NameSet
- data ConDecl pass
- = ConDeclGADT {
- con_g_ext :: XConDeclGADT pass
- con_names :: [LIdP pass]
- con_bndrs :: XRec pass (HsOuterSigTyVarBndrs pass)
- con_mb_cxt :: Maybe (LHsContext pass)
- con_g_args :: HsConDeclGADTDetails pass
- con_res_ty :: LHsType pass
- con_doc :: Maybe LHsDocString
- | ConDeclH98 {
- con_ext :: XConDeclH98 pass
- con_name :: LIdP pass
- con_forall :: Bool
- con_ex_tvs :: [LHsTyVarBndr Specificity pass]
- con_mb_cxt :: Maybe (LHsContext pass)
- con_args :: HsConDeclH98Details pass
- con_doc :: Maybe LHsDocString
- | XConDecl !(XXConDecl pass)
- = ConDeclGADT {
- data ClsInstDecl pass
- = ClsInstDecl {
- cid_ext :: XCClsInstDecl pass
- cid_poly_ty :: LHsSigType pass
- cid_binds :: LHsBinds pass
- cid_sigs :: [LSig pass]
- cid_tyfam_insts :: [LTyFamInstDecl pass]
- cid_datafam_insts :: [LDataFamInstDecl pass]
- cid_overlap_mode :: Maybe (XRec pass OverlapMode)
- | XClsInstDecl !(XXClsInstDecl pass)
- = ClsInstDecl {
- data CImportSpec
- data AnnProvenance pass
- = ValueAnnProvenance (LIdP pass)
- | TypeAnnProvenance (LIdP pass)
- | ModuleAnnProvenance
- data AnnDecl pass
- = HsAnnotation (XHsAnnotation pass) SourceText (AnnProvenance pass) (XRec pass (HsExpr pass))
- | XAnnDecl !(XXAnnDecl pass)
- tyClGroupTyClDecls :: [TyClGroup pass] -> [LTyClDecl pass]
- tyClGroupRoleDecls :: [TyClGroup pass] -> [LRoleAnnotDecl pass]
- tyClGroupKindSigs :: [TyClGroup pass] -> [LStandaloneKindSig pass]
- tyClGroupInstDecls :: [TyClGroup pass] -> [LInstDecl pass]
- tyClDeclTyVars :: TyClDecl pass -> LHsQTyVars pass
- pprFullRuleName :: Located (SourceText, RuleName) -> SDoc
- pprFlavour :: FamilyInfo pass -> SDoc
- newOrDataToFlavour :: NewOrData -> TyConFlavour
- isTypeFamilyDecl :: TyClDecl pass -> Bool
- isSynDecl :: TyClDecl pass -> Bool
- isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool
- isFamilyDecl :: TyClDecl pass -> Bool
- isDataFamilyDecl :: TyClDecl pass -> Bool
- isDataDecl :: TyClDecl pass -> Bool
- isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool
- isClassDecl :: TyClDecl pass -> Bool
- hsGroupInstDecls :: HsGroup id -> [LInstDecl id]
- docDeclDoc :: DocDecl -> HsDocString
- derivStrategyName :: DerivStrategy a -> SDoc
- countTyClDecls :: [TyClDecl pass] -> (Int, Int, Int, Int, Int)
- collectRuleBndrSigTys :: [RuleBndr pass] -> [HsPatSigType pass]
- annProvenanceName_maybe :: UnXRec p => AnnProvenance p -> Maybe (IdP p)
- data TcSpecPrags
- data TcSpecPrag = SpecPrag Id HsWrapper InlinePragma
- data Sig pass
- = TypeSig (XTypeSig pass) [LIdP pass] (LHsSigWcType pass)
- | PatSynSig (XPatSynSig pass) [LIdP pass] (LHsSigType pass)
- | ClassOpSig (XClassOpSig pass) Bool [LIdP pass] (LHsSigType pass)
- | IdSig (XIdSig pass) Id
- | FixSig (XFixSig pass) (FixitySig pass)
- | InlineSig (XInlineSig pass) (LIdP pass) InlinePragma
- | SpecSig (XSpecSig pass) (LIdP pass) [LHsSigType pass] InlinePragma
- | SpecInstSig (XSpecInstSig pass) SourceText (LHsSigType pass)
- | MinimalSig (XMinimalSig pass) SourceText (LBooleanFormula (LIdP pass))
- | SCCFunSig (XSCCFunSig pass) SourceText (LIdP pass) (Maybe (XRec pass StringLiteral))
- | CompleteMatchSig (XCompleteMatchSig pass) SourceText (XRec pass [LIdP pass]) (Maybe (LIdP pass))
- | XSig !(XXSig pass)
- data RecordPatSynField pass = RecordPatSynField {
- recordPatSynField :: FieldOcc pass
- recordPatSynPatVar :: LIdP pass
- data PatSynBind idL idR
- = PSB {
- psb_ext :: XPSB idL idR
- psb_id :: LIdP idL
- psb_args :: HsPatSynDetails idR
- psb_def :: LPat idR
- psb_dir :: HsPatSynDir idR
- | XPatSynBind !(XXPatSynBind idL idR)
- = PSB {
- type LTcSpecPrag = Located TcSpecPrag
- type LSig pass = XRec pass (Sig pass)
- type LIPBind id = XRec id (IPBind id)
- type LHsLocalBindsLR idL idR = XRec idL (HsLocalBindsLR idL idR)
- type LHsLocalBinds id = XRec id (HsLocalBinds id)
- type LHsBindsLR idL idR = Bag (LHsBindLR idL idR)
- type LHsBinds id = LHsBindsLR id id
- type LHsBindLR idL idR = XRec idL (HsBindLR idL idR)
- type LHsBind id = LHsBindLR id id
- type LFixitySig pass = XRec pass (FixitySig pass)
- data IPBind id
- data HsValBindsLR idL idR
- = ValBinds (XValBinds idL idR) (LHsBindsLR idL idR) [LSig idR]
- | XValBindsLR !(XXValBindsLR idL idR)
- type HsValBinds id = HsValBindsLR id id
- data HsPatSynDir id
- type HsPatSynDetails pass = HsConDetails Void (LIdP pass) [RecordPatSynField pass]
- data HsLocalBindsLR idL idR
- = HsValBinds (XHsValBinds idL idR) (HsValBindsLR idL idR)
- | HsIPBinds (XHsIPBinds idL idR) (HsIPBinds idR)
- | EmptyLocalBinds (XEmptyLocalBinds idL idR)
- | XHsLocalBindsLR !(XXHsLocalBindsLR idL idR)
- type HsLocalBinds id = HsLocalBindsLR id id
- data HsIPBinds id
- = IPBinds (XIPBinds id) [LIPBind id]
- | XHsIPBinds !(XXHsIPBinds id)
- data HsBindLR idL idR
- = FunBind {
- fun_ext :: XFunBind idL idR
- fun_id :: LIdP idL
- fun_matches :: MatchGroup idR (LHsExpr idR)
- fun_tick :: [CoreTickish]
- | PatBind {
- pat_ext :: XPatBind idL idR
- pat_lhs :: LPat idL
- pat_rhs :: GRHSs idR (LHsExpr idR)
- pat_ticks :: ([CoreTickish], [[CoreTickish]])
- | VarBind { }
- | AbsBinds {
- abs_ext :: XAbsBinds idL idR
- abs_tvs :: [TyVar]
- abs_ev_vars :: [EvVar]
- abs_exports :: [ABExport idL]
- abs_ev_binds :: [TcEvBinds]
- abs_binds :: LHsBinds idL
- abs_sig :: Bool
- | PatSynBind (XPatSynBind idL idR) (PatSynBind idL idR)
- | XHsBindsLR !(XXHsBindsLR idL idR)
- = FunBind {
- type HsBind id = HsBindLR id id
- data FixitySig pass
- = FixitySig (XFixitySig pass) [LIdP pass] Fixity
- | XFixitySig !(XXFixitySig pass)
- data ABExport p
- noSpecPrags :: TcSpecPrags
- isTypeLSig :: UnXRec p => LSig p -> Bool
- isSpecLSig :: UnXRec p => LSig p -> Bool
- isSpecInstLSig :: UnXRec p => LSig p -> Bool
- isSCCFunSig :: UnXRec p => LSig p -> Bool
- isPragLSig :: UnXRec p => LSig p -> Bool
- isMinimalLSig :: UnXRec p => LSig p -> Bool
- isInlineLSig :: UnXRec p => LSig p -> Bool
- isFixityLSig :: UnXRec p => LSig p -> Bool
- isDefaultMethod :: TcSpecPrags -> Bool
- isCompleteMatchSig :: UnXRec p => LSig p -> Bool
- hsSigDoc :: Sig name -> SDoc
- hasSpecPrags :: TcSpecPrags -> Bool
- pprLPat :: forall (p :: Pass). OutputableBndrId p => LPat (GhcPass p) -> SDoc
- type LHsRecUpdField p = XRec p (HsRecUpdField p)
- type LHsRecField' p id arg = XRec p (HsRecField' id arg)
- type LHsRecField p arg = XRec p (HsRecField p arg)
- type HsRecUpdField p = HsRecField' (AmbiguousFieldOcc p) (LHsExpr p)
- data HsRecFields p arg = HsRecFields {
- rec_flds :: [LHsRecField p arg]
- rec_dotdot :: Maybe (Located Int)
- data HsRecField' id arg = HsRecField {
- hsRecFieldAnn :: XHsRecField id
- hsRecFieldLbl :: Located id
- hsRecFieldArg :: arg
- hsRecPun :: Bool
- type HsRecField p arg = HsRecField' (FieldOcc p) arg
- type HsConPatDetails p = HsConDetails (HsPatSigType (NoGhcTc p)) (LPat p) (HsRecFields p (LPat p))
- type family ConLikeP x
- hsRecFieldsArgs :: UnXRec p => HsRecFields p arg -> [arg]
- hsRecFields :: UnXRec p => HsRecFields p arg -> [XCFieldOcc p]
- hsRecFieldSel :: HsRecField pass arg -> Located (XCFieldOcc pass)
- hsConPatArgs :: UnXRec p => HsConPatDetails p -> [LPat p]
- type LHsWcType pass = HsWildCardBndrs pass (LHsType pass)
- type LHsTypeArg p = HsArg (LHsType p) (LHsKind p)
- type LHsType pass = XRec pass (HsType pass)
- type LHsTyVarBndr flag pass = XRec pass (HsTyVarBndr flag pass)
- type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass)
- type LHsSigType pass = XRec pass (HsSigType pass)
- data LHsQTyVars pass
- = HsQTvs {
- hsq_ext :: XHsQTvs pass
- hsq_explicit :: [LHsTyVarBndr () pass]
- | XLHsQTyVars !(XXLHsQTyVars pass)
- = HsQTvs {
- type LHsKind pass = XRec pass (HsKind pass)
- type LHsContext pass = XRec pass (HsContext pass)
- type LFieldOcc pass = XRec pass (FieldOcc pass)
- type LConDeclField pass = XRec pass (ConDeclField pass)
- type LBangType pass = XRec pass (BangType pass)
- data HsWildCardBndrs pass thing
- = HsWC { }
- | XHsWildCardBndrs !(XXHsWildCardBndrs pass thing)
- data HsType pass
- = HsForAllTy {
- hst_xforall :: XForAllTy pass
- hst_tele :: HsForAllTelescope pass
- hst_body :: LHsType pass
- | HsQualTy { }
- | HsTyVar (XTyVar pass) PromotionFlag (LIdP pass)
- | HsAppTy (XAppTy pass) (LHsType pass) (LHsType pass)
- | HsAppKindTy (XAppKindTy pass) (LHsType pass) (LHsKind pass)
- | HsFunTy (XFunTy pass) (HsArrow pass) (LHsType pass) (LHsType pass)
- | HsListTy (XListTy pass) (LHsType pass)
- | HsTupleTy (XTupleTy pass) HsTupleSort [LHsType pass]
- | HsSumTy (XSumTy pass) [LHsType pass]
- | HsOpTy (XOpTy pass) (LHsType pass) (LIdP pass) (LHsType pass)
- | HsParTy (XParTy pass) (LHsType pass)
- | HsIParamTy (XIParamTy pass) (XRec pass HsIPName) (LHsType pass)
- | HsStarTy (XStarTy pass) Bool
- | HsKindSig (XKindSig pass) (LHsType pass) (LHsKind pass)
- | HsSpliceTy (XSpliceTy pass) (HsSplice pass)
- | HsDocTy (XDocTy pass) (LHsType pass) LHsDocString
- | HsBangTy (XBangTy pass) HsSrcBang (LHsType pass)
- | HsRecTy (XRecTy pass) [LConDeclField pass]
- | HsExplicitListTy (XExplicitListTy pass) PromotionFlag [LHsType pass]
- | HsExplicitTupleTy (XExplicitTupleTy pass) [LHsType pass]
- | HsTyLit (XTyLit pass) HsTyLit
- | HsWildCardTy (XWildCardTy pass)
- | XHsType !(XXType pass)
- = HsForAllTy {
- data HsTyVarBndr flag pass
- = UserTyVar (XUserTyVar pass) flag (LIdP pass)
- | KindedTyVar (XKindedTyVar pass) flag (LIdP pass) (LHsKind pass)
- | XTyVarBndr !(XXTyVarBndr pass)
- data HsTyLit
- data HsTupleSort
- data HsSigType pass
- = HsSig { }
- | XHsSigType !(XXHsSigType pass)
- data HsScaled pass a = HsScaled (HsArrow pass) a
- data HsPatSigType pass
- = HsPS { }
- | XHsPatSigType !(XXHsPatSigType pass)
- data HsPSRn = HsPSRn {
- hsps_nwcs :: [Name]
- hsps_imp_tvs :: [Name]
- data HsOuterTyVarBndrs flag pass
- = HsOuterImplicit {
- hso_ximplicit :: XHsOuterImplicit pass
- | HsOuterExplicit {
- hso_xexplicit :: XHsOuterExplicit pass flag
- hso_bndrs :: [LHsTyVarBndr flag (NoGhcTc pass)]
- | XHsOuterTyVarBndrs !(XXHsOuterTyVarBndrs pass)
- = HsOuterImplicit {
- type HsOuterSigTyVarBndrs = HsOuterTyVarBndrs Specificity
- type HsOuterFamEqnTyVarBndrs = HsOuterTyVarBndrs ()
- type HsKind pass = HsType pass
- newtype HsIPName = HsIPName FastString
- data HsForAllTelescope pass
- = HsForAllVis {
- hsf_xvis :: XHsForAllVis pass
- hsf_vis_bndrs :: [LHsTyVarBndr () pass]
- | HsForAllInvis {
- hsf_xinvis :: XHsForAllInvis pass
- hsf_invis_bndrs :: [LHsTyVarBndr Specificity pass]
- | XHsForAllTelescope !(XXHsForAllTelescope pass)
- = HsForAllVis {
- type HsCoreTy = Type
- type HsContext pass = [LHsType pass]
- data HsConDetails tyarg arg rec
- data HsArrow pass
- data HsArg tm ty
- data FieldOcc pass
- = FieldOcc {
- extFieldOcc :: XCFieldOcc pass
- rdrNameFieldOcc :: LocatedN RdrName
- | XFieldOcc !(XXFieldOcc pass)
- = FieldOcc {
- data ConDeclField pass
- = ConDeclField {
- cd_fld_ext :: XConDeclField pass
- cd_fld_names :: [LFieldOcc pass]
- cd_fld_type :: LBangType pass
- cd_fld_doc :: Maybe LHsDocString
- | XConDeclField !(XXConDeclField pass)
- = ConDeclField {
- type BangType pass = HsType pass
- data AmbiguousFieldOcc pass
- = Unambiguous (XUnambiguous pass) (LocatedN RdrName)
- | Ambiguous (XAmbiguous pass) (LocatedN RdrName)
- | XAmbiguousFieldOcc !(XXAmbiguousFieldOcc pass)
- numVisibleArgs :: [HsArg tm ty] -> Arity
- noTypeArgs :: [Void]
- mapHsOuterImplicit :: (XHsOuterImplicit pass -> XHsOuterImplicit pass) -> HsOuterTyVarBndrs flag pass -> HsOuterTyVarBndrs flag pass
- isHsKindedTyVar :: HsTyVarBndr flag pass -> Bool
- hsUnrestricted :: a -> HsScaled pass a
- hsScaledThing :: HsScaled pass a -> a
- hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr () pass]
- hsPatSigType :: HsPatSigType pass -> LHsType pass
- hsMult :: HsScaled pass a -> HsArrow pass
- hsLinear :: a -> HsScaled pass a
- hsIPNameFS :: HsIPName -> FastString
- pat_con_ext :: Pat p -> XConPat p
- pat_con :: Pat p -> XRec p (ConLikeP p)
- pat_args :: Pat p -> HsConPatDetails p
- pattern XPat :: !(XXPat p) -> Pat p
- pattern WildPat :: XWildPat p -> Pat p
- pattern ViewPat :: XViewPat p -> LHsExpr p -> LPat p -> Pat p
- pattern VarPat :: XVarPat p -> LIdP p -> Pat p
- pattern TuplePat :: XTuplePat p -> [LPat p] -> Boxity -> Pat p
- pattern SumPat :: XSumPat p -> LPat p -> ConTag -> Arity -> Pat p
- pattern SplicePat :: XSplicePat p -> HsSplice p -> Pat p
- pattern SigPat :: XSigPat p -> LPat p -> HsPatSigType (NoGhcTc p) -> Pat p
- pattern ParPat :: XParPat p -> LPat p -> Pat p
- pattern NPlusKPat :: XNPlusKPat p -> LIdP p -> XRec p (HsOverLit p) -> HsOverLit p -> SyntaxExpr p -> SyntaxExpr p -> Pat p
- pattern NPat :: XNPat p -> XRec p (HsOverLit p) -> Maybe (SyntaxExpr p) -> SyntaxExpr p -> Pat p
- pattern LitPat :: XLitPat p -> HsLit p -> Pat p
- pattern ListPat :: XListPat p -> [LPat p] -> Pat p
- pattern LazyPat :: XLazyPat p -> LPat p -> Pat p
- pattern ConPat :: XConPat p -> XRec p (ConLikeP p) -> HsConPatDetails p -> Pat p
- pattern AsPat :: XAsPat p -> LIdP p -> LPat p -> Pat p
- pattern BangPat :: XBangPat p -> LPat p -> Pat p
- type LPat p = XRec p (Pat p)
- data OverLitVal
- data HsOverLit p
- = OverLit {
- ol_ext :: XOverLit p
- ol_val :: OverLitVal
- ol_witness :: HsExpr p
- | XOverLit !(XXOverLit p)
- = OverLit {
- data HsLit x
- = HsChar (XHsChar x) Char
- | HsCharPrim (XHsCharPrim x) Char
- | HsString (XHsString x) FastString
- | HsStringPrim (XHsStringPrim x) !ByteString
- | HsInt (XHsInt x) IntegralLit
- | HsIntPrim (XHsIntPrim x) Integer
- | HsWordPrim (XHsWordPrim x) Integer
- | HsInt64Prim (XHsInt64Prim x) Integer
- | HsWord64Prim (XHsWord64Prim x) Integer
- | HsInteger (XHsInteger x) Integer Type
- | HsRat (XHsRat x) FractionalLit Type
- | HsFloatPrim (XHsFloatPrim x) FractionalLit
- | HsDoublePrim (XHsDoublePrim x) FractionalLit
- | XLit !(XXLit x)
- negateOverLitVal :: OverLitVal -> OverLitVal
- hsOverLitNeedsParens :: PprPrec -> HsOverLit x -> Bool
- hsLitNeedsParens :: PprPrec -> HsLit x -> Bool
- type LImportDecl pass = XRec pass (ImportDecl pass)
- type LIEWrappedName name = LocatedA (IEWrappedName name)
- type LIE pass = XRec pass (IE pass)
- data ImportDeclQualifiedStyle
- data ImportDecl pass
- = ImportDecl {
- ideclExt :: XCImportDecl pass
- ideclSourceSrc :: SourceText
- ideclName :: XRec pass ModuleName
- ideclPkgQual :: Maybe StringLiteral
- ideclSource :: IsBootInterface
- ideclSafe :: Bool
- ideclQualified :: ImportDeclQualifiedStyle
- ideclImplicit :: Bool
- ideclAs :: Maybe (XRec pass ModuleName)
- ideclHiding :: Maybe (Bool, XRec pass [LIE pass])
- | XImportDecl !(XXImportDecl pass)
- = ImportDecl {
- data IEWrappedName name
- = IEName (LocatedN name)
- | IEPattern EpaLocation (LocatedN name)
- | IEType EpaLocation (LocatedN name)
- data IEWildcard
- data IE pass
- = IEVar (XIEVar pass) (LIEWrappedName (IdP pass))
- | IEThingAbs (XIEThingAbs pass) (LIEWrappedName (IdP pass))
- | IEThingAll (XIEThingAll pass) (LIEWrappedName (IdP pass))
- | IEThingWith (XIEThingWith pass) (LIEWrappedName (IdP pass)) IEWildcard [LIEWrappedName (IdP pass)]
- | IEModuleContents (XIEModuleContents pass) (XRec pass ModuleName)
- | IEGroup (XIEGroup pass) Int HsDocString
- | IEDoc (XIEDoc pass) HsDocString
- | IEDocNamed (XIEDocNamed pass) String
- | XIE !(XXIE pass)
- data EpAnnImportDecl = EpAnnImportDecl {}
- simpleImportDecl :: ModuleName -> ImportDecl GhcPs
- replaceWrappedName :: IEWrappedName name1 -> name2 -> IEWrappedName name2
- replaceLWrappedName :: LIEWrappedName name1 -> name2 -> LIEWrappedName name2
- pprImpExp :: (HasOccName name, OutputableBndr name) => name -> SDoc
- lieWrappedName :: LIEWrappedName name -> name
- isImportDeclQualified :: ImportDeclQualifiedStyle -> Bool
- importDeclQualifiedStyle :: Maybe EpaLocation -> Maybe EpaLocation -> (Maybe EpaLocation, ImportDeclQualifiedStyle)
- ieWrappedName :: IEWrappedName name -> name
- ieWrappedLName :: IEWrappedName name -> LocatedN name
- ieNames :: forall (p :: Pass). IE (GhcPass p) -> [IdP (GhcPass p)]
- ieName :: forall (p :: Pass). IE (GhcPass p) -> IdP (GhcPass p)
- ieLWrappedName :: LIEWrappedName name -> LocatedN name
- data Pass
- = Parsed
- | Renamed
- | Typechecked
- type OutputableBndrId (pass :: Pass) = (OutputableBndr (IdGhcP pass), OutputableBndr (IdGhcP (NoGhcTcPass pass)), Outputable (GenLocated (Anno (IdGhcP pass)) (IdGhcP pass)), Outputable (GenLocated (Anno (IdGhcP (NoGhcTcPass pass))) (IdGhcP (NoGhcTcPass pass))), IsPass pass)
- type family NoGhcTcPass (p :: Pass) :: Pass where ...
- type IsSrcSpanAnn (p :: Pass) a = (Anno (IdGhcP p) ~ SrcSpanAnn' (EpAnn a), IsPass p)
- class (NoGhcTcPass (NoGhcTcPass p) ~ NoGhcTcPass p, IsPass (NoGhcTcPass p)) => IsPass (p :: Pass) where
- type family IdGhcP (pass :: Pass) where ...
- type GhcTc = GhcPass 'Typechecked
- type GhcRn = GhcPass 'Renamed
- type GhcPs = GhcPass 'Parsed
- data GhcPass (c :: Pass) where
- pprIfTc :: forall (p :: Pass). IsPass p => (p ~ 'Typechecked => SDoc) -> SDoc
- pprIfRn :: forall (p :: Pass). IsPass p => (p ~ 'Renamed => SDoc) -> SDoc
- pprIfPs :: forall (p :: Pass). IsPass p => (p ~ 'Parsed => SDoc) -> SDoc
- type family SyntaxExpr p
- data MatchGroup p body
- = MG { }
- | XMatchGroup !(XXMatchGroup p body)
- type LHsExpr p = XRec p (HsExpr p)
- data HsSplice id
- = HsTypedSplice (XTypedSplice id) SpliceDecoration (IdP id) (LHsExpr id)
- | HsUntypedSplice (XUntypedSplice id) SpliceDecoration (IdP id) (LHsExpr id)
- | HsQuasiQuote (XQuasiQuote id) (IdP id) (IdP id) SrcSpan FastString
- | HsSpliced (XSpliced id) ThModFinalizers (HsSplicedThing id)
- | XSplice !(XXSplice id)
- data HsExpr p
- = HsVar (XVar p) (LIdP p)
- | HsUnboundVar (XUnboundVar p) OccName
- | HsConLikeOut (XConLikeOut p) ConLike
- | HsRecFld (XRecFld p) (AmbiguousFieldOcc p)
- | HsOverLabel (XOverLabel p) FastString
- | HsIPVar (XIPVar p) HsIPName
- | HsOverLit (XOverLitE p) (HsOverLit p)
- | HsLit (XLitE p) (HsLit p)
- | HsLam (XLam p) (MatchGroup p (LHsExpr p))
- | HsLamCase (XLamCase p) (MatchGroup p (LHsExpr p))
- | HsApp (XApp p) (LHsExpr p) (LHsExpr p)
- | HsAppType (XAppTypeE p) (LHsExpr p) (LHsWcType (NoGhcTc p))
- | OpApp (XOpApp p) (LHsExpr p) (LHsExpr p) (LHsExpr p)
- | NegApp (XNegApp p) (LHsExpr p) (SyntaxExpr p)
- | HsPar (XPar p) (LHsExpr p)
- | SectionL (XSectionL p) (LHsExpr p) (LHsExpr p)
- | SectionR (XSectionR p) (LHsExpr p) (LHsExpr p)
- | ExplicitTuple (XExplicitTuple p) [HsTupArg p] Boxity
- | ExplicitSum (XExplicitSum p) ConTag Arity (LHsExpr p)
- | HsCase (XCase p) (LHsExpr p) (MatchGroup p (LHsExpr p))
- | HsIf (XIf p) (LHsExpr p) (LHsExpr p) (LHsExpr p)
- | HsMultiIf (XMultiIf p) [LGRHS p (LHsExpr p)]
- | HsLet (XLet p) (HsLocalBinds p) (LHsExpr p)
- | HsDo (XDo p) (HsStmtContext (HsDoRn p)) (XRec p [ExprLStmt p])
- | ExplicitList (XExplicitList p) [LHsExpr p]
- | RecordCon {
- rcon_ext :: XRecordCon p
- rcon_con :: XRec p (ConLikeP p)
- rcon_flds :: HsRecordBinds p
- | RecordUpd {
- rupd_ext :: XRecordUpd p
- rupd_expr :: LHsExpr p
- rupd_flds :: Either [LHsRecUpdField p] [LHsRecUpdProj p]
- | HsGetField { }
- | HsProjection {
- proj_ext :: XProjection p
- proj_flds :: NonEmpty (Located (HsFieldLabel p))
- | ExprWithTySig (XExprWithTySig p) (LHsExpr p) (LHsSigWcType (NoGhcTc p))
- | ArithSeq (XArithSeq p) (Maybe (SyntaxExpr p)) (ArithSeqInfo p)
- | HsBracket (XBracket p) (HsBracket p)
- | HsRnBracketOut (XRnBracketOut p) (HsBracket (HsBracketRn p)) [PendingRnSplice' p]
- | HsTcBracketOut (XTcBracketOut p) (Maybe QuoteWrapper) (HsBracket (HsBracketRn p)) [PendingTcSplice' p]
- | HsSpliceE (XSpliceE p) (HsSplice p)
- | HsProc (XProc p) (LPat p) (LHsCmdTop p)
- | HsStatic (XStatic p) (LHsExpr p)
- | HsTick (XTick p) CoreTickish (LHsExpr p)
- | HsBinTick (XBinTick p) Int Int (LHsExpr p)
- | HsPragE (XPragE p) (HsPragE p) (LHsExpr p)
- | XExpr !(XXExpr p)
- data GRHSs p body
- = GRHSs {
- grhssExt :: XCGRHSs p body
- grhssGRHSs :: [LGRHS p body]
- grhssLocalBinds :: HsLocalBinds p
- | XGRHSs !(XXGRHSs p body)
- = GRHSs {
- type family XXWarnDecls x
- type family XXWarnDecl x
- type family XXValBindsLR x x'
- type family XXType x
- type family XXTyVarBndr x
- type family XXTyFamInstDecl x
- type family XXTyClGroup x
- type family XXTyClDecl x
- type family XXTupArg x
- type family XXStmtLR x x' b
- type family XXStandaloneKindSig x
- type family XXSpliceDecl x
- type family XXSplice x
- type family XXSig x
- type family XXRuleDecls x
- type family XXRuleDecl x
- type family XXRuleBndr x
- type family XXRoleAnnotDecl x
- type family XXPragE x
- type family XXPatSynBind x x'
- type family XXPat x
- type family XXParStmtBlock x x'
- type family XXOverLit x
- type family XXMatchGroup x b
- type family XXMatch x b
- type family XXLit x
- type family XXLHsQTyVars x
- type family XXInstDecl x
- type family XXInjectivityAnn x
- type family XXImportDecl x
- type family XXIPBind x
- type family XXIE x
- type family XXHsWildCardBndrs x b
- type family XXHsSigType x
- type family XXHsPatSigType x
- type family XXHsOuterTyVarBndrs x
- type family XXHsLocalBindsLR x x'
- type family XXHsIPBinds x
- type family XXHsGroup x
- type family XXHsForAllTelescope x
- type family XXHsFieldLabel x
- type family XXHsDerivingClause x
- type family XXHsDecl x
- type family XXHsDataDefn x
- type family XXHsBindsLR x x'
- type family XXGRHSs x b
- type family XXGRHS x b
- type family XXFunDep x
- type family XXForeignDecl x
- type family XXFixitySig x
- type family XXFieldOcc x
- type family XXFamilyResultSig x
- type family XXFamilyDecl x
- type family XXFamEqn x r
- type family XXExpr x
- type family XXDerivDecl x
- type family XXDerivClauseTys x
- type family XXDefaultDecl x
- type family XXConDeclField x
- type family XXConDecl x
- type family XXCmdTop x
- type family XXCmd x
- type family XXClsInstDecl x
- type family XXBracket x
- type family XXApplicativeArg x
- type family XXAnnDecl x
- type family XXAmbiguousFieldOcc x
- type family XXABExport x
- type family XWildPat x
- type family XWildCardTy x
- type family XWarnings x
- type family XWarningD x
- type family XWarning x
- type family XViewPat x
- type family XViaStrategy x
- type family XVarPat x
- type family XVarBr x
- type family XVarBind x x'
- type family XVar x
- type family XValD x
- type family XValBinds x x'
- type family XUserTyVar x
- type family XUntypedSplice x
- type family XUnboundVar x
- type family XUnambiguous x
- type family XTypedSplice x
- type family XTypeSig x
- type family XTypBr x
- type family XTyVarSig x
- type family XTyVar x
- type family XTyLit x
- type family XTyFamInstD x
- type family XTyClD x
- type family XTupleTy x
- type family XTuplePat x
- type family XTransStmt x x' b
- type family XTick x
- type family XTcBracketOut x
- type family XTExpBr x
- type family XSynDecl x
- type family XSumTy x
- type family XSumPat x
- type family XStockStrategy x
- type family XStatic x
- type family XStarTy x
- type family XStandaloneKindSig x
- type family XSpliced x
- type family XSpliceTy x
- type family XSplicePat x
- type family XSpliceE x
- type family XSpliceDecl x
- type family XSpliceD x
- type family XSpecSig x
- type family XSpecInstSig x
- type family XSigPat x
- type family XSigD x
- type family XSectionR x
- type family XSectionL x
- type family XSCCFunSig x
- type family XSCC x
- type family XRuleD x
- type family XRuleBndrSig x
- type family XRoleAnnotD x
- type family XRnBracketOut x
- type family XRecordUpd x
- type family XRecordCon x
- type family XRecTy x
- type family XRecStmt x x' b
- type family XRecFld x
- type family XRec p a = (r :: Type) | r -> a
- type family XQuasiQuote x
- type family XQualTy x
- type family XProjection x
- type family XProc x
- type family XPresent x
- type family XPragE x
- type family XPatSynSig x
- type family XPatSynBind x x'
- type family XPatBr x
- type family XPatBind x x'
- type family XParTy x
- type family XParStmtBlock x x'
- type family XParStmt x x' b
- type family XParPat x
- type family XPar x
- type family XPSB x x'
- type family XOverLitE x
- type family XOverLit x
- type family XOverLabel x
- type family XOpTy x
- type family XOpApp x
- type family XNoSig x
- type family XNewtypeStrategy x
- type family XNegApp x
- type family XNPlusKPat x
- type family XNPat x
- type family XMultiIf x
- type family XMissing x
- type family XMinimalSig x
- type family XMG x b
- type family XLitPat x
- type family XLitE x
- type family XListTy x
- type family XListPat x
- type family XLetStmt x x' b
- type family XLet x
- type family XLazyPat x
- type family XLastStmt x x' b
- type family XLamCase x
- type family XLam x
- type family XKindedTyVar x
- type family XKindSigD x
- type family XKindSig x
- type family XInstD x
- type family XInlineSig x
- type family XIf x
- type family XIdSig x
- type family XIParamTy x
- type family XIPVar x
- type family XIPBinds x
- type family XIEVar x
- type family XIEThingWith x
- type family XIEThingAll x
- type family XIEThingAbs x
- type family XIEModuleContents x
- type family XIEGroup x
- type family XIEDocNamed x
- type family XIEDoc x
- type family XHsWordPrim x
- type family XHsWord64Prim x
- type family XHsWC x b
- type family XHsValBinds x x'
- type family XHsStringPrim x
- type family XHsString x
- type family XHsSig x
- type family XHsRule x
- type family XHsRecField x
- type family XHsRat x
- type family XHsQTvs x
- type family XHsPS x
- type family XHsOuterImplicit x
- type family XHsOuterExplicit x flag
- type family XHsInteger x
- type family XHsIntPrim x
- type family XHsInt64Prim x
- type family XHsInt x
- type family XHsIPBinds x x'
- type family XHsForAllVis x
- type family XHsForAllInvis x
- type family XHsFloatPrim x
- type family XHsDoublePrim x
- type family XHsCharPrim x
- type family XHsChar x
- type family XHsAnnotation x
- type family XGetField x
- type family XFunTy x
- type family XFunBind x x'
- type family XForeignImport x
- type family XForeignExport x
- type family XForD x
- type family XForAllTy x
- type family XFixitySig x
- type family XFixSig x
- type family XFamDecl x
- type family XExprWithTySig x
- type family XExplicitTupleTy x
- type family XExplicitTuple x
- type family XExplicitSum x
- type family XExplicitListTy x
- type family XExplicitList x
- type family XExpBr x
- type family XEmptyLocalBinds x x'
- type family XDocTy x
- type family XDocD x
- type family XDo x
- type family XDerivD x
- type family XDefD x
- type family XDecBrL x
- type family XDecBrG x
- type family XDctSingle x
- type family XDctMulti x
- type family XDataFamInstD x
- type family XDataDecl x
- type family XConPat x
- type family XConLikeOut x
- type family XConDeclH98 x
- type family XConDeclGADT x
- type family XConDeclField x
- type family XCompleteMatchSig x
- type family XCoPat x
- type family XCmdWrap x
- type family XCmdTop x
- type family XCmdPar x
- type family XCmdLet x
- type family XCmdLamCase x
- type family XCmdLam x
- type family XCmdIf x
- type family XCmdDo x
- type family XCmdCase x
- type family XCmdArrForm x
- type family XCmdArrApp x
- type family XCmdApp x
- type family XClsInstD x
- type family XClassOpSig x
- type family XClassDecl x
- type family XCase x
- type family XCTyFamInstDecl x
- type family XCTyClGroup x
- type family XCRuleDecls x
- type family XCRuleBndr x
- type family XCRoleAnnotDecl x
- type family XCMatch x b
- type family XCKindSig x
- type family XCInjectivityAnn x
- type family XCImportDecl x
- type family XCIPBind x
- type family XCHsGroup x
- type family XCHsFieldLabel x
- type family XCHsDerivingClause x
- type family XCHsDataDefn x
- type family XCGRHSs x b
- type family XCGRHS x b
- type family XCFunDep x
- type family XCFieldOcc x
- type family XCFamilyDecl x
- type family XCFamEqn x r
- type family XCDerivDecl x
- type family XCDefaultDecl x
- type family XCClsInstDecl x
- type family XBracket x
- type family XBodyStmt x x' b
- type family XBindStmt x x' b
- type family XBinTick x
- type family XBangTy x
- type family XBangPat x
- type family XAsPat x
- type family XArithSeq x
- type family XApplicativeStmt x x' b
- type family XApplicativeArgOne x
- type family XApplicativeArgMany x
- type family XAppTypeE x
- type family XAppTy x
- type family XAppKindTy x
- type family XApp x
- type family XAnyClassStrategy x
- type family XAnnD x
- type family XAmbiguous x
- type family XAbsBinds x x'
- type family XABE x
- class WrapXRec p a where
- class UnXRec p where
- type family NoGhcTc p
- data NoExtField = NoExtField
- data NoExtCon
- class MapXRec p where
- type LIdP p = XRec p (IdP p)
- type family IdP p
- type family Anno a = (b :: Type)
- noExtField :: NoExtField
- noExtCon :: NoExtCon -> a
- data SrcUnpackedness
- data SrcStrictness
- data HsSrcBang = HsSrcBang SourceText SrcUnpackedness SrcStrictness
- data HsImplBang
- type LHsDocString = Located HsDocString
- data HsDocString
- data ExtractedTHDocs = ExtractedTHDocs {}
- newtype DeclDocMap = DeclDocMap (Map Name HsDocString)
- newtype ArgDocMap = ArgDocMap (Map Name (IntMap HsDocString))
- unpackHDS :: HsDocString -> String
- ppr_mbDoc :: Maybe LHsDocString -> SDoc
- mkHsDocStringUtf8ByteString :: ByteString -> HsDocString
- mkHsDocString :: String -> HsDocString
- isEmptyDocString :: HsDocString -> Bool
- hsDocStringToByteString :: HsDocString -> ByteString
- emptyDeclDocMap :: DeclDocMap
- emptyArgDocMap :: ArgDocMap
- concatDocs :: [HsDocString] -> Maybe HsDocString
- appendDocs :: HsDocString -> HsDocString -> HsDocString
- data TrailingAnn
- type SrcSpanAnnP = SrcAnn AnnPragma
- type SrcSpanAnnN = SrcAnn NameAnn
- type SrcSpanAnnL = SrcAnn AnnList
- type SrcSpanAnnC = SrcAnn AnnContext
- type SrcSpanAnnA = SrcAnn AnnListItem
- data SrcSpanAnn' a = SrcSpanAnn {}
- type SrcAnn ann = SrcSpanAnn' (EpAnn ann)
- data ParenType
- data NoEpAnns = NoEpAnns
- data NameAnn
- = NameAnn { }
- | NameAnnCommas { }
- | NameAnnOnly { }
- | NameAnnRArrow { }
- | NameAnnQuote { }
- | NameAnnTrailing {
- nann_trailing :: [TrailingAnn]
- data NameAdornment
- type LocatedP = GenLocated SrcSpanAnnP
- type LocatedN = GenLocated SrcSpanAnnN
- type LocatedL = GenLocated SrcSpanAnnL
- type LocatedC = GenLocated SrcSpanAnnC
- type LocatedAn an = GenLocated (SrcAnn an)
- type LocatedA = GenLocated SrcSpanAnnA
- type LEpaComment = GenLocated Anchor EpaComment
- data IsUnicodeSyntax
- data HasE
- data EpaLocation
- = EpaSpan !RealSrcSpan
- | EpaDelta !DeltaPos ![LEpaComment]
- data EpaCommentTok
- data EpaComment = EpaComment {}
- data EpAnnComments
- = EpaComments {
- priorComments :: ![LEpaComment]
- | EpaCommentsBalanced {
- priorComments :: ![LEpaComment]
- followingComments :: ![LEpaComment]
- = EpaComments {
- type EpAnnCO = EpAnn NoEpAnns
- data EpAnn ann
- = EpAnn {
- entry :: !Anchor
- anns :: !ann
- comments :: !EpAnnComments
- | EpAnnNotUsed
- = EpAnn {
- data DeltaPos
- = SameLine {
- deltaColumn :: !Int
- | DifferentLine {
- deltaLine :: !Int
- deltaColumn :: !Int
- = SameLine {
- data AnnSortKey
- data AnnPragma = AnnPragma {}
- data AnnParen = AnnParen {}
- data AnnListItem = AnnListItem {
- lann_trailing :: [TrailingAnn]
- data AnnList = AnnList {}
- data AnnKeywordId
- = AnnAnyclass
- | AnnAs
- | AnnAt
- | AnnBang
- | AnnBackquote
- | AnnBy
- | AnnCase
- | AnnClass
- | AnnClose
- | AnnCloseB
- | AnnCloseBU
- | AnnCloseC
- | AnnCloseQ
- | AnnCloseQU
- | AnnCloseP
- | AnnClosePH
- | AnnCloseS
- | AnnColon
- | AnnComma
- | AnnCommaTuple
- | AnnDarrow
- | AnnDarrowU
- | AnnData
- | AnnDcolon
- | AnnDcolonU
- | AnnDefault
- | AnnDeriving
- | AnnDo
- | AnnDot
- | AnnDotdot
- | AnnElse
- | AnnEqual
- | AnnExport
- | AnnFamily
- | AnnForall
- | AnnForallU
- | AnnForeign
- | AnnFunId
- | AnnGroup
- | AnnHeader
- | AnnHiding
- | AnnIf
- | AnnImport
- | AnnIn
- | AnnInfix
- | AnnInstance
- | AnnLam
- | AnnLarrow
- | AnnLarrowU
- | AnnLet
- | AnnLollyU
- | AnnMdo
- | AnnMinus
- | AnnModule
- | AnnNewtype
- | AnnName
- | AnnOf
- | AnnOpen
- | AnnOpenB
- | AnnOpenBU
- | AnnOpenC
- | AnnOpenE
- | AnnOpenEQ
- | AnnOpenEQU
- | AnnOpenP
- | AnnOpenS
- | AnnOpenPH
- | AnnDollar
- | AnnDollarDollar
- | AnnPackageName
- | AnnPattern
- | AnnPercent
- | AnnPercentOne
- | AnnProc
- | AnnQualified
- | AnnRarrow
- | AnnRarrowU
- | AnnRec
- | AnnRole
- | AnnSafe
- | AnnSemi
- | AnnSimpleQuote
- | AnnSignature
- | AnnStatic
- | AnnStock
- | AnnThen
- | AnnThTyQuote
- | AnnTilde
- | AnnType
- | AnnUnit
- | AnnUsing
- | AnnVal
- | AnnValStr
- | AnnVbar
- | AnnVia
- | AnnWhere
- | Annlarrowtail
- | AnnlarrowtailU
- | Annrarrowtail
- | AnnrarrowtailU
- | AnnLarrowtail
- | AnnLarrowtailU
- | AnnRarrowtail
- | AnnRarrowtailU
- data AnnContext = AnnContext {
- ac_darrow :: Maybe (IsUnicodeSyntax, EpaLocation)
- ac_open :: [EpaLocation]
- ac_close :: [EpaLocation]
- data AnchorOperation
- data Anchor = Anchor {}
- data AddEpAnn = AddEpAnn AnnKeywordId EpaLocation
- widenSpan :: SrcSpan -> [AddEpAnn] -> SrcSpan
- widenLocatedAn :: SrcSpanAnn' an -> [AddEpAnn] -> SrcSpanAnn' an
- widenAnchorR :: Anchor -> RealSrcSpan -> Anchor
- widenAnchor :: Anchor -> [AddEpAnn] -> Anchor
- unicodeAnn :: AnnKeywordId -> AnnKeywordId
- transferAnnsA :: SrcSpanAnnA -> SrcSpanAnnA -> (SrcSpanAnnA, SrcSpanAnnA)
- spanAsAnchor :: SrcSpan -> Anchor
- sortLocatedA :: [GenLocated (SrcSpanAnn' a) e] -> [GenLocated (SrcSpanAnn' a) e]
- setPriorComments :: EpAnnComments -> [LEpaComment] -> EpAnnComments
- setFollowingComments :: EpAnnComments -> [LEpaComment] -> EpAnnComments
- setCommentsSrcAnn :: Monoid ann => SrcAnn ann -> EpAnnComments -> SrcAnn ann
- setCommentsEpAnn :: Monoid a => SrcSpan -> EpAnn a -> EpAnnComments -> EpAnn a
- removeCommentsA :: SrcAnn ann -> SrcAnn ann
- realSrcSpan :: SrcSpan -> RealSrcSpan
- realSpanAsAnchor :: RealSrcSpan -> Anchor
- reLocN :: LocatedN a -> Located a
- reLocL :: LocatedN e -> LocatedA e
- reLocC :: LocatedN e -> LocatedC e
- reLocA :: Located e -> LocatedAn ann e
- reLoc :: LocatedAn a e -> Located e
- reAnnL :: ann -> EpAnnComments -> Located e -> GenLocated (SrcAnn ann) e
- reAnnC :: AnnContext -> EpAnnComments -> Located a -> LocatedC a
- reAnn :: [TrailingAnn] -> EpAnnComments -> Located a -> LocatedA a
- placeholderRealSpan :: RealSrcSpan
- parenTypeKws :: ParenType -> (AnnKeywordId, AnnKeywordId)
- noSrcSpanA :: SrcAnn ann
- noLocA :: a -> LocatedAn an a
- noComments :: EpAnnCO
- noAnnSrcSpan :: SrcSpan -> SrcAnn ann
- noAnn :: EpAnn a
- na2la :: SrcSpanAnn' a -> SrcAnn ann
- n2l :: LocatedN a -> LocatedA a
- mapLocA :: (a -> b) -> GenLocated SrcSpan a -> GenLocated (SrcAnn ann) b
- la2r :: SrcSpanAnn' a -> RealSrcSpan
- la2na :: SrcSpanAnn' a -> SrcSpanAnnN
- la2la :: LocatedAn ann1 a2 -> LocatedAn ann2 a2
- l2n :: LocatedAn a1 a2 -> LocatedN a2
- l2l :: SrcSpanAnn' a -> SrcAnn ann
- getLocAnn :: Located a -> SrcSpanAnnA
- getLocA :: GenLocated (SrcSpanAnn' a) e -> SrcSpan
- getFollowingComments :: EpAnnComments -> [LEpaComment]
- getDeltaLine :: DeltaPos -> Int
- extraToAnnList :: AnnList -> [AddEpAnn] -> AnnList
- epaLocationRealSrcSpan :: EpaLocation -> RealSrcSpan
- epaLocationFromSrcAnn :: SrcAnn ann -> EpaLocation
- epAnnComments :: EpAnn an -> EpAnnComments
- epAnnAnnsL :: EpAnn a -> [a]
- epAnnAnns :: EpAnn [AddEpAnn] -> [AddEpAnn]
- emptyComments :: EpAnnComments
- deltaPos :: Int -> Int -> DeltaPos
- commentsOnlyA :: Monoid ann => SrcAnn ann -> SrcAnn ann
- comment :: RealSrcSpan -> EpAnnComments -> EpAnnCO
- combineSrcSpansA :: Semigroup a => SrcAnn a -> SrcAnn a -> SrcAnn a
- combineLocsA :: Semigroup a => GenLocated (SrcAnn a) e1 -> GenLocated (SrcAnn a) e2 -> SrcAnn a
- annParen2AddEpAnn :: EpAnn AnnParen -> [AddEpAnn]
- addTrailingCommaToN :: SrcSpan -> EpAnn NameAnn -> EpaLocation -> EpAnn NameAnn
- addTrailingAnnToL :: SrcSpan -> TrailingAnn -> EpAnnComments -> EpAnn AnnList -> EpAnn AnnList
- addTrailingAnnToA :: SrcSpan -> TrailingAnn -> EpAnnComments -> EpAnn AnnListItem -> EpAnn AnnListItem
- addCommentsToSrcAnn :: Monoid ann => SrcAnn ann -> EpAnnComments -> SrcAnn ann
- addCommentsToEpAnn :: Monoid a => SrcSpan -> EpAnn a -> EpAnnComments -> EpAnn a
- addCLocAA :: GenLocated (SrcSpanAnn' a1) e1 -> GenLocated (SrcSpanAnn' a2) e2 -> e3 -> GenLocated (SrcAnn ann) e3
- addCLocA :: GenLocated (SrcSpanAnn' a) e1 -> GenLocated SrcSpan e2 -> e3 -> GenLocated (SrcAnn ann) e3
- addAnnsA :: SrcSpanAnnA -> [TrailingAnn] -> EpAnnComments -> SrcSpanAnnA
- addAnns :: EpAnn [AddEpAnn] -> [AddEpAnn] -> EpAnnComments -> EpAnn [AddEpAnn]
- type Mult = Type
- data SpliceExplicitFlag
- data Fixity
- nameOccName :: Name -> OccName
- occName :: HasOccName name => name -> OccName
- occNameString :: OccName -> String
- ppr :: Outputable a => a -> SDoc
- showSDocUnsafe :: SDoc -> String
- handleGhcException :: ExceptionMonad m => (GhcException -> m a) -> m a -> m a
- data RdrName
- rdrNameOcc :: RdrName -> OccName
- data GenLocated l e = L l e
- pattern RealSrcLoc' :: RealSrcLoc -> SrcLoc
- pattern RealSrcSpan' :: RealSrcSpan -> SrcSpan
- data RealSrcSpan
- type SrcSpanLess a = a
- combineSrcSpans :: SrcSpan -> SrcSpan -> SrcSpan
- composeSrcSpan :: a -> a
- decomposeSrcSpan :: a -> a
- stringToStringBuffer :: String -> StringBuffer
- impliedXFlags :: [(Extension, TurnOnFlag, Extension)]
- type FunBind = HsMatchContext GhcPs
- type DoGenReplacement an ast a = (Data ast, Data a) => a -> (LocatedAn an ast -> Bool) -> LocatedAn an ast -> LocatedAn an ast -> StateT Bool IO (LocatedAn an ast)
- type Module = Located HsModule
- type MonadFail' = MonadFail
- type ReplaceWorker a mod = (Data a, Data mod) => mod -> Parser (LocatedA a) -> Int -> Refactoring SrcSpan -> IO mod
- annSpanToSrcSpan :: AnnSpan -> SrcSpan
- badAnnSpan :: AnnSpan
- mkErr :: DynFlags -> SrcSpan -> String -> Errors
- parseModuleName :: SrcSpan -> Parser (LocatedA ModuleName)
- setAnnSpanFile :: FastString -> AnnSpan -> AnnSpan
- setRealSrcSpanFile :: FastString -> RealSrcSpan -> RealSrcSpan
- setSrcSpanFile :: FastString -> SrcSpan -> SrcSpan
- srcSpanToAnnSpan :: SrcSpan -> AnnSpan
- type AnnSpan = RealSrcSpan
ApiAnnotation / GHC.Parser.ApiAnnotation
data AnnKeywordId #
Exact print annotations exist so that tools can perform source to source conversions of Haskell code. They are used to keep track of the various syntactic keywords that are not otherwise captured in the AST.
The wiki page describing this feature is https://gitlab.haskell.org/ghc/ghc/wikis/api-annotations https://gitlab.haskell.org/ghc/ghc/-/wikis/implementing-trees-that-grow/in-tree-api-annotations
Note: in general the names of these are taken from the corresponding token, unless otherwise noted See note [exact print annotations] above for details of the usage
Constructors
AnnAnyclass | |
AnnAs | |
AnnAt | |
AnnBang |
|
AnnBackquote | '`' |
AnnBy | |
AnnCase | case or lambda case |
AnnClass | |
AnnClose | '#)' or '#-}' etc |
AnnCloseB | '|)' |
AnnCloseBU | '|)', unicode variant |
AnnCloseC | '}' |
AnnCloseQ | '|]' |
AnnCloseQU | '|]', unicode variant |
AnnCloseP | ')' |
AnnClosePH | '#)' |
AnnCloseS | ']' |
AnnColon | |
AnnComma | as a list separator |
AnnCommaTuple | in a RdrName for a tuple |
AnnDarrow | '=>' |
AnnDarrowU | '=>', unicode variant |
AnnData | |
AnnDcolon | '::' |
AnnDcolonU | '::', unicode variant |
AnnDefault | |
AnnDeriving | |
AnnDo | |
AnnDot | |
AnnDotdot | '..' |
AnnElse | |
AnnEqual | |
AnnExport | |
AnnFamily | |
AnnForall | |
AnnForallU | Unicode variant |
AnnForeign | |
AnnFunId | for function name in matches where there are multiple equations for the function. |
AnnGroup | |
AnnHeader | for CType |
AnnHiding | |
AnnIf | |
AnnImport | |
AnnIn | |
AnnInfix | 'infix' or 'infixl' or 'infixr' |
AnnInstance | |
AnnLam | |
AnnLarrow | '<-' |
AnnLarrowU | '<-', unicode variant |
AnnLet | |
AnnLollyU | The |
AnnMdo | |
AnnMinus | |
AnnModule | |
AnnNewtype | |
AnnName | where a name loses its location in the AST, this carries it |
AnnOf | |
AnnOpen | '{-# DEPRECATED' etc. Opening of pragmas where
the capitalisation of the string can be changed by
the user. The actual text used is stored in a
|
AnnOpenB | '(|' |
AnnOpenBU | '(|', unicode variant |
AnnOpenC | '{' |
AnnOpenE | '[e|' or '[e||' |
AnnOpenEQ | '[|' |
AnnOpenEQU | '[|', unicode variant |
AnnOpenP | '(' |
AnnOpenS | '[' |
AnnOpenPH | '(#' |
AnnDollar | prefix |
AnnDollarDollar | prefix |
AnnPackageName | |
AnnPattern | |
AnnPercent |
|
AnnPercentOne | '%1' -- for HsLinearArrow |
AnnProc | |
AnnQualified | |
AnnRarrow |
|
AnnRarrowU |
|
AnnRec | |
AnnRole | |
AnnSafe | |
AnnSemi | ';' |
AnnSimpleQuote | ''' |
AnnSignature | |
AnnStatic |
|
AnnStock | |
AnnThen | |
AnnThTyQuote | double ''' |
AnnTilde |
|
AnnType | |
AnnUnit |
|
AnnUsing | |
AnnVal | e.g. INTEGER |
AnnValStr | String value, will need quotes when output |
AnnVbar | '|' |
AnnVia |
|
AnnWhere | |
Annlarrowtail |
|
AnnlarrowtailU |
|
Annrarrowtail |
|
AnnrarrowtailU |
|
AnnLarrowtail |
|
AnnLarrowtailU |
|
AnnRarrowtail |
|
AnnRarrowtailU |
|
Instances
Spacing between output items when exact printing. It captures
the spacing from the current print position on the page to the
position required for the thing about to be printed. This is
either on the same line in which case is is simply the number of
spaces to emit, or it is some number of lines down, with a given
column offset. The exact printing algorithm keeps track of the
column offset pertaining to the current anchor position, so the
deltaColumn
is the additional spaces to add in this case. See
https://gitlab.haskell.org/ghc/ghc/wikis/api-annotations for
details.
Constructors
SameLine | |
Fields
| |
DifferentLine | |
Fields
|
Instances
Data DeltaPos | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DeltaPos -> c DeltaPos # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DeltaPos # toConstr :: DeltaPos -> Constr # dataTypeOf :: DeltaPos -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DeltaPos) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DeltaPos) # gmapT :: (forall b. Data b => b -> b) -> DeltaPos -> DeltaPos # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DeltaPos -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DeltaPos -> r # gmapQ :: (forall d. Data d => d -> u) -> DeltaPos -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DeltaPos -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DeltaPos -> m DeltaPos # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DeltaPos -> m DeltaPos # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DeltaPos -> m DeltaPos # | |
Show DeltaPos | |
Outputable DeltaPos | |
Defined in GHC.Parser.Annotation | |
Eq DeltaPos | |
Ord DeltaPos | |
Defined in GHC.Parser.Annotation |
BasicTypes / GHC.Types.Basic
Constructors
Fixity SourceText Int FixityDirection |
Instances
Data Fixity | |
Defined in GHC.Types.Fixity Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixity -> c Fixity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Fixity # toConstr :: Fixity -> Constr # dataTypeOf :: Fixity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Fixity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fixity) # gmapT :: (forall b. Data b => b -> b) -> Fixity -> Fixity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQ :: (forall d. Data d => d -> u) -> Fixity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # | |
Binary Fixity | |
Outputable Fixity | |
Defined in GHC.Types.Fixity | |
Eq Fixity | |
data SourceText #
Constructors
SourceText String | |
NoSourceText | For when code is generated, e.g. TH, deriving. The pretty printer will then make its own representation of the item. |
Instances
DynFlags / GHC.Driver.Session
Constructors
FlagSpec | |
Fields
|
data GeneralFlag #
Enumerates the simple on-or-off dynamic flags
Constructors
Instances
Enum GeneralFlag | |
Defined in GHC.Driver.Flags Methods succ :: GeneralFlag -> GeneralFlag # pred :: GeneralFlag -> GeneralFlag # toEnum :: Int -> GeneralFlag # fromEnum :: GeneralFlag -> Int # enumFrom :: GeneralFlag -> [GeneralFlag] # enumFromThen :: GeneralFlag -> GeneralFlag -> [GeneralFlag] # enumFromTo :: GeneralFlag -> GeneralFlag -> [GeneralFlag] # enumFromThenTo :: GeneralFlag -> GeneralFlag -> GeneralFlag -> [GeneralFlag] # | |
Show GeneralFlag | |
Defined in GHC.Driver.Flags Methods showsPrec :: Int -> GeneralFlag -> ShowS # show :: GeneralFlag -> String # showList :: [GeneralFlag] -> ShowS # | |
Eq GeneralFlag | |
Defined in GHC.Driver.Flags |
gopt_set :: DynFlags -> GeneralFlag -> DynFlags #
Set a GeneralFlag
gopt_unset :: DynFlags -> GeneralFlag -> DynFlags #
Unset a GeneralFlag
Arguments
:: MonadIO m | |
=> DynFlags | |
-> [Located String] | |
-> m (DynFlags, [Located String], [Warn]) | Updated |
Like parseDynamicFlagsCmdLine
but does not allow the package flags
(-package, -hide-package, -ignore-package, -hide-all-packages, -package-db).
Used to parse flags set in a modules pragma.
ErrUtils
type Errors = ErrorMessages Source #
type ErrorMessages = Bag (MsgEnvelope DecoratedSDoc) #
FastString / GHC.Data.FastString
data FastString #
A FastString
is a UTF-8 encoded string together with a unique ID. All
FastString
s are stored in a global hashtable to support fast O(1)
comparison.
It is also associated with a lazy reference to the Z-encoding of this string which is used by the compiler internally.
Instances
mkFastString :: String -> FastString #
Creates a UTF-8 encoded FastString
from a String
HeaderInfo / GHC.Parser.Header
Arguments
:: DynFlags | |
-> StringBuffer | Input Buffer |
-> FilePath | Source filename. Used for location info. |
-> [Located String] | Parsed options. |
Parse OPTIONS and LANGUAGE pragmas of the source file.
Throws a SourceError
if flag parsing fails (including unsupported flags.)
HsExpr / GHC.Hs.Expr
Guarded Right Hand Side.
Constructors
GRHS (XCGRHS p body) [GuardLStmt p] body | |
XGRHS !(XXGRHS p body) |
Instances
A Haskell expression.
Constructors
HsVar (XVar p) (LIdP p) | Variable See Note [Located RdrNames] |
HsUnboundVar (XUnboundVar p) OccName | Unbound variable; also used for "holes" (_ or _x). Turned from HsVar to HsUnboundVar by the renamer, when it finds an out-of-scope variable or hole. The (XUnboundVar p) field becomes an HoleExprRef after typechecking; this is where the erroring expression will be written after solving. See Note [Holes] in GHC.Tc.Types.Constraint. |
HsConLikeOut (XConLikeOut p) ConLike | After typechecker only; must be different HsVar for pretty printing |
HsRecFld (XRecFld p) (AmbiguousFieldOcc p) | Variable pointing to record selector The parser produces HsVars The renamer renames record-field selectors to HsRecFld The typechecker preserves HsRecFld |
HsOverLabel (XOverLabel p) FastString | Overloaded label (Note [Overloaded labels] in GHC.OverloadedLabels) |
HsIPVar (XIPVar p) HsIPName | Implicit parameter (not in use after typechecking) |
HsOverLit (XOverLitE p) (HsOverLit p) | Overloaded literals |
HsLit (XLitE p) (HsLit p) | Simple (non-overloaded) literals |
HsLam (XLam p) (MatchGroup p (LHsExpr p)) | Lambda abstraction. Currently always a single match |
HsLamCase (XLamCase p) (MatchGroup p (LHsExpr p)) | Lambda-case |
HsApp (XApp p) (LHsExpr p) (LHsExpr p) | Application |
HsAppType (XAppTypeE p) (LHsExpr p) (LHsWcType (NoGhcTc p)) | Visible type application Explicit type argument; e.g f @Int x y NB: Has wildcards, but no implicit quantification |
OpApp (XOpApp p) (LHsExpr p) (LHsExpr p) (LHsExpr p) | Operator applications: NB Bracketed ops such as (+) come out as Vars. |
NegApp (XNegApp p) (LHsExpr p) (SyntaxExpr p) | Negation operator. Contains the negated expression and the name
of |
HsPar |
|
SectionL (XSectionL p) (LHsExpr p) (LHsExpr p) | |
SectionR (XSectionR p) (LHsExpr p) (LHsExpr p) | |
ExplicitTuple (XExplicitTuple p) [HsTupArg p] Boxity | Used for explicit tuples and sections thereof |
ExplicitSum (XExplicitSum p) ConTag Arity (LHsExpr p) | Used for unboxed sum types
There will be multiple |
HsCase (XCase p) (LHsExpr p) (MatchGroup p (LHsExpr p)) |
|
HsIf (XIf p) (LHsExpr p) (LHsExpr p) (LHsExpr p) | |
HsMultiIf (XMultiIf p) [LGRHS p (LHsExpr p)] | Multi-way if |
HsLet (XLet p) (HsLocalBinds p) (LHsExpr p) | let(rec)
|
HsDo (XDo p) (HsStmtContext (HsDoRn p)) (XRec p [ExprLStmt p]) | |
ExplicitList (XExplicitList p) [LHsExpr p] | Syntactic list: [a,b,c,...]
|
RecordCon | Record construction
|
Fields
| |
RecordUpd | Record update |
Fields
| |
HsGetField | Record field selection e.g This case only arises when the OverloadedRecordDot langauge extension is enabled. |
HsProjection | Record field selector. e.g. This case only arises when the OverloadedRecordDot langauge extensions is enabled. |
Fields
| |
ExprWithTySig (XExprWithTySig p) (LHsExpr p) (LHsSigWcType (NoGhcTc p)) | Expression with an explicit type signature. |
ArithSeq (XArithSeq p) (Maybe (SyntaxExpr p)) (ArithSeqInfo p) | Arithmetic sequence
|
HsBracket (XBracket p) (HsBracket p) | |
HsRnBracketOut (XRnBracketOut p) (HsBracket (HsBracketRn p)) [PendingRnSplice' p] | |
HsTcBracketOut (XTcBracketOut p) (Maybe QuoteWrapper) (HsBracket (HsBracketRn p)) [PendingTcSplice' p] | |
HsSpliceE (XSpliceE p) (HsSplice p) | |
HsProc (XProc p) (LPat p) (LHsCmdTop p) |
|
HsStatic (XStatic p) (LHsExpr p) | |
HsTick (XTick p) CoreTickish (LHsExpr p) | |
HsBinTick (XBinTick p) Int Int (LHsExpr p) | |
HsPragE (XPragE p) (HsPragE p) (LHsExpr p) | |
XExpr !(XXExpr p) |
Instances
data HsMatchContext p #
Haskell Match Context
Context of a pattern match. This is more subtle than it would seem. See Note [Varieties of pattern matches].
Constructors
FunRhs | |
Fields
| |
LambdaExpr | Patterns of a lambda |
CaseAlt | Patterns and guards on a case alternative |
IfAlt | Guards of a multi-way if alternative |
ArrowMatchCtxt HsArrowMatchContext | A pattern match inside arrow notation |
PatBindRhs | A pattern binding eg [y] <- e = e |
PatBindGuards | Guards of pattern bindings, e.g., (Just b) | Just _ <- x = e | otherwise = e' |
RecUpd | Record update [used only in GHC.HsToCore.Expr to tell matchWrapper what sort of runtime error message to generate] |
StmtCtxt (HsStmtContext p) | Pattern of a do-stmt, list comprehension, pattern guard, etc |
ThPatSplice | A Template Haskell pattern splice |
ThPatQuote | A Template Haskell pattern quotation [p| (a,b) |] |
PatSyn | A pattern synonym declaration |
data HsStmtContext p #
Haskell Statement Context.
Constructors
ListComp | |
MonadComp | |
DoExpr (Maybe ModuleName) |
|
MDoExpr (Maybe ModuleName) |
|
ArrowExpr | do-notation in an arrow-command context |
GhciStmtCtxt | A command-line Stmt in GHCi pat <- rhs |
PatGuard (HsMatchContext p) | Pattern guard for specified thing |
ParStmtCtxt (HsStmtContext p) | A branch of a parallel stmt |
TransStmtCtxt (HsStmtContext p) | A branch of a transform stmt |
Instances
data MatchGroup p body #
Constructors
MG | |
XMatchGroup !(XXMatchGroup p body) |
Instances
ExactPrint (MatchGroup GhcPs (LocatedA (HsCmd GhcPs))) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> Entry # setAnnotationAnchor :: MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> Anchor -> EpAnnComments -> MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> EP w m (MatchGroup GhcPs (LocatedA (HsCmd GhcPs))) # | |
ExactPrint (MatchGroup GhcPs (LocatedA (HsExpr GhcPs))) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> Entry # setAnnotationAnchor :: MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> Anchor -> EpAnnComments -> MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> EP w m (MatchGroup GhcPs (LocatedA (HsExpr GhcPs))) # |
Exact print annotations when in qualifier lists or guards
- AnnKeywordId
: AnnVbar
,
AnnComma
,AnnThen
,
AnnBy
,AnnBy
,
AnnGroup
,AnnUsing
Constructors
LastStmt (XLastStmt idL idR body) body (Maybe Bool) (SyntaxExpr idR) | |
BindStmt | |
Fields | |
ApplicativeStmt (XApplicativeStmt idL idR body) [(SyntaxExpr idR, ApplicativeArg idL)] (Maybe (SyntaxExpr idR)) |
For full details, see Note [ApplicativeDo] in GHC.Rename.Expr |
BodyStmt (XBodyStmt idL idR body) body (SyntaxExpr idR) (SyntaxExpr idR) | |
LetStmt (XLetStmt idL idR body) (HsLocalBindsLR idL idR) |
|
ParStmt (XParStmt idL idR body) [ParStmtBlock idL idR] (HsExpr idR) (SyntaxExpr idR) | |
TransStmt | |
RecStmt | |
Fields
| |
XStmtLR !(XXStmtLR idL idR body) |
Instances
HsSyn / GHC.Hs
data HsParsedModule #
Constructors
HsParsedModule | |
Fields
|
Haskell Module
All we actually declare here is the top-level structure for a module.
Constructors
HsModule | |
Fields
|
Instances
Data HsModule | |
Defined in GHC.Hs Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsModule -> c HsModule # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsModule # toConstr :: HsModule -> Constr # dataTypeOf :: HsModule -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsModule) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsModule) # gmapT :: (forall b. Data b => b -> b) -> HsModule -> HsModule # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsModule -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsModule -> r # gmapQ :: (forall d. Data d => d -> u) -> HsModule -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsModule -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsModule -> m HsModule # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule -> m HsModule # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule -> m HsModule # | |
Outputable HsModule | |
ExactPrint HsModule | 'Located (HsModule GhcPs)' corresponds to |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint | |
HasDecls ParsedSource | |
Defined in Language.Haskell.GHC.ExactPrint.Transform Methods hsDecls :: forall (m :: Type -> Type). Monad m => ParsedSource -> TransformT m [LHsDecl GhcPs] # replaceDecls :: forall (m :: Type -> Type). Monad m => ParsedSource -> [LHsDecl GhcPs] -> TransformT m ParsedSource # |
data AnnsModule #
Constructors
AnnsModule | |
Instances
Data AnnsModule | |
Defined in GHC.Hs Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnsModule -> c AnnsModule # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnsModule # toConstr :: AnnsModule -> Constr # dataTypeOf :: AnnsModule -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnsModule) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnsModule) # gmapT :: (forall b. Data b => b -> b) -> AnnsModule -> AnnsModule # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnsModule -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnsModule -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnsModule -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnsModule -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnsModule -> m AnnsModule # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnsModule -> m AnnsModule # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnsModule -> m AnnsModule # | |
Eq AnnsModule | |
Defined in GHC.Hs |
class UnXRec p => CollectPass p where #
This class specifies how to collect variable identifiers from extension patterns in the given pass. Consumers of the GHC API that define their own passes should feel free to implement instances in order to make use of functions which depend on it.
In particular, Haddock already makes use of this, with an instance for its DocNameI
pass so that
it can reuse the code in GHC for collecting binders.
Methods
collectXXPat :: Proxy p -> CollectFlag p -> XXPat p -> [IdP p] -> [IdP p] #
Instances
IsPass p => CollectPass (GhcPass p) | |
Defined in GHC.Hs.Utils |
data CollectFlag p where #
Indicate if evidence binders have to be collected.
This type is used as a boolean (should we collect evidence binders or not?) but also to pass an evidence that the AST has been typechecked when we do want to collect evidence binders, otherwise these binders are not available.
See Note [Dictionary binders in ConPatOut]
Constructors
CollNoDictBinders :: forall p. CollectFlag p | Don't collect evidence binders |
CollWithDictBinders :: CollectFlag (GhcPass 'Typechecked) | Collect evidence binders |
unguardedRHS :: forall (p :: Pass) body. Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpan => EpAnn GrhsAnn -> SrcSpan -> LocatedA (body (GhcPass p)) -> [LGRHS (GhcPass p) (LocatedA (body (GhcPass p)))] #
unguardedGRHSs :: forall (p :: Pass) body. Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpan => SrcSpan -> LocatedA (body (GhcPass p)) -> EpAnn GrhsAnn -> GRHSs (GhcPass p) (LocatedA (body (GhcPass p))) #
spanHsLocaLBinds :: forall (p :: Pass). Data (HsLocalBinds (GhcPass p)) => HsLocalBinds (GhcPass p) -> SrcSpan #
Return the SrcSpan
encompassing the contents of any enclosed binds
nlWildPatName :: LPat GhcRn #
Wildcard pattern - after renaming
nlWildConPat :: DataCon -> LPat GhcPs #
nlNullaryConPat :: RdrName -> LPat GhcPs #
nlHsVarApps :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> [IdP (GhcPass p)] -> LHsExpr (GhcPass p) #
nlHsTyConApp :: forall (p :: Pass) a. IsSrcSpanAnn p a => LexicalFixity -> IdP (GhcPass p) -> [LHsTypeArg (GhcPass p)] -> LHsType (GhcPass p) #
nlHsSyntaxApps :: SyntaxExprTc -> [LHsExpr GhcTc] -> LHsExpr GhcTc #
nlHsFunTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #
nlHsApps :: forall (p :: Pass) a. IsSrcSpanAnn p a => IdP (GhcPass p) -> [LHsExpr (GhcPass p)] -> LHsExpr (GhcPass p) #
nlHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #
nlHsAppKindTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsKind (GhcPass p) -> LHsType (GhcPass p) #
nlHsApp :: forall (id :: Pass). IsPass id => LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #
mkUntypedSplice :: EpAnn [AddEpAnn] -> SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs #
mkTypedSplice :: EpAnn [AddEpAnn] -> SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs #
mkTransformStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs) #
mkTransformByStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs) #
mkTopFunBind :: Origin -> LocatedN Name -> [LMatch GhcRn (LHsExpr GhcRn)] -> HsBind GhcRn #
In Name-land, with empty bind_fvs
mkTcBindStmt :: LPat GhcTc -> LocatedA (bodyR GhcTc) -> StmtLR GhcTc GhcTc (LocatedA (bodyR GhcTc)) #
mkSimpleMatch :: forall (p :: Pass) body. (Anno (Match (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpanAnnA, Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpan) => HsMatchContext (NoGhcTc (GhcPass p)) -> [LPat (GhcPass p)] -> LocatedA (body (GhcPass p)) -> LMatch (GhcPass p) (LocatedA (body (GhcPass p))) #
mkSimpleGeneratedFunBind :: SrcSpan -> RdrName -> [LPat GhcPs] -> LHsExpr GhcPs -> LHsBind GhcPs #
Convenience function using mkFunBind
.
This is for generated bindings only, do not use for user-written code.
mkRnBindStmt :: LPat GhcRn -> LocatedA (bodyR GhcRn) -> StmtLR GhcRn GhcRn (LocatedA (bodyR GhcRn)) #
mkRecStmt :: forall (idL :: Pass) bodyR. Anno [GenLocated (Anno (StmtLR (GhcPass idL) GhcPs bodyR)) (StmtLR (GhcPass idL) GhcPs bodyR)] ~ SrcSpanAnnL => EpAnn AnnList -> LocatedL [LStmtLR (GhcPass idL) GhcPs bodyR] -> StmtLR (GhcPass idL) GhcPs bodyR #
mkPsBindStmt :: EpAnn [AddEpAnn] -> LPat GhcPs -> LocatedA (bodyR GhcPs) -> StmtLR GhcPs GhcPs (LocatedA (bodyR GhcPs)) #
mkPrefixFunRhs :: LIdP p -> HsMatchContext p #
Make a prefix, non-strict function HsMatchContext
mkPatSynBind :: LocatedN RdrName -> HsPatSynDetails GhcPs -> LPat GhcPs -> HsPatSynDir GhcPs -> EpAnn [AddEpAnn] -> HsBind GhcPs #
mkMatchGroup :: forall (p :: Pass) body. AnnoBody p body => Origin -> LocatedL [LocatedA (Match (GhcPass p) (LocatedA (body (GhcPass p))))] -> MatchGroup (GhcPass p) (LocatedA (body (GhcPass p))) #
mkMatch :: forall (p :: Pass). IsPass p => HsMatchContext (NoGhcTc (GhcPass p)) -> [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> HsLocalBinds (GhcPass p) -> LMatch (GhcPass p) (LHsExpr (GhcPass p)) #
mkLocatedList :: Semigroup a => [GenLocated (SrcAnn a) e2] -> LocatedAn an [GenLocated (SrcAnn a) e2] #
mkLastStmt :: forall (idR :: Pass) bodyR (idL :: Pass). IsPass idR => LocatedA (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (LocatedA (bodyR (GhcPass idR))) #
mkLHsWrapCo :: TcCoercionN -> LHsExpr GhcTc -> LHsExpr GhcTc #
mkLHsVarTuple :: forall (p :: Pass) a. IsSrcSpanAnn p a => [IdP (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p) #
mkLHsTupleExpr :: forall (p :: Pass). [LHsExpr (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p) #
mkLHsPar :: forall (id :: Pass). IsPass id => LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #
Wrap in parens if
says it needs them
So hsExprNeedsParens
appPrecf x
becomes (f x)
, but 3
stays as 3
.
mkHsWrapPatCo :: TcCoercionN -> Pat GhcTc -> Type -> Pat GhcTc #
mkHsWrapCoR :: TcCoercionR -> HsExpr GhcTc -> HsExpr GhcTc #
mkHsWrapCo :: TcCoercionN -> HsExpr GhcTc -> HsExpr GhcTc #
mkHsWrap :: HsWrapper -> HsExpr GhcTc -> HsExpr GhcTc #
Avoid
and HsWrap
co1 (HsWrap
co2 _)
See Note [Detecting forced eta expansion] in GHC.HsToCore.ExprHsWrap
co1 (HsPar
_ _)
mkHsStringPrimLit :: forall (p :: Pass). FastString -> HsLit (GhcPass p) #
mkHsQuasiQuote :: RdrName -> SrcSpan -> FastString -> HsSplice GhcPs #
mkHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> HsExpr GhcPs #
A useful function for building OpApps
. The operator is always a
variable, and we don't know the fixity yet.
mkHsLam :: forall (p :: Pass). (IsPass p, XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ NoExtField) => [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) #
mkHsIsString :: SourceText -> FastString -> HsOverLit GhcPs #
mkHsIntegral :: IntegralLit -> HsOverLit GhcPs #
mkHsCompAnns :: HsStmtContext GhcRn -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> EpAnn AnnList -> HsExpr GhcPs #
mkHsCaseAlt :: forall (p :: Pass) body. (Anno (GRHS (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpan, Anno (Match (GhcPass p) (LocatedA (body (GhcPass p)))) ~ SrcSpanAnnA) => LPat (GhcPass p) -> LocatedA (body (GhcPass p)) -> LMatch (GhcPass p) (LocatedA (body (GhcPass p))) #
A simple case alternative with a single pattern, no binds, no guards; pre-typechecking
mkHsAppsWith :: forall (id :: Pass). (LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> HsExpr (GhcPass id) -> LHsExpr (GhcPass id)) -> LHsExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id) #
mkHsApps :: forall (id :: Pass). LHsExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id) #
mkHsAppWith :: forall (id :: Pass). (LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> HsExpr (GhcPass id) -> LHsExpr (GhcPass id)) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #
mkHsApp :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #
mkGroupUsingStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs) #
mkGroupByUsingStmt :: EpAnn [AddEpAnn] -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs) #
mkFunBind :: Origin -> LocatedN RdrName -> [LMatch GhcPs (LHsExpr GhcPs)] -> HsBind GhcPs #
Not infix, with place holders for coercion and free vars
mkClassOpSigs :: [LSig GhcPs] -> [LSig GhcPs] #
Convert TypeSig
to ClassOpSig
.
The former is what is parsed, but the latter is
what we need in class/instance declarations
Arguments
:: ([a] -> a) | "Small" constructor function, of maximum input arity |
-> [a] | Possible "big" list of things to construct from |
-> a | Constructed thing made possible by recursive decomposition |
Lifts a "small" constructor into a "big" constructor by recursive decomposition
mkBodyStmt :: forall bodyR (idL :: Pass). LocatedA (bodyR GhcPs) -> StmtLR (GhcPass idL) GhcPs (LocatedA (bodyR GhcPs)) #
mkBigLHsVarTup :: forall (p :: Pass) a. IsSrcSpanAnn p a => [IdP (GhcPass p)] -> XExplicitTuple (GhcPass p) -> LHsExpr (GhcPass p) #
The Big equivalents for the source tuple expressions
mkBigLHsTup :: forall (id :: Pass). [LHsExpr (GhcPass id)] -> XExplicitTuple (GhcPass id) -> LHsExpr (GhcPass id) #
missingTupArg :: EpAnn EpaLocation -> HsTupArg GhcPs #
lStmtsImplicits :: forall (idR :: Pass) (body :: Type -> Type). [LStmtLR GhcRn (GhcPass idR) (LocatedA (body (GhcPass idR)))] -> [(SrcSpan, [Name])] #
isUnliftedHsBind :: HsBind GhcTc -> Bool #
Should we treat this as an unlifted bind? This will be true for any bind that binds an unlifted variable, but we must be careful around AbsBinds. See Note [Unlifted id check in isUnliftedHsBind]. For usage information, see Note [Strict binds checks] is GHC.HsToCore.Binds.
isInfixFunBind :: forall id1 id2. UnXRec id2 => HsBindLR id1 id2 -> Bool #
isBangedHsBind :: HsBind GhcTc -> Bool #
Is a binding a strict variable or pattern bind (e.g. !x = ...
)?
hsValBindsImplicits :: forall (idR :: Pass). HsValBindsLR GhcRn (GhcPass idR) -> [(SrcSpan, [Name])] #
hsTypeToHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs #
Convert an LHsType
to an LHsSigWcType
.
hsTypeToHsSigType :: LHsType GhcPs -> LHsSigType GhcPs #
Convert an LHsType
to an LHsSigType
.
hsTyClForeignBinders :: [TyClGroup GhcRn] -> [LForeignDecl GhcRn] -> [Name] #
hsPatSynSelectors :: forall (p :: Pass). IsPass p => HsValBinds (GhcPass p) -> [FieldOcc (GhcPass p)] #
Collects record pattern-synonym selectors only; the pattern synonym
names are collected by collectHsValBinders
.
hsLTyClDeclBinders :: forall (p :: Pass). IsPass p => LocatedA (TyClDecl (GhcPass p)) -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)]) #
Returns all the binding names of the decl. The first one is guaranteed to be the name of the decl. The first component represents all binding names except record fields; the second represents field occurrences. For record fields mentioned in multiple constructors, the SrcLoc will be from the first occurrence.
Each returned (Located name) has a SrcSpan for the whole declaration. See Note [SrcSpan for binders]
hsGroupBinders :: HsGroup GhcRn -> [Name] #
hsForeignDeclsBinders :: forall (p :: Pass) a. (UnXRec (GhcPass p), IsSrcSpanAnn p a) => [LForeignDecl (GhcPass p)] -> [LIdP (GhcPass p)] #
See Note [SrcSpan for binders]
hsDataFamInstBinders :: forall (p :: Pass). IsPass p => DataFamInstDecl (GhcPass p) -> ([LocatedA (IdP (GhcPass p))], [LFieldOcc (GhcPass p)]) #
the SrcLoc
returned are for the whole declarations, not just the names
getPatSynBinds :: UnXRec id => [(RecFlag, LHsBinds id)] -> [PatSynBind id id] #
emptyRecStmtName :: Anno [GenLocated (Anno (StmtLR GhcRn GhcRn bodyR)) (StmtLR GhcRn GhcRn bodyR)] ~ SrcSpanAnnL => StmtLR GhcRn GhcRn bodyR #
emptyRecStmt :: forall (idL :: Pass) bodyR. Anno [GenLocated (Anno (StmtLR (GhcPass idL) GhcPs bodyR)) (StmtLR (GhcPass idL) GhcPs bodyR)] ~ SrcSpanAnnL => StmtLR (GhcPass idL) GhcPs bodyR #
collectStmtsBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> [StmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)] #
collectStmtBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> StmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)] #
collectPatsBinders :: CollectPass p => CollectFlag p -> [LPat p] -> [IdP p] #
collectPatBinders :: CollectPass p => CollectFlag p -> LPat p -> [IdP p] #
collectMethodBinders :: UnXRec idL => LHsBindsLR idL idR -> [LIdP idL] #
Used exclusively for the bindings of an instance decl which are all
FunBinds
collectLocalBinders :: forall (idL :: Pass) (idR :: Pass). CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)] #
collectLStmtsBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> [LStmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)] #
collectLStmtBinders :: forall (idL :: Pass) (idR :: Pass) body. CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> LStmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)] #
collectHsValBinders :: forall (idL :: Pass) (idR :: Pass). CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)] #
collectHsIdBinders :: forall (idL :: Pass) (idR :: Pass). CollectPass (GhcPass idL) => CollectFlag (GhcPass idL) -> HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)] #
collectHsBindsBinders :: CollectPass p => CollectFlag p -> LHsBindsLR p idR -> [IdP p] #
collectHsBindListBinders :: CollectPass p => CollectFlag p -> [LHsBindLR p idR] -> [IdP p] #
Same as collectHsBindsBinders
, but works over a list of bindings
collectHsBindBinders :: CollectPass p => CollectFlag p -> HsBindLR p idR -> [IdP p] #
Collect both Id
s and pattern-synonym binders
Split a list into lists that are small enough to have a corresponding
tuple arity. The sub-lists of the result all have length <= mAX_TUPLE_SIZE
But there may be more than mAX_TUPLE_SIZE
sub-lists
data XXExprGhcTc #
Constructors
WrapExpr !(HsWrap HsExpr) | |
ExpansionExpr !(HsExpansion (HsExpr GhcRn) (HsExpr GhcTc)) |
data XBindStmtTc #
Constructors
XBindStmtTc | |
Fields |
data XBindStmtRn #
Constructors
XBindStmtRn | |
Fields |
data SyntaxExprTc #
An expression with wrappers, used for rebindable syntax
This should desugar to
syn_res_wrap $ syn_expr (syn_arg_wraps[0] arg0) (syn_arg_wraps[1] arg1) ...
where the actual arguments come from elsewhere in the AST.
Constructors
SyntaxExprTc | |
Fields
| |
NoSyntaxExprTc |
Instances
Outputable SyntaxExprTc | |
Defined in GHC.Hs.Expr Methods ppr :: SyntaxExprTc -> SDoc # |
data SyntaxExprRn #
The function to use in rebindable syntax. See Note [NoSyntaxExpr].
Constructors
SyntaxExprRn (HsExpr GhcRn) | |
NoSyntaxExprRn |
Instances
Outputable SyntaxExprRn | |
Defined in GHC.Hs.Expr Methods ppr :: SyntaxExprRn -> SDoc # |
type family SyntaxExprGhc (p :: Pass) = (r :: Type) | r -> p where ... #
Equations
SyntaxExprGhc 'Parsed = NoExtField | |
SyntaxExprGhc 'Renamed = SyntaxExprRn | |
SyntaxExprGhc 'Typechecked = SyntaxExprTc |
data RecordUpdTc #
Extra data fields for a RecordUpd
, added by the type checker
Constructors
RecordUpdTc | |
Fields
|
Constructors
RecStmtTc | |
Fields
|
type PostTcTable = [(Name, PostTcExpr)] #
Post-Type checking Table
We use a PostTcTable where there are a bunch of pieces of evidence, more than is convenient to keep individually.
type PostTcExpr = HsExpr GhcTc #
Post-Type checking Expression
PostTcExpr is an evidence expression attached to the syntax tree by the type checker (c.f. postTcType).
data PendingTcSplice #
Pending Type-checker Splice
Constructors
PendingTcSplice SplicePointName (LHsExpr GhcTc) |
Instances
Outputable PendingTcSplice | |
Defined in GHC.Hs.Expr Methods ppr :: PendingTcSplice -> SDoc # |
data PendingRnSplice #
Pending Renamer Splice
Constructors
PendingRnSplice UntypedSpliceFlavour SplicePointName (LHsExpr GhcRn) |
Instances
Outputable PendingRnSplice | |
Defined in GHC.Hs.Expr Methods ppr :: PendingRnSplice -> SDoc # |
data HsWrap (hs_syn :: Type -> Type) #
HsWrap appears only in typechecker output
Invariant: The contained Expr is *NOT* itself an HsWrap.
See Note [Detecting forced eta expansion] in GHC.HsToCore.Expr.
This invariant is maintained by mkHsWrap
.
hs_syn is something like HsExpr or HsCmd
Instances
(Data (hs_syn GhcTc), Typeable hs_syn) => Data (HsWrap hs_syn) | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsWrap hs_syn -> c (HsWrap hs_syn) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsWrap hs_syn) # toConstr :: HsWrap hs_syn -> Constr # dataTypeOf :: HsWrap hs_syn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsWrap hs_syn)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsWrap hs_syn)) # gmapT :: (forall b. Data b => b -> b) -> HsWrap hs_syn -> HsWrap hs_syn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsWrap hs_syn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsWrap hs_syn -> r # gmapQ :: (forall d. Data d => d -> u) -> HsWrap hs_syn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsWrap hs_syn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsWrap hs_syn -> m (HsWrap hs_syn) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWrap hs_syn -> m (HsWrap hs_syn) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWrap hs_syn -> m (HsWrap hs_syn) # |
newtype HsSplicedT #
Constructors
HsSplicedT DelayedSplice |
Instances
Data HsSplicedT | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsSplicedT -> c HsSplicedT # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsSplicedT # toConstr :: HsSplicedT -> Constr # dataTypeOf :: HsSplicedT -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsSplicedT) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsSplicedT) # gmapT :: (forall b. Data b => b -> b) -> HsSplicedT -> HsSplicedT # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsSplicedT -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsSplicedT -> r # gmapQ :: (forall d. Data d => d -> u) -> HsSplicedT -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsSplicedT -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsSplicedT -> m HsSplicedT # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplicedT -> m HsSplicedT # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplicedT -> m HsSplicedT # |
data HsExpansion a b #
Constructors
HsExpanded a b |
Instances
(Data a, Data b) => Data (HsExpansion a b) | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> HsExpansion a b -> c (HsExpansion a b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsExpansion a b) # toConstr :: HsExpansion a b -> Constr # dataTypeOf :: HsExpansion a b -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsExpansion a b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsExpansion a b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> HsExpansion a b -> HsExpansion a b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsExpansion a b -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsExpansion a b -> r # gmapQ :: (forall d. Data d => d -> u) -> HsExpansion a b -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsExpansion a b -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsExpansion a b -> m (HsExpansion a b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsExpansion a b -> m (HsExpansion a b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsExpansion a b -> m (HsExpansion a b) # | |
(Outputable a, Outputable b) => Outputable (HsExpansion a b) | Just print the original expression (the |
Defined in GHC.Hs.Expr Methods ppr :: HsExpansion a b -> SDoc # |
Instances
Data GrhsAnn | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GrhsAnn -> c GrhsAnn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GrhsAnn # toConstr :: GrhsAnn -> Constr # dataTypeOf :: GrhsAnn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GrhsAnn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GrhsAnn) # gmapT :: (forall b. Data b => b -> b) -> GrhsAnn -> GrhsAnn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GrhsAnn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GrhsAnn -> r # gmapQ :: (forall d. Data d => d -> u) -> GrhsAnn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GrhsAnn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GrhsAnn -> m GrhsAnn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GrhsAnn -> m GrhsAnn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GrhsAnn -> m GrhsAnn # | |
Outputable GrhsAnn | |
Defined in GHC.Hs.Expr |
data EpAnnUnboundVar #
Constructors
EpAnnUnboundVar | |
Fields |
Instances
Data EpAnnUnboundVar | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EpAnnUnboundVar -> c EpAnnUnboundVar # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EpAnnUnboundVar # toConstr :: EpAnnUnboundVar -> Constr # dataTypeOf :: EpAnnUnboundVar -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EpAnnUnboundVar) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EpAnnUnboundVar) # gmapT :: (forall b. Data b => b -> b) -> EpAnnUnboundVar -> EpAnnUnboundVar # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EpAnnUnboundVar -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EpAnnUnboundVar -> r # gmapQ :: (forall d. Data d => d -> u) -> EpAnnUnboundVar -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EpAnnUnboundVar -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EpAnnUnboundVar -> m EpAnnUnboundVar # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EpAnnUnboundVar -> m EpAnnUnboundVar # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EpAnnUnboundVar -> m EpAnnUnboundVar # |
data EpAnnHsCase #
Constructors
EpAnnHsCase | |
Fields |
Instances
Data EpAnnHsCase | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EpAnnHsCase -> c EpAnnHsCase # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EpAnnHsCase # toConstr :: EpAnnHsCase -> Constr # dataTypeOf :: EpAnnHsCase -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EpAnnHsCase) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EpAnnHsCase) # gmapT :: (forall b. Data b => b -> b) -> EpAnnHsCase -> EpAnnHsCase # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EpAnnHsCase -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EpAnnHsCase -> r # gmapQ :: (forall d. Data d => d -> u) -> EpAnnHsCase -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EpAnnHsCase -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EpAnnHsCase -> m EpAnnHsCase # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EpAnnHsCase -> m EpAnnHsCase # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EpAnnHsCase -> m EpAnnHsCase # |
data DelayedSplice #
Instances
Data DelayedSplice | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DelayedSplice -> c DelayedSplice # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DelayedSplice # toConstr :: DelayedSplice -> Constr # dataTypeOf :: DelayedSplice -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DelayedSplice) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DelayedSplice) # gmapT :: (forall b. Data b => b -> b) -> DelayedSplice -> DelayedSplice # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DelayedSplice -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DelayedSplice -> r # gmapQ :: (forall d. Data d => d -> u) -> DelayedSplice -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DelayedSplice -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DelayedSplice -> m DelayedSplice # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DelayedSplice -> m DelayedSplice # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DelayedSplice -> m DelayedSplice # |
Constructors
AnnsLet | |
Fields
|
Instances
Data AnnsLet | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnsLet -> c AnnsLet # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnsLet # toConstr :: AnnsLet -> Constr # dataTypeOf :: AnnsLet -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnsLet) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnsLet) # gmapT :: (forall b. Data b => b -> b) -> AnnsLet -> AnnsLet # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnsLet -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnsLet -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnsLet -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnsLet -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnsLet -> m AnnsLet # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnsLet -> m AnnsLet # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnsLet -> m AnnsLet # |
Constructors
AnnsIf | |
Fields
|
Instances
Data AnnsIf | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnsIf -> c AnnsIf # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnsIf # toConstr :: AnnsIf -> Constr # dataTypeOf :: AnnsIf -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnsIf) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnsIf) # gmapT :: (forall b. Data b => b -> b) -> AnnsIf -> AnnsIf # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnsIf -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnsIf -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnsIf -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnsIf -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnsIf -> m AnnsIf # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnsIf -> m AnnsIf # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnsIf -> m AnnsIf # |
data AnnProjection #
Constructors
AnnProjection | |
Fields
|
Instances
Data AnnProjection | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnProjection -> c AnnProjection # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnProjection # toConstr :: AnnProjection -> Constr # dataTypeOf :: AnnProjection -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnProjection) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnProjection) # gmapT :: (forall b. Data b => b -> b) -> AnnProjection -> AnnProjection # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnProjection -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnProjection -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnProjection -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnProjection -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnProjection -> m AnnProjection # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnProjection -> m AnnProjection # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnProjection -> m AnnProjection # |
data AnnFieldLabel #
Constructors
AnnFieldLabel | |
Fields |
Instances
Data AnnFieldLabel | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnFieldLabel -> c AnnFieldLabel # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnFieldLabel # toConstr :: AnnFieldLabel -> Constr # dataTypeOf :: AnnFieldLabel -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnFieldLabel) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnFieldLabel) # gmapT :: (forall b. Data b => b -> b) -> AnnFieldLabel -> AnnFieldLabel # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnFieldLabel -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnFieldLabel -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnFieldLabel -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnFieldLabel -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnFieldLabel -> m AnnFieldLabel # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnFieldLabel -> m AnnFieldLabel # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnFieldLabel -> m AnnFieldLabel # |
data AnnExplicitSum #
Constructors
AnnExplicitSum | |
Fields
|
Instances
Data AnnExplicitSum | |
Defined in GHC.Hs.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnExplicitSum -> c AnnExplicitSum # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnExplicitSum # toConstr :: AnnExplicitSum -> Constr # dataTypeOf :: AnnExplicitSum -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnExplicitSum) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnExplicitSum) # gmapT :: (forall b. Data b => b -> b) -> AnnExplicitSum -> AnnExplicitSum # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnExplicitSum -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnExplicitSum -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnExplicitSum -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnExplicitSum -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnExplicitSum -> m AnnExplicitSum # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnExplicitSum -> m AnnExplicitSum # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnExplicitSum -> m AnnExplicitSum # |
thTyBrackets :: SDoc -> SDoc #
thBrackets :: SDoc -> SDoc -> SDoc #
ppr_splice_decl :: forall (p :: Pass). OutputableBndrId p => HsSplice (GhcPass p) -> SDoc #
ppr_splice :: forall (p :: Pass). OutputableBndrId p => SDoc -> IdP (GhcPass p) -> LHsExpr (GhcPass p) -> SDoc -> SDoc #
ppr_quasi :: OutputableBndr p => p -> p -> FastString -> SDoc #
ppr_infix_expr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> Maybe SDoc #
ppr_do_stmts :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA, Outputable body) => [LStmtLR (GhcPass idL) (GhcPass idR) body] -> SDoc #
ppr_apps :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> [Either (LHsExpr (GhcPass p)) (LHsWcType (NoGhcTc (GhcPass p)))] -> SDoc #
pprTransformStmt :: forall (p :: Pass). OutputableBndrId p => [IdP (GhcPass p)] -> LHsExpr (GhcPass p) -> Maybe (LHsExpr (GhcPass p)) -> SDoc #
pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc #
pprStmtInCtxt :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Outputable body, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA) => HsStmtContext (GhcPass idL) -> StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc #
pprStmt :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Anno (StmtLR (GhcPass idL) (GhcPass idR) body) ~ SrcSpanAnnA, Outputable body) => StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc #
pprQuals :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc #
pprPendingSplice :: forall (p :: Pass). OutputableBndrId p => SplicePointName -> LHsExpr (GhcPass p) -> SDoc #
pprParendLExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc #
pprParendExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> HsExpr (GhcPass p) -> SDoc #
pprMatches :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => MatchGroup (GhcPass idR) body -> SDoc #
pprMatchInCtxt :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc #
pprMatch :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc #
pprHsBracket :: forall (p :: Pass). OutputableBndrId p => HsBracket (GhcPass p) -> SDoc #
pprGRHSs :: forall (idR :: Pass) body passL. (OutputableBndrId idR, Outputable body) => HsMatchContext passL -> GRHSs (GhcPass idR) body -> SDoc #
pprGRHS :: forall (idR :: Pass) body passL. (OutputableBndrId idR, Outputable body) => HsMatchContext passL -> GRHS (GhcPass idR) body -> SDoc #
pprDo :: forall (p :: Pass) body any. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => HsStmtContext any -> [LStmt (GhcPass p) body] -> SDoc #
pprDebugParendExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc #
pprComp :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body, Anno (StmtLR (GhcPass p) (GhcPass p) body) ~ SrcSpanAnnA) => [LStmt (GhcPass p) body] -> SDoc #
pprBy :: Outputable body => Maybe body -> SDoc #
pprBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc #
pprBindStmt :: (Outputable pat, Outputable expr) => pat -> expr -> SDoc #
pprArg :: forall (idL :: Pass). OutputableBndrId idL => ApplicativeArg (GhcPass idL) -> SDoc #
pp_rhs :: Outputable body => HsMatchContext passL -> body -> SDoc #
parenthesizeHsExpr :: forall (p :: Pass). IsPass p => PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) #
checks if parenthesizeHsExpr
p e
is true,
and if so, surrounds hsExprNeedsParens
p ee
with an HsPar
. Otherwise, it simply returns e
.
noSyntaxExpr :: forall (p :: Pass). IsPass p => SyntaxExpr (GhcPass p) #
noExpr :: forall (p :: Pass). HsExpr (GhcPass p) #
This is used for rebindable-syntax pieces that are too polymorphic for tcSyntaxOp (trS_fmap and the mzip in ParStmt)
mkSyntaxExpr :: HsExpr GhcRn -> SyntaxExprRn #
Make a 'SyntaxExpr GhcRn' from an expression Used only in getMonadFailOp. See Note [Monad fail : Rebindable syntax, overloaded strings] in GHC.Rename.Expr
mkRnSyntaxExpr :: Name -> SyntaxExprRn #
Make a SyntaxExpr
from a Name
(the "rn" is because this is used in the
renamer).
matchGroupArity :: forall (id :: Pass) body. MatchGroup (GhcPass id) body -> Arity #
matchContextErrString :: forall (p :: Pass). OutputableBndrId p => HsMatchContext (GhcPass p) -> SDoc #
isSingletonMatchGroup :: forall (p :: Pass) body. [LMatch (GhcPass p) body] -> Bool #
Is there only one RHS in this list of matches?
isQuietHsExpr :: HsExpr id -> Bool #
isQuietHsCmd :: HsCmd id -> Bool #
isEmptyMatchGroup :: forall (p :: Pass) body. MatchGroup (GhcPass p) body -> Bool #
hsExprNeedsParens :: forall (p :: Pass). IsPass p => PprPrec -> HsExpr (GhcPass p) -> Bool #
returns hsExprNeedsParens
p eTrue
if the expression e
needs
parentheses under precedence p
.
data XViaStrategyPs #
Constructors
XViaStrategyPs (EpAnn [AddEpAnn]) (LHsSigType GhcPs) |
Instances
Outputable XViaStrategyPs | |
Defined in GHC.Hs.Decls Methods ppr :: XViaStrategyPs -> SDoc # |
Constructors
HsRuleAnn | |
Fields
|
Instances
Data HsRuleAnn | |
Defined in GHC.Hs.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsRuleAnn -> c HsRuleAnn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsRuleAnn # toConstr :: HsRuleAnn -> Constr # dataTypeOf :: HsRuleAnn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsRuleAnn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsRuleAnn) # gmapT :: (forall b. Data b => b -> b) -> HsRuleAnn -> HsRuleAnn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsRuleAnn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsRuleAnn -> r # gmapQ :: (forall d. Data d => d -> u) -> HsRuleAnn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsRuleAnn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsRuleAnn -> m HsRuleAnn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsRuleAnn -> m HsRuleAnn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsRuleAnn -> m HsRuleAnn # | |
Eq HsRuleAnn | |
tyFamInstDeclName :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => TyFamInstDecl (GhcPass p) -> IdP (GhcPass p) #
tyFamInstDeclLName :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => TyFamInstDecl (GhcPass p) -> LocatedN (IdP (GhcPass p)) #
tyClDeclLName :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => TyClDecl (GhcPass p) -> LocatedN (IdP (GhcPass p)) #
tcdName :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => TyClDecl (GhcPass p) -> IdP (GhcPass p) #
standaloneKindSigName :: forall (p :: Pass). StandaloneKindSig (GhcPass p) -> IdP (GhcPass p) #
roleAnnotDeclName :: forall (p :: Pass). RoleAnnotDecl (GhcPass p) -> IdP (GhcPass p) #
resultVariableName :: forall (a :: Pass). FamilyResultSig (GhcPass a) -> Maybe (IdP (GhcPass a)) #
Maybe return name of the result type variable
pprTyFamInstDecl :: forall (p :: Pass). OutputableBndrId p => TopLevelFlag -> TyFamInstDecl (GhcPass p) -> SDoc #
pprHsFamInstLHS :: forall (p :: Pass). OutputableBndrId p => IdP (GhcPass p) -> HsOuterFamEqnTyVarBndrs (GhcPass p) -> HsTyPats (GhcPass p) -> LexicalFixity -> Maybe (LHsContext (GhcPass p)) -> SDoc #
pprDataFamInstFlavour :: forall (p :: Pass). DataFamInstDecl (GhcPass p) -> SDoc #
partitionBindsAndSigs :: [LHsDecl GhcPs] -> (LHsBinds GhcPs, [LSig GhcPs], [LFamilyDecl GhcPs], [LTyFamInstDecl GhcPs], [LDataFamInstDecl GhcPs], [LDocDecl GhcPs]) #
Partition a list of HsDecls into function/pattern bindings, signatures, type family declarations, type family instances, and documentation comments.
Panics when given a declaration that cannot be put into any of the output groups.
The primary use of this function is to implement
cvBindsAndSigs
.
mapDerivStrategy :: forall p (pass :: Pass). p ~ GhcPass pass => (XViaStrategy p -> XViaStrategy p) -> DerivStrategy p -> DerivStrategy p #
Map over the via
type if dealing with ViaStrategy
. Otherwise,
return the DerivStrategy
unchanged.
instDeclDataFamInsts :: forall (p :: Pass). [LInstDecl (GhcPass p)] -> [DataFamInstDecl (GhcPass p)] #
hsGroupTopLevelFixitySigs :: forall (p :: Pass). HsGroup (GhcPass p) -> [LFixitySig (GhcPass p)] #
The fixity signatures for each top-level declaration and class method
in an HsGroup
.
See Note [Top-level fixity signatures in an HsGroup]
hsDeclHasCusk :: TyClDecl GhcRn -> Bool #
Does this declaration have a complete, user-supplied kind signature? See Note [CUSKs: complete user-supplied kind signatures]
hsConDeclTheta :: forall (p :: Pass). Maybe (LHsContext (GhcPass p)) -> [LHsType (GhcPass p)] #
getRecConArgs_maybe :: ConDecl GhcRn -> Maybe (LocatedL [LConDeclField GhcRn]) #
foldDerivStrategy :: forall p (pass :: Pass) r. p ~ GhcPass pass => r -> (XViaStrategy p -> r) -> DerivStrategy p -> r #
Eliminate a DerivStrategy
.
flattenRuleDecls :: forall (p :: Pass). [LRuleDecls (GhcPass p)] -> [LRuleDecl (GhcPass p)] #
familyDeclName :: forall (p :: Pass). FamilyDecl (GhcPass p) -> IdP (GhcPass p) #
familyDeclLName :: forall (p :: Pass). FamilyDecl (GhcPass p) -> XRec (GhcPass p) (IdP (GhcPass p)) #
famResultKindSignature :: forall (p :: Pass). FamilyResultSig (GhcPass p) -> Maybe (LHsKind (GhcPass p)) #
emptyRnGroup :: forall (p :: Pass). HsGroup (GhcPass p) #
emptyRdrGroup :: forall (p :: Pass). HsGroup (GhcPass p) #
appendGroups :: forall (p :: Pass). HsGroup (GhcPass p) -> HsGroup (GhcPass p) -> HsGroup (GhcPass p) #
data EpAnnSumPat #
Constructors
EpAnnSumPat | |
Fields
|
Instances
Data EpAnnSumPat | |
Defined in GHC.Hs.Pat Methods 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.
Constructors
ConPatTc | |
Fields
|
Coercion Pattern (translation only)
During desugaring a (CoPat co pat) turns into a cast with co
on the
scrutinee, followed by a match on pat
.
Constructors
CoPat | |
Fields
|
pprParendLPat :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LPat (GhcPass p) -> SDoc #
pprConArgs :: forall (p :: Pass). (OutputableBndrId p, Outputable (Anno (IdGhcP p))) => HsConPatDetails (GhcPass p) -> SDoc #
patNeedsParens :: forall (p :: Pass). IsPass p => PprPrec -> Pat (GhcPass p) -> Bool #
returns patNeedsParens
p patTrue
if the pattern pat
needs
parentheses under precedence p
.
parenthesizePat :: forall (p :: Pass). IsPass p => PprPrec -> LPat (GhcPass p) -> LPat (GhcPass p) #
checks if parenthesizePat
p pat
is true, and
if so, surrounds patNeedsParens
p patpat
with a ParPat
. Otherwise, it simply returns pat
.
mkCharLitPat :: SourceText -> Char -> LPat GhcTc #
isSimplePat :: forall (x :: Pass). LPat (GhcPass x) -> Maybe (IdP (GhcPass x)) #
Is the pattern any of combination of:
- (pat)
- pat :: Type
- ~pat
- !pat
- x (variable)
isIrrefutableHsPat :: forall (p :: Pass). OutputableBndrId p => DynFlags -> LPat (GhcPass p) -> Bool #
hsRecUpdFieldRdr :: forall (p :: Pass). HsRecUpdField (GhcPass p) -> Located RdrName #
hsRecUpdFieldOcc :: HsRecField' (AmbiguousFieldOcc GhcTc) arg -> LFieldOcc GhcTc #
hsRecUpdFieldId :: HsRecField' (AmbiguousFieldOcc GhcTc) arg -> Located Id #
hsRecFieldId :: HsRecField GhcTc arg -> Located Id #
Instances
Data AnnSig | |
Defined in GHC.Hs.Binds Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnSig -> c AnnSig # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnSig # toConstr :: AnnSig -> Constr # dataTypeOf :: AnnSig -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnSig) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnSig) # gmapT :: (forall b. Data b => b -> b) -> AnnSig -> AnnSig # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnSig -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnSig -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnSig -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnSig -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnSig -> m AnnSig # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnSig -> m AnnSig # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnSig -> m AnnSig # |
pragSrcBrackets :: SourceText -> String -> SDoc -> SDoc #
Using SourceText in case the pragma was spelled differently or used mixed case
pragBrackets :: SDoc -> SDoc #
ppr_monobind :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc #
pprVarSig :: OutputableBndr id => [id] -> SDoc -> SDoc #
pprTcSpecPrags :: TcSpecPrags -> SDoc #
pprSpec :: OutputableBndr id => id -> SDoc -> InlinePragma -> SDoc #
pprMinimalSig :: OutputableBndr name => LBooleanFormula (GenLocated l name) -> SDoc #
pprLHsBindsForUser :: forall (idL :: Pass) (idR :: Pass) (id2 :: Pass). (OutputableBndrId idL, OutputableBndrId idR, OutputableBndrId id2) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc] #
pprLHsBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc #
pprDeclList :: [SDoc] -> SDoc #
plusHsValBinds :: forall (a :: Pass). HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) #
isEmptyValBinds :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) -> Bool #
isEmptyLHsBinds :: forall (idL :: Pass) idR. LHsBindsLR (GhcPass idL) idR -> Bool #
isEmptyIPBindsTc :: HsIPBinds GhcTc -> Bool #
eqEmptyLocalBinds :: HsLocalBindsLR a b -> Bool #
emptyValBindsOut :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) #
emptyValBindsIn :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) #
emptyLocalBinds :: forall (a :: Pass) (b :: Pass). HsLocalBindsLR (GhcPass a) (GhcPass b) #
emptyLHsBinds :: forall (idL :: Pass) idR. LHsBindsLR (GhcPass idL) idR #
class OutputableBndrFlag flag (p :: Pass) #
Minimal complete definition
pprTyVarBndr
Instances
OutputableBndrFlag Specificity p | |
Defined in GHC.Hs.Type Methods pprTyVarBndr :: HsTyVarBndr Specificity (GhcPass p) -> SDoc | |
OutputableBndrFlag () p | |
Defined in GHC.Hs.Type Methods pprTyVarBndr :: HsTyVarBndr () (GhcPass p) -> SDoc |
type EpAnnForallTy #
splitLHsSigmaTyInvis :: forall (p :: Pass). LHsType (GhcPass p) -> ([LHsTyVarBndr Specificity (GhcPass p)], Maybe (LHsContext (GhcPass p)), LHsType (GhcPass p)) #
Decompose a sigma type (of the form forall tvs. context => body
)
into its constituent parts.
Only splits type variable binders that were
quantified invisibly (e.g., forall a.
, with a dot).
This function is used to split apart certain types, such as instance
declaration types, which disallow visible forall
s. For instance, if GHC
split apart the forall
in instance forall a -> Show (Blah a)
, then that
declaration would mistakenly be accepted!
Note that this function looks through parentheses, so it will work on types
such as (forall a. ...)
. The downside to this is that it is not
generally possible to take the returned types and reconstruct the original
type (parentheses and all) from them.
splitLHsQualTy :: forall (pass :: Pass). LHsType (GhcPass pass) -> (Maybe (LHsContext (GhcPass pass)), LHsType (GhcPass pass)) #
Decompose a type of the form context => body
into its constituent parts.
Note that this function looks through parentheses, so it will work on types
such as (context => ...)
. The downside to this is that it is not
generally possible to take the returned types and reconstruct the original
type (parentheses and all) from them.
splitLHsPatSynTy :: forall (p :: Pass). LHsSigType (GhcPass p) -> ([LHsTyVarBndr Specificity (GhcPass (NoGhcTcPass p))], Maybe (LHsContext (GhcPass p)), [LHsTyVarBndr Specificity (GhcPass p)], Maybe (LHsContext (GhcPass p)), LHsType (GhcPass p)) #
Decompose a pattern synonym type signature into its constituent parts.
Note that this function looks through parentheses, so it will work on types
such as (forall a. ...)
. The downside to this is that it is not
generally possible to take the returned types and reconstruct the original
type (parentheses and all) from them.
splitLHsInstDeclTy :: LHsSigType GhcRn -> ([Name], Maybe (LHsContext GhcRn), LHsType GhcRn) #
Decompose a type class instance type (of the form
forall tvs. context => instance_head
) into its constituent parts.
Note that the [Name]
s returned correspond to either:
- The implicitly bound type variables (if the type lacks an outermost
forall
), or - The explicitly bound type variables (if the type has an outermost
forall
).
This function is careful not to look through parentheses.
See Note [No nested foralls or contexts in instance types]
for why this is important.
splitLHsGadtTy :: LHsSigType GhcPs -> (HsOuterSigTyVarBndrs GhcPs, Maybe (LHsContext GhcPs), LHsType GhcPs) #
Decompose a GADT type into its constituent parts.
Returns (outer_bndrs, mb_ctxt, body)
, where:
outer_bndrs
areHsOuterExplicit
if the type has explicit, outermost type variable binders. Otherwise, they areHsOuterImplicit
.mb_ctxt
isJust
the context, if it is provided. Otherwise, it isNothing
.body
is the body of the type after the optionalforall
s and context.
This function is careful not to look through parentheses.
See Note [GADT abstract syntax] (Wrinkle: No nested foralls or contexts)
GHC.Hs.Decls for why this is important.
splitLHsForAllTyInvis_KP :: forall (pass :: Pass). LHsType (GhcPass pass) -> (Maybe (EpAnnForallTy, [LHsTyVarBndr Specificity (GhcPass pass)]), LHsType (GhcPass pass)) #
Decompose a type of the form forall tvs. body
into its constituent
parts. Only splits type variable binders that
were quantified invisibly (e.g., forall a.
, with a dot).
This function is used to split apart certain types, such as instance
declaration types, which disallow visible forall
s. For instance, if GHC
split apart the forall
in instance forall a -> Show (Blah a)
, then that
declaration would mistakenly be accepted!
Unlike splitLHsForAllTyInvis
, this function does not look through
parentheses, hence the suffix _KP
(short for "Keep Parentheses").
splitLHsForAllTyInvis :: forall (pass :: Pass). LHsType (GhcPass pass) -> ((EpAnnForallTy, [LHsTyVarBndr Specificity (GhcPass pass)]), LHsType (GhcPass pass)) #
Decompose a type of the form forall tvs. body
into its constituent
parts. Only splits type variable binders that
were quantified invisibly (e.g., forall a.
, with a dot).
This function is used to split apart certain types, such as instance
declaration types, which disallow visible forall
s. For instance, if GHC
split apart the forall
in instance forall a -> Show (Blah a)
, then that
declaration would mistakenly be accepted!
Note that this function looks through parentheses, so it will work on types
such as (forall a. ...)
. The downside to this is that it is not
generally possible to take the returned types and reconstruct the original
type (parentheses and all) from them.
Unlike splitLHsSigmaTyInvis
, this function does not look through
parentheses, hence the suffix _KP
(short for "Keep Parentheses").
splitHsFunType :: forall (p :: Pass). LHsType (GhcPass p) -> ([AddEpAnn], EpAnnComments, [HsScaled (GhcPass p) (LHsType (GhcPass p))], LHsType (GhcPass p)) #
setHsTyVarBndrFlag :: forall flag flag' (pass :: Pass). flag -> HsTyVarBndr flag' (GhcPass pass) -> HsTyVarBndr flag (GhcPass pass) #
Set the attached flag
rdrNameAmbiguousFieldOcc :: forall (p :: Pass). AmbiguousFieldOcc (GhcPass p) -> RdrName #
pprLHsContext :: forall (p :: Pass). OutputableBndrId p => Maybe (LHsContext (GhcPass p)) -> SDoc #
pprHsOuterSigTyVarBndrs :: forall (p :: Pass). OutputableBndrId p => HsOuterSigTyVarBndrs (GhcPass p) -> SDoc #
Prints the outermost forall
in a type signature if one is written.
If there is no outermost forall
, nothing is printed.
pprHsOuterFamEqnTyVarBndrs :: forall (p :: Pass). OutputableBndrId p => HsOuterFamEqnTyVarBndrs (GhcPass p) -> SDoc #
Prints the explicit forall
in a type family equation if one is written.
If there is no explicit forall
, nothing is printed.
pprHsForAll :: forall (p :: Pass). OutputableBndrId p => HsForAllTelescope (GhcPass p) -> Maybe (LHsContext (GhcPass p)) -> SDoc #
Prints a forall; When passed an empty list, prints forall .
/forall ->
only when -dppr-debug
is enabled.
pprConDeclFields :: forall (p :: Pass). OutputableBndrId p => [LConDeclField (GhcPass p)] -> SDoc #
pprAnonWildCard :: SDoc #
parenthesizeHsType :: forall (p :: Pass). PprPrec -> LHsType (GhcPass p) -> LHsType (GhcPass p) #
checks if parenthesizeHsType
p ty
is
true, and if so, surrounds hsTypeNeedsParens
p tyty
with an HsParTy
. Otherwise, it simply
returns ty
.
parenthesizeHsContext :: forall (p :: Pass). PprPrec -> LHsContext (GhcPass p) -> LHsContext (GhcPass p) #
checks if parenthesizeHsContext
p ctxtctxt
is a single constraint
c
such that
is true, and if so, surrounds hsTypeNeedsParens
p cc
with an HsParTy
to form a parenthesized ctxt
. Otherwise, it simply
returns ctxt
unchanged.
mkHsWildCardBndrs :: thing -> HsWildCardBndrs GhcPs thing #
mkHsQTvs :: [LHsTyVarBndr () GhcPs] -> LHsQTyVars GhcPs #
mkHsPatSigType :: EpAnn EpaLocation -> LHsType GhcPs -> HsPatSigType GhcPs #
mkHsOuterImplicit :: HsOuterTyVarBndrs flag GhcPs #
mkHsOuterExplicit :: EpAnnForallTy -> [LHsTyVarBndr flag GhcPs] -> HsOuterTyVarBndrs flag GhcPs #
mkHsOpTy :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => LHsType (GhcPass p) -> LocatedN (IdP (GhcPass p)) -> LHsType (GhcPass p) -> HsType (GhcPass p) #
mkHsForAllVisTele :: forall (p :: Pass). EpAnnForallTy -> [LHsTyVarBndr () (GhcPass p)] -> HsForAllTelescope (GhcPass p) #
mkHsForAllInvisTele :: forall (p :: Pass). EpAnnForallTy -> [LHsTyVarBndr Specificity (GhcPass p)] -> HsForAllTelescope (GhcPass p) #
mkHsExplicitSigType :: EpAnnForallTy -> [LHsTyVarBndr Specificity GhcPs] -> LHsType GhcPs -> HsSigType GhcPs #
mkHsAppTys :: forall (p :: Pass). LHsType (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p) #
mkHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #
mkHsAppKindTy :: forall (p :: Pass). XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #
mkEmptyWildCardBndrs :: thing -> HsWildCardBndrs GhcRn thing #
lhsTypeArgSrcSpan :: forall (pass :: Pass). LHsTypeArg (GhcPass pass) -> SrcSpan #
Compute the SrcSpan
associated with an LHsTypeArg
.
isUnrestricted :: HsArrow GhcRn -> Bool #
hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name] #
hsTypeNeedsParens :: forall (p :: Pass). PprPrec -> HsType (GhcPass p) -> Bool #
returns hsTypeNeedsParens
p tTrue
if the type t
needs parentheses
under precedence p
.
hsTyVarName :: forall flag (p :: Pass). HsTyVarBndr flag (GhcPass p) -> IdP (GhcPass p) #
hsTyVarBndrFlag :: forall flag (pass :: Pass). HsTyVarBndr flag (GhcPass pass) -> flag #
Return the attached flag
hsTyKindSig :: forall (p :: Pass). LHsType (GhcPass p) -> Maybe (LHsKind (GhcPass p)) #
Get the kind signature of a type, ignoring parentheses:
hsTyKindSig `Maybe ` = Nothing hsTyKindSig `Maybe :: Type -> Type ` = Just `Type -> Type` hsTyKindSig `Maybe :: ((Type -> Type))` = Just `Type -> Type`
This is used to extract the result kind of type synonyms with a CUSK:
type S = (F :: res_kind) ^^^^^^^^
hsTyGetAppHead_maybe :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => LHsType (GhcPass p) -> Maybe (LocatedN (IdP (GhcPass p))) #
Retrieve the name of the "head" of a nested type application.
This is somewhat like GHC.Tc.Gen.HsType.splitHsAppTys
, but a little more
thorough. The purpose of this function is to examine instance heads, so it
doesn't handle *all* cases (like lists, tuples, (~)
, etc.).
hsTvbAllKinded :: forall (p :: Pass). LHsQTyVars (GhcPass p) -> Bool #
Do all type variables in this LHsQTyVars
come with kind annotations?
hsSigWcType :: UnXRec p => LHsSigWcType p -> LHsType p #
hsScopedTvs :: LHsSigType GhcRn -> [Name] #
hsOuterTyVarNames :: HsOuterTyVarBndrs flag GhcRn -> [Name] #
hsOuterExplicitBndrs :: forall flag (p :: Pass). HsOuterTyVarBndrs flag (GhcPass p) -> [LHsTyVarBndr flag (NoGhcTc (GhcPass p))] #
hsLTyVarNames :: forall flag (p :: Pass). [LHsTyVarBndr flag (GhcPass p)] -> [IdP (GhcPass p)] #
hsLTyVarName :: forall flag (p :: Pass). LHsTyVarBndr flag (GhcPass p) -> IdP (GhcPass p) #
hsLTyVarLocNames :: forall (p :: Pass). LHsQTyVars (GhcPass p) -> [LocatedN (IdP (GhcPass p))] #
hsLTyVarLocName :: forall flag (p :: Pass). LHsTyVarBndr flag (GhcPass p) -> LocatedN (IdP (GhcPass p)) #
hsExplicitLTyVarNames :: forall (p :: Pass). LHsQTyVars (GhcPass p) -> [IdP (GhcPass p)] #
hsAllLTyVarNames :: LHsQTyVars GhcRn -> [Name] #
getLHsInstDeclHead :: forall (p :: Pass). LHsSigType (GhcPass p) -> LHsType (GhcPass p) #
Decompose a type class instance type (of the form
forall tvs. context => instance_head
) into the instance_head
.
getLHsInstDeclClass_maybe :: forall (p :: Pass). Anno (IdGhcP p) ~ SrcSpanAnnN => LHsSigType (GhcPass p) -> Maybe (LocatedN (IdP (GhcPass p))) #
Decompose a type class instance type (of the form
forall tvs. context => instance_head
) into the instance_head
and
retrieve the underlying class type constructor (if it exists).
fromMaybeContext :: forall (p :: Pass). Maybe (LHsContext (GhcPass p)) -> HsContext (GhcPass p) #
dropWildCards :: LHsSigWcType pass -> LHsSigType pass #
arrowToHsType :: HsArrow GhcRn -> LHsType GhcRn #
Convert an arrow into its corresponding multiplicity. In essence this erases the information of whether the programmer wrote an explicit multiplicity or a shorthand.
Constructors
OverLitTc | |
Fields
|
Instances
Data OverLitTc | |
Defined in GHC.Hs.Lit Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OverLitTc -> c OverLitTc # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OverLitTc # toConstr :: OverLitTc -> Constr # dataTypeOf :: OverLitTc -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OverLitTc) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OverLitTc) # gmapT :: (forall b. Data b => b -> b) -> OverLitTc -> OverLitTc # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OverLitTc -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OverLitTc -> r # gmapQ :: (forall d. Data d => d -> u) -> OverLitTc -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OverLitTc -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OverLitTc -> m OverLitTc # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OverLitTc -> m OverLitTc # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OverLitTc -> m OverLitTc # |
pp_st_suffix :: SourceText -> SDoc -> SDoc -> SDoc #
pmPprHsLit :: forall (x :: Pass). HsLit (GhcPass x) -> SDoc #
pmPprHsLit pretty prints literals and is used when pretty printing pattern match warnings. All are printed the same (i.e., without hashes if they are primitive and not wrapped in constructors if they are boxed). This happens mainly for too reasons: * We do not want to expose their internal representation * The warnings become too messy
overLitType :: HsOverLit GhcTc -> Type #
convertLit :: forall (p1 :: Pass) (p2 :: Pass). HsLit (GhcPass p1) -> HsLit (GhcPass p2) #
Convert a literal from one index type to another
pprSpliceDecl :: forall (p :: Pass). OutputableBndrId p => HsSplice (GhcPass p) -> SpliceExplicitFlag -> SDoc #
pprPatBind :: forall (bndr :: Pass) (p :: Pass). (OutputableBndrId bndr, OutputableBndrId p) => LPat (GhcPass bndr) -> GRHSs (GhcPass p) (LHsExpr (GhcPass p)) -> SDoc #
pprFunBind :: forall (idR :: Pass). OutputableBndrId idR => MatchGroup (GhcPass idR) (LHsExpr (GhcPass idR)) -> SDoc #
data UntypedSpliceFlavour #
Instances
Data UntypedSpliceFlavour | |
Defined in Language.Haskell.Syntax.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UntypedSpliceFlavour -> c UntypedSpliceFlavour # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UntypedSpliceFlavour # toConstr :: UntypedSpliceFlavour -> Constr # dataTypeOf :: UntypedSpliceFlavour -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UntypedSpliceFlavour) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UntypedSpliceFlavour) # gmapT :: (forall b. Data b => b -> b) -> UntypedSpliceFlavour -> UntypedSpliceFlavour # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UntypedSpliceFlavour -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UntypedSpliceFlavour -> r # gmapQ :: (forall d. Data d => d -> u) -> UntypedSpliceFlavour -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UntypedSpliceFlavour -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UntypedSpliceFlavour -> m UntypedSpliceFlavour # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UntypedSpliceFlavour -> m UntypedSpliceFlavour # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UntypedSpliceFlavour -> m UntypedSpliceFlavour # |
Instances
Data TransForm | |
Defined in Language.Haskell.Syntax.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TransForm -> c TransForm # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TransForm # toConstr :: TransForm -> Constr # dataTypeOf :: TransForm -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TransForm) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TransForm) # gmapT :: (forall b. Data b => b -> b) -> TransForm -> TransForm # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TransForm -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TransForm -> r # gmapQ :: (forall d. Data d => d -> u) -> TransForm -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TransForm -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TransForm -> m TransForm # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TransForm -> m TransForm # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TransForm -> m TransForm # |
newtype ThModFinalizers #
Finalizers produced by a splice with
addModFinalizer
See Note [Delaying modFinalizers in untyped splices] in GHC.Rename.Splice. For how this is used.
Constructors
ThModFinalizers [ForeignRef (Q ())] |
Instances
Data ThModFinalizers | |
Defined in Language.Haskell.Syntax.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ThModFinalizers -> c ThModFinalizers # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ThModFinalizers # toConstr :: ThModFinalizers -> Constr # dataTypeOf :: ThModFinalizers -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ThModFinalizers) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ThModFinalizers) # gmapT :: (forall b. Data b => b -> b) -> ThModFinalizers -> ThModFinalizers # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ThModFinalizers -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ThModFinalizers -> r # gmapQ :: (forall d. Data d => d -> u) -> ThModFinalizers -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ThModFinalizers -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ThModFinalizers -> m ThModFinalizers # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ThModFinalizers -> m ThModFinalizers # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ThModFinalizers -> m ThModFinalizers # |
Exact print annotations when in qualifier lists or guards
- AnnKeywordId
: AnnVbar
,
AnnComma
,AnnThen
,
AnnBy
,AnnBy
,
AnnGroup
,AnnUsing
Constructors
LastStmt (XLastStmt idL idR body) body (Maybe Bool) (SyntaxExpr idR) | |
BindStmt | |
Fields | |
ApplicativeStmt (XApplicativeStmt idL idR body) [(SyntaxExpr idR, ApplicativeArg idL)] (Maybe (SyntaxExpr idR)) |
For full details, see Note [ApplicativeDo] in GHC.Rename.Expr |
BodyStmt (XBodyStmt idL idR body) body (SyntaxExpr idR) (SyntaxExpr idR) | |
LetStmt (XLetStmt idL idR body) (HsLocalBindsLR idL idR) |
|
ParStmt (XParStmt idL idR body) [ParStmtBlock idL idR] (HsExpr idR) (SyntaxExpr idR) | |
TransStmt | |
RecStmt | |
Fields
| |
XStmtLR !(XXStmtLR idL idR body) |
Instances
type SplicePointName = Name #
data SpliceDecoration #
A splice can appear with various decorations wrapped around it. This data type captures explicitly how it was originally written, for use in the pretty printer.
Constructors
DollarSplice | $splice or $$splice |
BareSplice | bare splice |
Instances
type RecUpdProj p = RecProj p (LHsExpr p) #
type RecProj p arg = HsRecField' (FieldLabelStrings p) arg #
type family PendingTcSplice' p #
Instances
type PendingTcSplice' (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family PendingRnSplice' p #
Instances
type PendingRnSplice' (GhcPass _1) | |
Defined in GHC.Hs.Expr |
data ParStmtBlock idL idR #
Parenthesised Statement Block
Constructors
ParStmtBlock (XParStmtBlock idL idR) [ExprLStmt idL] [IdP idR] (SyntaxExpr idR) | |
XParStmtBlock !(XXParStmtBlock idL idR) |
Instances
ExactPrint (ParStmtBlock GhcPs GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: ParStmtBlock GhcPs GhcPs -> Entry # setAnnotationAnchor :: ParStmtBlock GhcPs GhcPs -> Anchor -> EpAnnComments -> ParStmtBlock GhcPs GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => ParStmtBlock GhcPs GhcPs -> EP w m (ParStmtBlock GhcPs GhcPs) # |
data MatchGroupTc #
Constructors
MatchGroupTc | |
Fields
|
Instances
Data MatchGroupTc | |
Defined in Language.Haskell.Syntax.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MatchGroupTc -> c MatchGroupTc # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MatchGroupTc # toConstr :: MatchGroupTc -> Constr # dataTypeOf :: MatchGroupTc -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MatchGroupTc) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MatchGroupTc) # gmapT :: (forall b. Data b => b -> b) -> MatchGroupTc -> MatchGroupTc # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r # gmapQ :: (forall d. Data d => d -> u) -> MatchGroupTc -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> MatchGroupTc -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc # |
Instances
type LStmtLR idL idR body = XRec idL (StmtLR idL idR body) #
Located Statement with separate Left and Right id's
type LMatch id body = XRec id (Match id body) #
Located Match
May have AnnKeywordId
: AnnSemi
when in a
list
type LHsTupArg id = XRec id (HsTupArg id) #
Located Haskell Tuple Argument
HsTupArg
is used for tuple sections
(,a,)
is represented by
ExplicitTuple [Missing ty1, Present a, Missing ty3]
Which in turn stands for (x:ty1 y:ty2. (x,a,y))
type LHsRecUpdProj p = XRec p (RecUpdProj p) #
type LHsRecProj p arg = XRec p (RecProj p arg) #
type LHsCmdTop p = XRec p (HsCmdTop p) #
Top-level command, introducing a new arrow. This may occur inside a proc (where the stack is empty) or as an argument of a command-forming operator.
Located Haskell Top-level Command
Haskell Tuple Argument
Constructors
Present (XPresent id) (LHsExpr id) | The argument |
Missing (XMissing id) | The argument is missing, but this is its type |
XTupArg !(XXTupArg id) | Note [Trees that Grow] extension point |
Instances
data HsStmtContext p #
Haskell Statement Context.
Constructors
ListComp | |
MonadComp | |
DoExpr (Maybe ModuleName) |
|
MDoExpr (Maybe ModuleName) |
|
ArrowExpr | do-notation in an arrow-command context |
GhciStmtCtxt | A command-line Stmt in GHCi pat <- rhs |
PatGuard (HsMatchContext p) | Pattern guard for specified thing |
ParStmtCtxt (HsStmtContext p) | A branch of a parallel stmt |
TransStmtCtxt (HsStmtContext p) | A branch of a transform stmt |
data HsSplicedThing id #
Haskell Spliced Thing
Values that can result from running a splice.
Constructors
HsSplicedExpr (HsExpr id) | Haskell Spliced Expression |
HsSplicedTy (HsType id) | Haskell Spliced Type |
HsSplicedPat (Pat id) | Haskell Spliced Pattern |
type HsRecordBinds p = HsRecFields p (LHsExpr p) #
Haskell Record Bindings
A pragma, written as {-# ... #-}, that may appear within an expression.
Constructors
HsPragSCC (XSCC p) SourceText StringLiteral | |
XHsPragE !(XXPragE p) |
Instances
data HsMatchContext p #
Haskell Match Context
Context of a pattern match. This is more subtle than it would seem. See Note [Varieties of pattern matches].
Constructors
FunRhs | |
Fields
| |
LambdaExpr | Patterns of a lambda |
CaseAlt | Patterns and guards on a case alternative |
IfAlt | Guards of a multi-way if alternative |
ArrowMatchCtxt HsArrowMatchContext | A pattern match inside arrow notation |
PatBindRhs | A pattern binding eg [y] <- e = e |
PatBindGuards | Guards of pattern bindings, e.g., (Just b) | Just _ <- x = e | otherwise = e' |
RecUpd | Record update [used only in GHC.HsToCore.Expr to tell matchWrapper what sort of runtime error message to generate] |
StmtCtxt (HsStmtContext p) | Pattern of a do-stmt, list comprehension, pattern guard, etc |
ThPatSplice | A Template Haskell pattern splice |
ThPatQuote | A Template Haskell pattern quotation [p| (a,b) |] |
PatSyn | A pattern synonym declaration |
data HsFieldLabel p #
Constructors
HsFieldLabel | |
Fields | |
XHsFieldLabel !(XXHsFieldLabel p) |
Instances
Outputable (HsFieldLabel p) | |
Defined in Language.Haskell.Syntax.Expr Methods ppr :: HsFieldLabel p -> SDoc # | |
ExactPrint (HsFieldLabel GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: HsFieldLabel GhcPs -> Entry # setAnnotationAnchor :: HsFieldLabel GhcPs -> Anchor -> EpAnnComments -> HsFieldLabel GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsFieldLabel GhcPs -> EP w m (HsFieldLabel GhcPs) # | |
ExactPrint (NonEmpty (Located (HsFieldLabel GhcPs))) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: NonEmpty (Located (HsFieldLabel GhcPs)) -> Entry # setAnnotationAnchor :: NonEmpty (Located (HsFieldLabel GhcPs)) -> Anchor -> EpAnnComments -> NonEmpty (Located (HsFieldLabel GhcPs)) # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => NonEmpty (Located (HsFieldLabel GhcPs)) -> EP w m (NonEmpty (Located (HsFieldLabel GhcPs))) # |
The AST used to hard-refer to GhcPass, which was a layer violation. For now, we paper it over with this new extension point.
Haskell Top-level Command
Instances
ExactPrint (HsCmdTop GhcPs) | |
type Anno (HsCmdTop (GhcPass p)) | |
Defined in GHC.Hs.Expr |
Haskell Command (e.g. a "statement" in an Arrow proc block)
Constructors
HsCmdArrApp (XCmdArrApp id) (LHsExpr id) (LHsExpr id) HsArrAppType Bool | |
HsCmdArrForm (XCmdArrForm id) (LHsExpr id) LexicalFixity (Maybe Fixity) [LHsCmdTop id] |
|
HsCmdApp (XCmdApp id) (LHsCmd id) (LHsExpr id) | |
HsCmdLam (XCmdLam id) (MatchGroup id (LHsCmd id)) | |
HsCmdPar (XCmdPar id) (LHsCmd id) |
|
HsCmdCase (XCmdCase id) (LHsExpr id) (MatchGroup id (LHsCmd id)) |
|
HsCmdLamCase (XCmdLamCase id) (MatchGroup id (LHsCmd id)) |
|
HsCmdIf (XCmdIf id) (SyntaxExpr id) (LHsExpr id) (LHsCmd id) (LHsCmd id) | |
HsCmdLet (XCmdLet id) (HsLocalBinds id) (LHsCmd id) |
|
HsCmdDo (XCmdDo id) (XRec id [CmdLStmt id]) | |
XCmd !(XXCmd id) |
Instances
type family HsBracketRn p #
Instances
type HsBracketRn (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Haskell Bracket
data HsArrowMatchContext #
Haskell arrow match context.
Constructors
ProcExpr | A proc expression |
ArrowCaseAlt | A case alternative inside arrow notation |
KappaExpr | An arrow kappa abstraction |
data HsArrAppType #
Haskell Array Application Type
Constructors
HsHigherOrderApp | |
HsFirstOrderApp |
Instances
Data HsArrAppType | |
Defined in Language.Haskell.Syntax.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsArrAppType -> c HsArrAppType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsArrAppType # toConstr :: HsArrAppType -> Constr # dataTypeOf :: HsArrAppType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsArrAppType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsArrAppType) # gmapT :: (forall b. Data b => b -> b) -> HsArrAppType -> HsArrAppType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r # gmapQ :: (forall d. Data d => d -> u) -> HsArrAppType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsArrAppType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType # |
type GuardLStmt id = LStmt id (LHsExpr id) #
Guard Located Statement
Guarded Right Hand Side.
Constructors
GRHS (XCGRHS p body) [GuardLStmt p] body | |
XGRHS !(XXGRHS p body) |
Instances
newtype FieldLabelStrings p #
RecordDotSyntax field updates
Constructors
FieldLabelStrings [Located (HsFieldLabel p)] |
Instances
type FailOperator id = Maybe (SyntaxExpr id) #
The fail operator
This is used for `.. <-` "bind statements" in do notation, including non-monadic "binds" in applicative.
The fail operator is 'Just expr' if it potentially fail monadically. if the
pattern match cannot fail, or shouldn't fail monadically (regular incomplete
pattern exception), it is Nothing
.
See Note [Monad fail : Rebindable syntax, overloaded strings] for the type of
expression in the Just
case, and why it is so.
See Note [Failing pattern matches in Stmts] for which contexts for
'BindStmt
's should use the monadic fail and which shouldn't.
type CmdSyntaxTable p = [(Name, HsExpr p)] #
Command Syntax Table (for Arrow syntax)
data ArithSeqInfo id #
Arithmetic Sequence Information
type family ApplicativeArgStmCtxPass idL #
Instances
type ApplicativeArgStmCtxPass _1 | |
Defined in GHC.Hs.Expr |
data ApplicativeArg idL #
Applicative Argument
Constructors
ApplicativeArgOne | |
Fields
| |
ApplicativeArgMany | |
Fields
| |
XApplicativeArg !(XXApplicativeArg idL) |
prependQualified :: Maybe ModuleName -> SDoc -> SDoc #
pprStmtContext :: (Outputable (IdP p), UnXRec p) => HsStmtContext p -> SDoc #
pprMatchContextNoun :: (Outputable (IdP p), UnXRec p) => HsMatchContext p -> SDoc #
pprMatchContext :: (Outputable (IdP p), UnXRec p) => HsMatchContext p -> SDoc #
pprFieldLabelStrings :: FieldLabelStrings p -> SDoc #
pprExternalSrcLoc :: (StringLiteral, (Int, Int), (Int, Int)) -> SDoc #
pprAStmtContext :: (Outputable (IdP p), UnXRec p) => HsStmtContext p -> SDoc #
matchSeparator :: HsMatchContext p -> SDoc #
isTypedSplice :: HsSplice id -> Bool #
isTypedBracket :: HsBracket id -> Bool #
isPatSynCtxt :: HsMatchContext p -> Bool #
isMonadStmtContext :: HsStmtContext id -> Bool #
Is this a monadic context?
isMonadCompContext :: HsStmtContext id -> Bool #
isInfixMatch :: Match id body -> Bool #
isComprehensionContext :: HsStmtContext id -> Bool #
Warning pragma Declarations
Constructors
Warnings | |
Fields
| |
XWarnDecls !(XXWarnDecls pass) |
Instances
ExactPrint (WarnDecls GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint | |
type Anno (WarnDecls (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Warning pragma Declaration
Constructors
Warning (XWarning pass) [LIdP pass] WarningTxt | |
XWarnDecl !(XXWarnDecl pass) |
Instances
ExactPrint (WarnDecl GhcPs) | |
type Anno (WarnDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type TyFamInstEqn pass = FamEqn pass (LHsType pass) #
Type Family Instance Equation
data TyFamInstDecl pass #
Type Family Instance Declaration
Constructors
TyFamInstDecl | |
Fields
| |
XTyFamInstDecl !(XXTyFamInstDecl pass) |
Instances
ExactPrint (TyFamInstDecl GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: TyFamInstDecl GhcPs -> Entry # setAnnotationAnchor :: TyFamInstDecl GhcPs -> Anchor -> EpAnnComments -> TyFamInstDecl GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => TyFamInstDecl GhcPs -> EP w m (TyFamInstDecl GhcPs) # | |
type Anno (TyFamInstDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type TyFamDefltDecl = TyFamInstDecl #
Type family default declarations.
A convenient synonym for TyFamInstDecl
.
See Note [Type family instance declarations in HsSyn]
.
Type or Class Group
Constructors
TyClGroup | |
Fields
| |
XTyClGroup !(XXTyClGroup pass) |
A type or class declaration.
Constructors
FamDecl | type/data family T :: *->* |
Fields
| |
SynDecl |
|
Fields
| |
DataDecl |
|
Fields
| |
ClassDecl | |
Fields
| |
XTyClDecl !(XXTyClDecl pass) |
Instances
ExactPrint (TyClDecl GhcPs) | |
type Anno (TyClDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data StandaloneKindSig pass #
Constructors
StandaloneKindSig (XStandaloneKindSig pass) (LIdP pass) (LHsSigType pass) | |
XStandaloneKindSig !(XXStandaloneKindSig pass) |
Instances
ExactPrint (StandaloneKindSig GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: StandaloneKindSig GhcPs -> Entry # setAnnotationAnchor :: StandaloneKindSig GhcPs -> Anchor -> EpAnnComments -> StandaloneKindSig GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => StandaloneKindSig GhcPs -> EP w m (StandaloneKindSig GhcPs) # | |
type Anno (StandaloneKindSig (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data SpliceDecl p #
Splice Declaration
Constructors
SpliceDecl (XSpliceDecl p) (XRec p (HsSplice p)) SpliceExplicitFlag | |
XSpliceDecl !(XXSpliceDecl p) |
Instances
ExactPrint (SpliceDecl GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: SpliceDecl GhcPs -> Entry # setAnnotationAnchor :: SpliceDecl GhcPs -> Anchor -> EpAnnComments -> SpliceDecl GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => SpliceDecl GhcPs -> EP w m (SpliceDecl GhcPs) # | |
type Anno (SpliceDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Rule Declarations
Constructors
HsRules | |
Fields
| |
XRuleDecls !(XXRuleDecls pass) |
Instances
ExactPrint (RuleDecls GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint | |
type Anno (RuleDecls (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Rule Declaration
Constructors
HsRule | |
Fields
| |
XRuleDecl !(XXRuleDecl pass) |
Instances
ExactPrint (RuleDecl GhcPs) | |
type Anno (RuleDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Rule Binder
Constructors
RuleBndr (XCRuleBndr pass) (LIdP pass) | |
RuleBndrSig (XRuleBndrSig pass) (LIdP pass) (HsPatSigType pass) | |
XRuleBndr !(XXRuleBndr pass) |
Instances
ExactPrint (RuleBndr GhcPs) | |
type Anno (RuleBndr (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data RoleAnnotDecl pass #
Role Annotation Declaration
Constructors
RoleAnnotDecl (XCRoleAnnotDecl pass) (LIdP pass) [XRec pass (Maybe Role)] | |
XRoleAnnotDecl !(XXRoleAnnotDecl pass) |
Instances
ExactPrint (RoleAnnotDecl GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: RoleAnnotDecl GhcPs -> Entry # setAnnotationAnchor :: RoleAnnotDecl GhcPs -> Anchor -> EpAnnComments -> RoleAnnotDecl GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => RoleAnnotDecl GhcPs -> EP w m (RoleAnnotDecl GhcPs) # | |
type Anno (RoleAnnotDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Instances
Data NewOrData | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NewOrData -> c NewOrData # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NewOrData # toConstr :: NewOrData -> Constr # dataTypeOf :: NewOrData -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NewOrData) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewOrData) # gmapT :: (forall b. Data b => b -> b) -> NewOrData -> NewOrData # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NewOrData -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NewOrData -> r # gmapQ :: (forall d. Data d => d -> u) -> NewOrData -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NewOrData -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData # | |
Outputable NewOrData | |
Defined in Language.Haskell.Syntax.Decls | |
Eq NewOrData | |
type LWarnDecls pass = XRec pass (WarnDecls pass) #
Located Warning Declarations
type LTyFamInstEqn pass #
Arguments
= XRec pass (TyFamInstEqn pass) | May have |
Located Type Family Instance Equation
type LTyFamInstDecl pass = XRec pass (TyFamInstDecl pass) #
Located Type Family Instance Declaration
type LTyFamDefltDecl pass = XRec pass (TyFamDefltDecl pass) #
Located type family default declarations.
type LStandaloneKindSig pass = XRec pass (StandaloneKindSig pass) #
Located Standalone Kind Signature
type LSpliceDecl pass = XRec pass (SpliceDecl pass) #
Located Splice Declaration
type LRuleDecls pass = XRec pass (RuleDecls pass) #
Located Rule Declarations
type LRoleAnnotDecl pass = XRec pass (RoleAnnotDecl pass) #
Located Role Annotation Declaration
type LInjectivityAnn pass = XRec pass (InjectivityAnn pass) #
Located Injectivity Annotation
type LHsDerivingClause pass = XRec pass (HsDerivingClause pass) #
type LForeignDecl pass = XRec pass (ForeignDecl pass) #
Located Foreign Declaration
type LFamilyResultSig pass = XRec pass (FamilyResultSig pass) #
Located type Family Result Signature
type LFamilyDecl pass = XRec pass (FamilyDecl pass) #
Located type Family Declaration
type LDerivStrategy pass = XRec pass (DerivStrategy pass) #
type LDerivDecl pass = XRec pass (DerivDecl pass) #
Located stand-alone 'deriving instance' declaration
type LDerivClauseTys pass = XRec pass (DerivClauseTys pass) #
type LDefaultDecl pass = XRec pass (DefaultDecl pass) #
Located Default Declaration
type LDataFamInstDecl pass = XRec pass (DataFamInstDecl pass) #
Located Data Family Instance Declaration
Arguments
= XRec pass (ConDecl pass) | May have |
Located data Constructor Declaration
type LClsInstDecl pass = XRec pass (ClsInstDecl pass) #
Located Class Instance Declaration
Instance Declaration
Constructors
ClsInstD | |
Fields
| |
DataFamInstD | |
Fields
| |
TyFamInstD | |
Fields
| |
XInstDecl !(XXInstDecl pass) |
Instances
ExactPrint (InstDecl GhcPs) | |
type Anno (InstDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data InjectivityAnn pass #
If the user supplied an injectivity annotation it is represented using InjectivityAnn. At the moment this is a single injectivity condition - see Note [Injectivity annotation]. `Located name` stores the LHS of injectivity condition. `[Located name]` stores the RHS of injectivity condition. Example:
type family Foo a b c = r | r -> a c where ...
This will be represented as "InjectivityAnn r
[a
, c
]"
Constructors
InjectivityAnn (XCInjectivityAnn pass) (LIdP pass) [LIdP pass] | |
XInjectivityAnn !(XXInjectivityAnn pass) |
Instances
ExactPrint (InjectivityAnn GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: InjectivityAnn GhcPs -> Entry # setAnnotationAnchor :: InjectivityAnn GhcPs -> Anchor -> EpAnnComments -> InjectivityAnn GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => InjectivityAnn GhcPs -> EP w m (InjectivityAnn GhcPs) # | |
type Anno (InjectivityAnn (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type HsTyPats pass = [LHsTypeArg pass] #
Haskell Type Patterns
Instances
Data HsRuleRn | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsRuleRn -> c HsRuleRn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsRuleRn # toConstr :: HsRuleRn -> Constr # dataTypeOf :: HsRuleRn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsRuleRn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsRuleRn) # gmapT :: (forall b. Data b => b -> b) -> HsRuleRn -> HsRuleRn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsRuleRn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsRuleRn -> r # gmapQ :: (forall d. Data d => d -> u) -> HsRuleRn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsRuleRn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsRuleRn -> m HsRuleRn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsRuleRn -> m HsRuleRn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsRuleRn -> m HsRuleRn # |
Constructors
HsGroup | |
Fields
| |
XHsGroup !(XXHsGroup p) |
data HsDerivingClause pass #
A single deriving
clause of a data declaration.
Constructors
HsDerivingClause | |
Fields
| |
XHsDerivingClause !(XXHsDerivingClause pass) |
Instances
ExactPrint (HsDerivingClause GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: HsDerivingClause GhcPs -> Entry # setAnnotationAnchor :: HsDerivingClause GhcPs -> Anchor -> EpAnnComments -> HsDerivingClause GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsDerivingClause GhcPs -> EP w m (HsDerivingClause GhcPs) # | |
type Anno (HsDerivingClause (GhcPass p)) | |
Defined in GHC.Hs.Decls |
type HsDeriving pass #
Arguments
= [LHsDerivingClause pass] | The optional The list of |
Haskell Deriving clause
A Haskell Declaration
Constructors
TyClD (XTyClD p) (TyClDecl p) | Type or Class Declaration |
InstD (XInstD p) (InstDecl p) | Instance declaration |
DerivD (XDerivD p) (DerivDecl p) | Deriving declaration |
ValD (XValD p) (HsBind p) | Value declaration |
SigD (XSigD p) (Sig p) | Signature declaration |
KindSigD (XKindSigD p) (StandaloneKindSig p) | Standalone kind signature |
DefD (XDefD p) (DefaultDecl p) | 'default' declaration |
ForD (XForD p) (ForeignDecl p) | Foreign declaration |
WarningD (XWarningD p) (WarnDecls p) | Warning declaration |
AnnD (XAnnD p) (AnnDecl p) | Annotation declaration |
RuleD (XRuleD p) (RuleDecls p) | Rule declaration |
SpliceD (XSpliceD p) (SpliceDecl p) | Splice declaration (Includes quasi-quotes) |
DocD (XDocD p) DocDecl | Documentation comment declaration |
RoleAnnotD (XRoleAnnotD p) (RoleAnnotDecl p) | Role annotation declaration |
XHsDecl !(XXHsDecl p) |
Instances
ExactPrint (HsDecl GhcPs) | |
type Anno (HsDecl (GhcPass _1)) | |
Defined in GHC.Hs.Decls |
data HsDataDefn pass #
Haskell Data type Definition
Constructors
HsDataDefn | Declares a data type or newtype, giving its constructors
|
Fields
| |
XHsDataDefn !(XXHsDataDefn pass) |
type HsConDeclH98Details pass = HsConDetails Void (HsScaled pass (LBangType pass)) (XRec pass [LConDeclField pass]) #
The arguments in a Haskell98-style data constructor.
data HsConDeclGADTDetails pass #
The arguments in a GADT constructor. Unlike Haskell98-style constructors,
GADT constructors cannot be declared with infix syntax. As a result, we do
not use HsConDetails
here, as InfixCon
would be an unrepresentable
state. (There is a notion of infix GADT constructors for the purposes of
derived Show instances—see Note [Infix GADT constructors] in
GHC.Tc.TyCl—but that is an orthogonal concern.)
Constructors
PrefixConGADT [HsScaled pass (LBangType pass)] | |
RecConGADT (XRec pass [LConDeclField pass]) |
Instances
ExactPrint (FunDep GhcPs) | |
type Anno (FunDep (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data ForeignImport #
Constructors
CImport (Located CCallConv) (Located Safety) (Maybe Header) CImportSpec (Located SourceText) |
Instances
Data ForeignImport | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignImport -> c ForeignImport # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ForeignImport # toConstr :: ForeignImport -> Constr # dataTypeOf :: ForeignImport -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ForeignImport) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ForeignImport) # gmapT :: (forall b. Data b => b -> b) -> ForeignImport -> ForeignImport # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignImport -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignImport -> r # gmapQ :: (forall d. Data d => d -> u) -> ForeignImport -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignImport -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignImport -> m ForeignImport # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignImport -> m ForeignImport # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignImport -> m ForeignImport # | |
Outputable ForeignImport | |
Defined in Language.Haskell.Syntax.Decls Methods ppr :: ForeignImport -> SDoc # | |
ExactPrint ForeignImport | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: ForeignImport -> Entry # setAnnotationAnchor :: ForeignImport -> Anchor -> EpAnnComments -> ForeignImport # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => ForeignImport -> EP w m ForeignImport # |
data ForeignExport #
Constructors
CExport (Located CExportSpec) (Located SourceText) |
Instances
Data ForeignExport | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignExport -> c ForeignExport # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ForeignExport # toConstr :: ForeignExport -> Constr # dataTypeOf :: ForeignExport -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ForeignExport) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ForeignExport) # gmapT :: (forall b. Data b => b -> b) -> ForeignExport -> ForeignExport # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignExport -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignExport -> r # gmapQ :: (forall d. Data d => d -> u) -> ForeignExport -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignExport -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignExport -> m ForeignExport # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignExport -> m ForeignExport # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignExport -> m ForeignExport # | |
Outputable ForeignExport | |
Defined in Language.Haskell.Syntax.Decls Methods ppr :: ForeignExport -> SDoc # | |
ExactPrint ForeignExport | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: ForeignExport -> Entry # setAnnotationAnchor :: ForeignExport -> Anchor -> EpAnnComments -> ForeignExport # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => ForeignExport -> EP w m ForeignExport # |
data ForeignDecl pass #
Foreign Declaration
Constructors
ForeignImport | |
Fields
| |
ForeignExport | |
Fields
| |
XForeignDecl !(XXForeignDecl pass) |
Instances
ExactPrint (ForeignDecl GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: ForeignDecl GhcPs -> Entry # setAnnotationAnchor :: ForeignDecl GhcPs -> Anchor -> EpAnnComments -> ForeignDecl GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => ForeignDecl GhcPs -> EP w m (ForeignDecl GhcPs) # | |
type Anno (ForeignDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data FamilyResultSig pass #
type Family Result Signature
Constructors
NoSig (XNoSig pass) | |
KindSig (XCKindSig pass) (LHsKind pass) | |
TyVarSig (XTyVarSig pass) (LHsTyVarBndr () pass) | |
XFamilyResultSig !(XXFamilyResultSig pass) |
Instances
type Anno (FamilyResultSig (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data FamilyInfo pass #
Constructors
DataFamily | |
OpenTypeFamily | |
ClosedTypeFamily (Maybe [LTyFamInstEqn pass]) |
|
Instances
Outputable (FamilyInfo pass) | |
Defined in Language.Haskell.Syntax.Decls Methods ppr :: FamilyInfo pass -> SDoc # |
data FamilyDecl pass #
type Family Declaration
Constructors
FamilyDecl | |
Fields
| |
XFamilyDecl !(XXFamilyDecl pass) |
Instances
ExactPrint (FamilyDecl GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: FamilyDecl GhcPs -> Entry # setAnnotationAnchor :: FamilyDecl GhcPs -> Anchor -> EpAnnComments -> FamilyDecl GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => FamilyDecl GhcPs -> EP w m (FamilyDecl GhcPs) # | |
type Anno (FamilyDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Family Equation
One equation in a type family instance declaration, data family instance declaration, or type family default. See Note [Type family instance declarations in HsSyn] See Note [Family instance declaration binders]
Constructors
FamEqn | |
Fields
| |
XFamEqn !(XXFamEqn pass rhs) |
Instances
ExactPrint body => ExactPrint (FamEqn GhcPs body) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint | |
type Anno (FamEqn (GhcPass p) _1) | |
Defined in GHC.Hs.Decls | |
type Anno (FamEqn (GhcPass p) _1) | |
Defined in GHC.Hs.Decls | |
type Anno (FamEqn p (LocatedA (HsType p))) | |
Defined in GHC.Hs.Decls |
Documentation comment Declaration
Constructors
DocCommentNext HsDocString | |
DocCommentPrev HsDocString | |
DocCommentNamed String HsDocString | |
DocGroup Int HsDocString |
Instances
Data DocDecl | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DocDecl -> c DocDecl # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DocDecl # toConstr :: DocDecl -> Constr # dataTypeOf :: DocDecl -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DocDecl) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DocDecl) # gmapT :: (forall b. Data b => b -> b) -> DocDecl -> DocDecl # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DocDecl -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DocDecl -> r # gmapQ :: (forall d. Data d => d -> u) -> DocDecl -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DocDecl -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DocDecl -> m DocDecl # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DocDecl -> m DocDecl # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DocDecl -> m DocDecl # | |
Outputable DocDecl | |
Defined in Language.Haskell.Syntax.Decls | |
ExactPrint DocDecl | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint | |
type Anno DocDecl | |
Defined in GHC.Hs.Decls |
data DerivStrategy pass #
Which technique the user explicitly requested when deriving an instance.
Constructors
StockStrategy (XStockStrategy pass) | GHC's "standard" strategy, which is to implement a
custom instance for the data type. This only works
for certain types that GHC knows about (e.g., |
AnyclassStrategy (XAnyClassStrategy pass) | -XDeriveAnyClass |
NewtypeStrategy (XNewtypeStrategy pass) | -XGeneralizedNewtypeDeriving |
ViaStrategy (XViaStrategy pass) | -XDerivingVia |
Instances
ExactPrint (DerivStrategy GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: DerivStrategy GhcPs -> Entry # setAnnotationAnchor :: DerivStrategy GhcPs -> Anchor -> EpAnnComments -> DerivStrategy GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => DerivStrategy GhcPs -> EP w m (DerivStrategy GhcPs) # | |
type Anno (DerivStrategy (GhcPass p)) | |
Defined in GHC.Hs.Decls |
Stand-alone 'deriving instance' declaration
Constructors
DerivDecl | |
Fields
| |
XDerivDecl !(XXDerivDecl pass) |
Instances
ExactPrint (DerivDecl GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint | |
type Anno (DerivDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data DerivClauseTys pass #
The types mentioned in a single deriving
clause. This can come in two
forms, DctSingle
or DctMulti
, depending on whether the types are
surrounded by enclosing parentheses or not. These parentheses are
semantically different than HsParTy
. For example, deriving ()
means
"derive zero classes" rather than "derive an instance of the 0-tuple".
DerivClauseTys
use LHsSigType
because deriving
clauses can mention
type variables that aren't bound by the datatype, e.g.
data T b = ... deriving (C [a])
should produce a derived instance for C [a] (T b)
.
Constructors
DctSingle (XDctSingle pass) (LHsSigType pass) | A Example: |
DctMulti (XDctMulti pass) [LHsSigType pass] | A Example: |
XDerivClauseTys !(XXDerivClauseTys pass) |
Instances
ExactPrint (DerivClauseTys GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: DerivClauseTys GhcPs -> Entry # setAnnotationAnchor :: DerivClauseTys GhcPs -> Anchor -> EpAnnComments -> DerivClauseTys GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => DerivClauseTys GhcPs -> EP w m (DerivClauseTys GhcPs) # | |
type Anno (DerivClauseTys (GhcPass _1)) | |
Defined in GHC.Hs.Decls |
data DefaultDecl pass #
Default Declaration
Constructors
DefaultDecl (XCDefaultDecl pass) [LHsType pass] | |
XDefaultDecl !(XXDefaultDecl pass) |
Instances
ExactPrint (DefaultDecl GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: DefaultDecl GhcPs -> Entry # setAnnotationAnchor :: DefaultDecl GhcPs -> Anchor -> EpAnnComments -> DefaultDecl GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => DefaultDecl GhcPs -> EP w m (DefaultDecl GhcPs) # | |
type Anno (DefaultDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
newtype DataFamInstDecl pass #
Data Family Instance Declaration
Constructors
DataFamInstDecl | |
Fields
|
Instances
type Anno (DataFamInstDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data DataDeclRn #
Constructors
DataDeclRn | |
Fields
|
Instances
Data DataDeclRn | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataDeclRn -> c DataDeclRn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DataDeclRn # toConstr :: DataDeclRn -> Constr # dataTypeOf :: DataDeclRn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DataDeclRn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DataDeclRn) # gmapT :: (forall b. Data b => b -> b) -> DataDeclRn -> DataDeclRn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataDeclRn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataDeclRn -> r # gmapQ :: (forall d. Data d => d -> u) -> DataDeclRn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DataDeclRn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataDeclRn -> m DataDeclRn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataDeclRn -> m DataDeclRn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataDeclRn -> m DataDeclRn # |
data T b = forall a. Eq a => MkT a b MkT :: forall b a. Eq a => MkT a b data T b where MkT1 :: Int -> T Int data T = IntMkT
Int | MkT2 data T a where IntMkT
Int :: T Int
AnnKeywordId
s :AnnOpen
,AnnDotdot
,AnnCLose
,AnnEqual
,AnnVbar
,AnnDarrow
,AnnDarrow
,AnnForall
,AnnDot
data Constructor Declaration
Constructors
ConDeclGADT | |
Fields
| |
ConDeclH98 | |
Fields
| |
XConDecl !(XXConDecl pass) |
Instances
ExactPrint (ConDecl GhcPs) | |
type Anno (ConDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data ClsInstDecl pass #
Class Instance Declaration
Constructors
ClsInstDecl | |
Fields
| |
XClsInstDecl !(XXClsInstDecl pass) |
Instances
ExactPrint (ClsInstDecl GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: ClsInstDecl GhcPs -> Entry # setAnnotationAnchor :: ClsInstDecl GhcPs -> Anchor -> EpAnnComments -> ClsInstDecl GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => ClsInstDecl GhcPs -> EP w m (ClsInstDecl GhcPs) # | |
type Anno (ClsInstDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
data CImportSpec #
Constructors
CLabel CLabelString | |
CFunction CCallTarget | |
CWrapper |
Instances
Data CImportSpec | |
Defined in Language.Haskell.Syntax.Decls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CImportSpec -> c CImportSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CImportSpec # toConstr :: CImportSpec -> Constr # dataTypeOf :: CImportSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CImportSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CImportSpec) # gmapT :: (forall b. Data b => b -> b) -> CImportSpec -> CImportSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CImportSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CImportSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> CImportSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CImportSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec # |
data AnnProvenance pass #
Annotation Provenance
Constructors
ValueAnnProvenance (LIdP pass) | |
TypeAnnProvenance (LIdP pass) | |
ModuleAnnProvenance |
Annotation Declaration
Constructors
HsAnnotation (XHsAnnotation pass) SourceText (AnnProvenance pass) (XRec pass (HsExpr pass)) | |
XAnnDecl !(XXAnnDecl pass) |
Instances
ExactPrint (AnnDecl GhcPs) | |
type Anno (AnnDecl (GhcPass p)) | |
Defined in GHC.Hs.Decls |
tyClGroupTyClDecls :: [TyClGroup pass] -> [LTyClDecl pass] #
tyClGroupRoleDecls :: [TyClGroup pass] -> [LRoleAnnotDecl pass] #
tyClGroupKindSigs :: [TyClGroup pass] -> [LStandaloneKindSig pass] #
tyClGroupInstDecls :: [TyClGroup pass] -> [LInstDecl pass] #
tyClDeclTyVars :: TyClDecl pass -> LHsQTyVars pass #
pprFullRuleName :: Located (SourceText, RuleName) -> SDoc #
pprFlavour :: FamilyInfo pass -> SDoc #
newOrDataToFlavour :: NewOrData -> TyConFlavour #
Convert a NewOrData
to a TyConFlavour
isTypeFamilyDecl :: TyClDecl pass -> Bool #
type family declaration
isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool #
open type family info
isFamilyDecl :: TyClDecl pass -> Bool #
type/data family declaration
isDataFamilyDecl :: TyClDecl pass -> Bool #
data family declaration
isDataDecl :: TyClDecl pass -> Bool #
True
= argument is a data
/newtype
declaration.
isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool #
closed type family info
isClassDecl :: TyClDecl pass -> Bool #
type class
hsGroupInstDecls :: HsGroup id -> [LInstDecl id] #
docDeclDoc :: DocDecl -> HsDocString #
derivStrategyName :: DerivStrategy a -> SDoc #
A short description of a DerivStrategy'
.
collectRuleBndrSigTys :: [RuleBndr pass] -> [HsPatSigType pass] #
annProvenanceName_maybe :: UnXRec p => AnnProvenance p -> Maybe (IdP p) #
data TcSpecPrags #
Type checker Specialisation Pragmas
TcSpecPrags
conveys SPECIALISE
pragmas from the type checker to the desugarer
Constructors
IsDefaultMethod | Super-specialised: a default method should be macro-expanded at every call site |
SpecPrags [LTcSpecPrag] |
Instances
Data TcSpecPrags | |
Defined in Language.Haskell.Syntax.Binds Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TcSpecPrags -> c TcSpecPrags # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TcSpecPrags # toConstr :: TcSpecPrags -> Constr # dataTypeOf :: TcSpecPrags -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TcSpecPrags) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TcSpecPrags) # gmapT :: (forall b. Data b => b -> b) -> TcSpecPrags -> TcSpecPrags # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TcSpecPrags -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TcSpecPrags -> r # gmapQ :: (forall d. Data d => d -> u) -> TcSpecPrags -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TcSpecPrags -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags # |
data TcSpecPrag #
Type checker Specification Pragma
Constructors
SpecPrag Id HsWrapper InlinePragma | The Id to be specialised, a wrapper that specialises the polymorphic function, and inlining spec for the specialised function |
Instances
Data TcSpecPrag | |
Defined in Language.Haskell.Syntax.Binds Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TcSpecPrag -> c TcSpecPrag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TcSpecPrag # toConstr :: TcSpecPrag -> Constr # dataTypeOf :: TcSpecPrag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TcSpecPrag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TcSpecPrag) # gmapT :: (forall b. Data b => b -> b) -> TcSpecPrag -> TcSpecPrag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TcSpecPrag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TcSpecPrag -> r # gmapQ :: (forall d. Data d => d -> u) -> TcSpecPrag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TcSpecPrag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag # |
Signatures and pragmas
Constructors
TypeSig (XTypeSig pass) [LIdP pass] (LHsSigWcType pass) | An ordinary type signature f :: Num a => a -> a After renaming, this list of Names contains the named
wildcards brought into scope by this signature. For a signature
|
PatSynSig (XPatSynSig pass) [LIdP pass] (LHsSigType pass) | A pattern synonym type signature pattern Single :: () => (Show a) => a -> [a] |
ClassOpSig (XClassOpSig pass) Bool [LIdP pass] (LHsSigType pass) | A signature for a class method False: ordinary class-method signature True: generic-default class method signature e.g. class C a where op :: a -> a -- Ordinary default op :: Eq a => a -> a -- Generic default No wildcards allowed here |
IdSig (XIdSig pass) Id | A type signature in generated code, notably the code generated for record selectors. We simply record the desired Id itself, replete with its name, type and IdDetails. Otherwise it's just like a type signature: there should be an accompanying binding |
FixSig (XFixSig pass) (FixitySig pass) | An ordinary fixity declaration infixl 8 *** |
InlineSig (XInlineSig pass) (LIdP pass) InlinePragma | An inline pragma {#- INLINE f #-} |
SpecSig (XSpecSig pass) (LIdP pass) [LHsSigType pass] InlinePragma | A specialisation pragma {-# SPECIALISE f :: Int -> Int #-} |
SpecInstSig (XSpecInstSig pass) SourceText (LHsSigType pass) | A specialisation pragma for instance declarations only {-# SPECIALISE instance Eq [Int] #-} (Class tys); should be a specialisation of the current instance declaration |
MinimalSig (XMinimalSig pass) SourceText (LBooleanFormula (LIdP pass)) | A minimal complete definition pragma {-# MINIMAL a | (b, c | (d | e)) #-} |
SCCFunSig (XSCCFunSig pass) SourceText (LIdP pass) (Maybe (XRec pass StringLiteral)) | A "set cost centre" pragma for declarations {-# SCC funName #-} or {-# SCC funName "cost_centre_name" #-} |
CompleteMatchSig (XCompleteMatchSig pass) SourceText (XRec pass [LIdP pass]) (Maybe (LIdP pass)) | A complete match pragma {-# COMPLETE C, D [:: T] #-} Used to inform the pattern match checker about additional complete matchings which, for example, arise from pattern synonym definitions. |
XSig !(XXSig pass) |
Instances
ExactPrint (Sig GhcPs) | |
type Anno (Sig (GhcPass p)) | |
Defined in GHC.Hs.Binds |
data RecordPatSynField pass #
Record Pattern Synonym Field
Constructors
RecordPatSynField | |
Fields
|
Instances
Outputable (RecordPatSynField a) | |
Defined in Language.Haskell.Syntax.Binds Methods ppr :: RecordPatSynField a -> SDoc # | |
ExactPrint (RecordPatSynField GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: RecordPatSynField GhcPs -> Entry # setAnnotationAnchor :: RecordPatSynField GhcPs -> Anchor -> EpAnnComments -> RecordPatSynField GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => RecordPatSynField GhcPs -> EP w m (RecordPatSynField GhcPs) # |
data PatSynBind idL idR #
AnnKeywordId
:AnnPattern
,AnnEqual
,AnnLarrow
,AnnWhere
,AnnOpen
'{'
,AnnClose
'}'
,
Pattern Synonym binding
Constructors
PSB | |
Fields
| |
XPatSynBind !(XXPatSynBind idL idR) |
Instances
ExactPrint (PatSynBind GhcPs GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: PatSynBind GhcPs GhcPs -> Entry # setAnnotationAnchor :: PatSynBind GhcPs GhcPs -> Anchor -> EpAnnComments -> PatSynBind GhcPs GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => PatSynBind GhcPs GhcPs -> EP w m (PatSynBind GhcPs GhcPs) # |
type LTcSpecPrag = Located TcSpecPrag #
Located Type checker Specification Pragmas
type LIPBind id = XRec id (IPBind id) #
Located Implicit Parameter Binding
May have AnnKeywordId
: AnnSemi
when in a
list
type LHsLocalBindsLR idL idR = XRec idL (HsLocalBindsLR idL idR) #
type LHsLocalBinds id = XRec id (HsLocalBinds id) #
Located Haskell local bindings
type LHsBindsLR idL idR = Bag (LHsBindLR idL idR) #
Located Haskell Bindings with separate Left and Right identifier types
type LHsBinds id = LHsBindsLR id id #
Located Haskell Bindings
type LHsBindLR idL idR = XRec idL (HsBindLR idL idR) #
Located Haskell Binding with separate Left and Right identifier types
type LFixitySig pass = XRec pass (FixitySig pass) #
Located Fixity Signature
Implicit parameter bindings.
These bindings start off as (Left "x") in the parser and stay that way until after type-checking when they are replaced with (Right d), where "d" is the name of the dictionary holding the evidence for the implicit parameter.
Constructors
IPBind (XCIPBind id) (Either (XRec id HsIPName) (IdP id)) (LHsExpr id) | |
XIPBind !(XXIPBind id) |
Instances
ExactPrint (IPBind GhcPs) | |
type Anno (IPBind (GhcPass p)) | |
Defined in GHC.Hs.Binds |
data HsValBindsLR idL idR #
Haskell Value bindings with separate Left and Right identifier types (not implicit parameters) Used for both top level and nested bindings May contain pattern synonym bindings
Constructors
ValBinds (XValBinds idL idR) (LHsBindsLR idL idR) [LSig idR] | Value Bindings In Before renaming RHS; idR is always RdrName Not dependency analysed Recursive by default |
XValBindsLR !(XXValBindsLR idL idR) | Value Bindings Out After renaming RHS; idR can be Name or Id Dependency analysed, later bindings in the list may depend on earlier ones. |
Instances
ExactPrint (HsValBindsLR GhcPs GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: HsValBindsLR GhcPs GhcPs -> Entry # setAnnotationAnchor :: HsValBindsLR GhcPs GhcPs -> Anchor -> EpAnnComments -> HsValBindsLR GhcPs GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsValBindsLR GhcPs GhcPs -> EP w m (HsValBindsLR GhcPs GhcPs) # |
type HsValBinds id = HsValBindsLR id id #
Haskell Value Bindings
data HsPatSynDir id #
Haskell Pattern Synonym Direction
Constructors
Unidirectional | |
ImplicitBidirectional | |
ExplicitBidirectional (MatchGroup id (LHsExpr id)) |
type HsPatSynDetails pass = HsConDetails Void (LIdP pass) [RecordPatSynField pass] #
Haskell Pattern Synonym Details
data HsLocalBindsLR idL idR #
Haskell Local Bindings with separate Left and Right identifier types
Bindings in a 'let' expression or a 'where' clause
Constructors
HsValBinds (XHsValBinds idL idR) (HsValBindsLR idL idR) | Haskell Value Bindings |
HsIPBinds (XHsIPBinds idL idR) (HsIPBinds idR) | Haskell Implicit Parameter Bindings |
EmptyLocalBinds (XEmptyLocalBinds idL idR) | Empty Local Bindings |
XHsLocalBindsLR !(XXHsLocalBindsLR idL idR) |
Instances
ExactPrint (HsLocalBinds GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: HsLocalBinds GhcPs -> Entry # setAnnotationAnchor :: HsLocalBinds GhcPs -> Anchor -> EpAnnComments -> HsLocalBinds GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsLocalBinds GhcPs -> EP w m (HsLocalBinds GhcPs) # |
type HsLocalBinds id = HsLocalBindsLR id id #
Haskell Local Bindings
Haskell Implicit Parameter Bindings
Constructors
IPBinds (XIPBinds id) [LIPBind id] | |
XHsIPBinds !(XXHsIPBinds id) |
Instances
Haskell Binding with separate Left and Right id's
Constructors
FunBind | Function-like Binding FunBind is used for both functions Reason 1: Special case for type inference: see Reason 2: Instance decls can only have FunBinds, which is convenient. If you change this, you'll need to change e.g. rnMethodBinds But note that the form Strict bindings have their strictness recorded in the |
Fields
| |
PatBind | Pattern Binding The pattern is never a simple variable; That case is done by FunBind. See Note [FunBind vs PatBind] for details about the relationship between FunBind and PatBind. |
Fields
| |
VarBind | Variable Binding Dictionary binding and suchlike. All VarBinds are introduced by the type checker |
AbsBinds | Abstraction Bindings |
Fields
| |
PatSynBind | Patterns Synonym Binding |
Fields
| |
XHsBindsLR !(XXHsBindsLR idL idR) |
Instances
ExactPrint (HsBind GhcPs) | |
type Anno (HsBindLR (GhcPass idL) (GhcPass idR)) | |
Defined in GHC.Hs.Binds |
Fixity Signature
Constructors
FixitySig (XFixitySig pass) [LIdP pass] Fixity | |
XFixitySig !(XXFixitySig pass) |
Instances
type Anno (FixitySig (GhcPass p)) | |
Defined in GHC.Hs.Binds |
Abstraction Bindings Export
isTypeLSig :: UnXRec p => LSig p -> Bool #
isSpecLSig :: UnXRec p => LSig p -> Bool #
isSpecInstLSig :: UnXRec p => LSig p -> Bool #
isSCCFunSig :: UnXRec p => LSig p -> Bool #
isPragLSig :: UnXRec p => LSig p -> Bool #
isMinimalLSig :: UnXRec p => LSig p -> Bool #
isInlineLSig :: UnXRec p => LSig p -> Bool #
isFixityLSig :: UnXRec p => LSig p -> Bool #
isDefaultMethod :: TcSpecPrags -> Bool #
isCompleteMatchSig :: UnXRec p => LSig p -> Bool #
hasSpecPrags :: TcSpecPrags -> Bool #
type LHsRecUpdField p = XRec p (HsRecUpdField p) #
Located Haskell Record Update Field
type LHsRecField' p id arg = XRec p (HsRecField' id arg) #
Located Haskell Record Field
type LHsRecField p arg = XRec p (HsRecField p arg) #
Located Haskell Record Field
type HsRecUpdField p = HsRecField' (AmbiguousFieldOcc p) (LHsExpr p) #
Haskell Record Update Field
data HsRecFields p arg #
Haskell Record Fields
HsRecFields is used only for patterns and expressions (not data type declarations)
Constructors
HsRecFields | |
Fields
|
Instances
(Outputable arg, Outputable (XRec p (HsRecField p arg))) => Outputable (HsRecFields p arg) | |
Defined in Language.Haskell.Syntax.Pat Methods ppr :: HsRecFields p arg -> SDoc # | |
ExactPrint body => ExactPrint (HsRecFields GhcPs body) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: HsRecFields GhcPs body -> Entry # setAnnotationAnchor :: HsRecFields GhcPs body -> Anchor -> EpAnnComments -> HsRecFields GhcPs body # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsRecFields GhcPs body -> EP w m (HsRecFields GhcPs body) # |
data HsRecField' id arg #
Haskell Record Field
For details on above see note [exact print annotations] in GHC.Parser.Annotation
Constructors
HsRecField | |
Fields
|
Instances
type HsRecField p arg = HsRecField' (FieldOcc p) arg #
Haskell Record Field
type HsConPatDetails p = HsConDetails (HsPatSigType (NoGhcTc p)) (LPat p) (HsRecFields p (LPat p)) #
Haskell Constructor Pattern Details
hsRecFieldsArgs :: UnXRec p => HsRecFields p arg -> [arg] #
hsRecFields :: UnXRec p => HsRecFields p arg -> [XCFieldOcc p] #
hsRecFieldSel :: HsRecField pass arg -> Located (XCFieldOcc pass) #
hsConPatArgs :: UnXRec p => HsConPatDetails p -> [LPat p] #
type LHsWcType pass = HsWildCardBndrs pass (LHsType pass) #
Located Haskell Wildcard Type
type LHsTypeArg p = HsArg (LHsType p) (LHsKind p) #
Arguments
= XRec pass (HsType pass) | May have |
Located Haskell Type
type LHsTyVarBndr flag pass = XRec pass (HsTyVarBndr flag pass) #
Located Haskell Type Variable Binder
type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass) #
Located Haskell Signature Wildcard Type
type LHsSigType pass = XRec pass (HsSigType pass) #
Located Haskell Signature Type
data LHsQTyVars pass #
Located Haskell Quantified Type Variables
Constructors
HsQTvs | |
Fields
| |
XLHsQTyVars !(XXLHsQTyVars pass) |
type LHsContext pass #
Arguments
= XRec pass (HsContext pass) |
|
Located Haskell Context
type LConDeclField pass #
Arguments
= XRec pass (ConDeclField pass) | May have |
Located Constructor Declaration Field
data HsWildCardBndrs pass thing #
Haskell Wildcard Binders
Constructors
HsWC | |
XHsWildCardBndrs !(XXHsWildCardBndrs pass thing) |
Instances
ExactPrint body => ExactPrint (HsWildCardBndrs GhcPs body) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: HsWildCardBndrs GhcPs body -> Entry # setAnnotationAnchor :: HsWildCardBndrs GhcPs body -> Anchor -> EpAnnComments -> HsWildCardBndrs GhcPs body # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsWildCardBndrs GhcPs body -> EP w m (HsWildCardBndrs GhcPs body) # |
Haskell Type
Constructors
Instances
DisambTD (HsType GhcPs) | |
Defined in GHC.Parser.PostProcess Methods mkHsAppTyHeadPV :: LHsType GhcPs -> PV (LocatedA (HsType GhcPs)) # mkHsAppTyPV :: LocatedA (HsType GhcPs) -> LHsType GhcPs -> PV (LocatedA (HsType GhcPs)) # mkHsAppKindTyPV :: LocatedA (HsType GhcPs) -> SrcSpan -> LHsType GhcPs -> PV (LocatedA (HsType GhcPs)) # mkHsOpTyPV :: LHsType GhcPs -> LocatedN RdrName -> LHsType GhcPs -> PV (LocatedA (HsType GhcPs)) # mkUnpackednessPV :: Located UnpackednessPragma -> LocatedA (HsType GhcPs) -> PV (LocatedA (HsType GhcPs)) # | |
ExactPrint (HsType GhcPs) | |
type Anno (BangType (GhcPass p)) | |
Defined in GHC.Hs.Type | |
type Anno (HsKind (GhcPass p)) | |
Defined in GHC.Hs.Type | |
type Anno (HsType (GhcPass p)) | |
Defined in GHC.Hs.Type | |
type Anno [LocatedA (HsType (GhcPass p))] | |
Defined in GHC.Hs.Type | |
type Anno (FamEqn p (LocatedA (HsType p))) | |
Defined in GHC.Hs.Decls |
data HsTyVarBndr flag pass #
Haskell Type Variable Binder
The flag annotates the binder. It is Specificity
in places where
explicit specificity is allowed (e.g. x :: forall {a} b. ...) or
()
in other places.
Constructors
UserTyVar (XUserTyVar pass) flag (LIdP pass) | |
KindedTyVar (XKindedTyVar pass) flag (LIdP pass) (LHsKind pass) | |
XTyVarBndr !(XXTyVarBndr pass) |
Instances
ExactPrintTVFlag flag => ExactPrint (HsTyVarBndr flag GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: HsTyVarBndr flag GhcPs -> Entry # setAnnotationAnchor :: HsTyVarBndr flag GhcPs -> Anchor -> EpAnnComments -> HsTyVarBndr flag GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsTyVarBndr flag GhcPs -> EP w m (HsTyVarBndr flag GhcPs) # | |
type Anno (HsTyVarBndr _flag (GhcPass _1)) | |
Defined in GHC.Hs.Type | |
type Anno (HsTyVarBndr _flag GhcPs) | |
Defined in GHC.Hs.Type | |
type Anno (HsTyVarBndr _flag GhcRn) | |
Defined in GHC.Hs.Type | |
type Anno (HsTyVarBndr _flag GhcTc) | |
Defined in GHC.Hs.Type |
Haskell Type Literal
Constructors
HsNumTy SourceText Integer | |
HsStrTy SourceText FastString | |
HsCharTy SourceText Char |
Instances
Data HsTyLit | |
Defined in Language.Haskell.Syntax.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsTyLit -> c HsTyLit # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsTyLit # toConstr :: HsTyLit -> Constr # dataTypeOf :: HsTyLit -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsTyLit) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsTyLit) # gmapT :: (forall b. Data b => b -> b) -> HsTyLit -> HsTyLit # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsTyLit -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsTyLit -> r # gmapQ :: (forall d. Data d => d -> u) -> HsTyLit -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsTyLit -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsTyLit -> m HsTyLit # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTyLit -> m HsTyLit # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTyLit -> m HsTyLit # | |
Outputable HsTyLit | |
Defined in Language.Haskell.Syntax.Type |
data HsTupleSort #
Haskell Tuple Sort
Constructors
HsUnboxedTuple | |
HsBoxedOrConstraintTuple |
Instances
Data HsTupleSort | |
Defined in Language.Haskell.Syntax.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsTupleSort -> c HsTupleSort # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsTupleSort # toConstr :: HsTupleSort -> Constr # dataTypeOf :: HsTupleSort -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsTupleSort) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsTupleSort) # gmapT :: (forall b. Data b => b -> b) -> HsTupleSort -> HsTupleSort # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsTupleSort -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsTupleSort -> r # gmapQ :: (forall d. Data d => d -> u) -> HsTupleSort -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsTupleSort -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsTupleSort -> m HsTupleSort # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupleSort -> m HsTupleSort # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupleSort -> m HsTupleSort # |
A type signature that obeys the forall
-or-nothing rule. In other
words, an LHsType
that uses an HsOuterSigTyVarBndrs
to represent its
outermost type variable quantification.
See Note [Representing type signatures]
.
Constructors
HsSig | |
XHsSigType !(XXHsSigType pass) |
Instances
ExactPrint (HsSigType GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint | |
type Anno (HsSigType (GhcPass p)) | |
Defined in GHC.Hs.Type |
This is used in the syntax. In constructor declaration. It must keep the arrow representation.
Instances
Outputable a => Outputable (HsScaled pass a) | |
Defined in Language.Haskell.Syntax.Type | |
ExactPrint a => ExactPrint (HsScaled GhcPs a) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint |
data HsPatSigType pass #
Types that can appear in pattern signatures, as well as the signatures for
term-level binders in RULES.
See Note [Pattern signature binders and scoping]
.
This is very similar to HsSigWcType
, but with
slightly different semantics: see Note [HsType binders]
.
See also Note [The wildcard story for types]
.
Constructors
HsPS | |
XHsPatSigType !(XXHsPatSigType pass) |
Instances
ExactPrint (HsPatSigType GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: HsPatSigType GhcPs -> Entry # setAnnotationAnchor :: HsPatSigType GhcPs -> Anchor -> EpAnnComments -> HsPatSigType GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsPatSigType GhcPs -> EP w m (HsPatSigType GhcPs) # |
The extension field for HsPatSigType
, which is only used in the
renamer onwards. See Note [Pattern signature binders and scoping]
.
Constructors
HsPSRn | |
Fields
|
Instances
Data HsPSRn | |
Defined in Language.Haskell.Syntax.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsPSRn -> c HsPSRn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsPSRn # toConstr :: HsPSRn -> Constr # dataTypeOf :: HsPSRn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsPSRn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsPSRn) # gmapT :: (forall b. Data b => b -> b) -> HsPSRn -> HsPSRn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsPSRn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsPSRn -> r # gmapQ :: (forall d. Data d => d -> u) -> HsPSRn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsPSRn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsPSRn -> m HsPSRn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsPSRn -> m HsPSRn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsPSRn -> m HsPSRn # |
data HsOuterTyVarBndrs flag pass #
The outermost type variables in a type that obeys the forall
-or-nothing
rule. See Note [forall-or-nothing rule]
.
Constructors
HsOuterImplicit | Implicit forall, e.g.,
|
Fields
| |
HsOuterExplicit | Explicit forall, e.g.,
|
Fields
| |
XHsOuterTyVarBndrs !(XXHsOuterTyVarBndrs pass) |
Instances
ExactPrintTVFlag flag => ExactPrint (HsOuterTyVarBndrs flag GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: HsOuterTyVarBndrs flag GhcPs -> Entry # setAnnotationAnchor :: HsOuterTyVarBndrs flag GhcPs -> Anchor -> EpAnnComments -> HsOuterTyVarBndrs flag GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsOuterTyVarBndrs flag GhcPs -> EP w m (HsOuterTyVarBndrs flag GhcPs) # | |
type Anno (HsOuterTyVarBndrs _1 (GhcPass _2)) | |
Defined in GHC.Hs.Type |
type HsOuterSigTyVarBndrs = HsOuterTyVarBndrs Specificity #
Used for signatures, e.g.,
f :: forall a {b}. blah
We use Specificity
for the HsOuterTyVarBndrs
flag
to allow
distinguishing between specified and inferred type variables.
type HsOuterFamEqnTyVarBndrs = HsOuterTyVarBndrs () #
Used for type-family instance equations, e.g.,
type instance forall a. F [a] = Tree a
The notion of specificity is irrelevant in type family equations, so we use
()
for the HsOuterTyVarBndrs
flag
.
These names are used early on to store the names of implicit parameters. They completely disappear after type-checking.
Constructors
HsIPName FastString |
Instances
Data HsIPName | |
Defined in Language.Haskell.Syntax.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsIPName -> c HsIPName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsIPName # toConstr :: HsIPName -> Constr # dataTypeOf :: HsIPName -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsIPName) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsIPName) # gmapT :: (forall b. Data b => b -> b) -> HsIPName -> HsIPName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsIPName -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsIPName -> r # gmapQ :: (forall d. Data d => d -> u) -> HsIPName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsIPName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsIPName -> m HsIPName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsIPName -> m HsIPName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsIPName -> m HsIPName # | |
Outputable HsIPName | |
Defined in Language.Haskell.Syntax.Type | |
OutputableBndr HsIPName | |
Defined in Language.Haskell.Syntax.Type Methods pprBndr :: BindingSite -> HsIPName -> SDoc # pprPrefixOcc :: HsIPName -> SDoc # pprInfixOcc :: HsIPName -> SDoc # bndrIsJoin_maybe :: HsIPName -> Maybe Int # | |
ExactPrint HsIPName | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint | |
Eq HsIPName | |
type Anno HsIPName | |
Defined in GHC.Hs.Type |
data HsForAllTelescope pass #
The type variable binders in an HsForAllTy
.
See also Note [Variable Specificity and Forall Visibility]
in
GHC.Tc.Gen.HsType.
Constructors
HsForAllVis | A visible |
Fields
| |
HsForAllInvis | An invisible |
Fields
| |
XHsForAllTelescope !(XXHsForAllTelescope pass) |
Instances
ExactPrint (HsForAllTelescope GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: HsForAllTelescope GhcPs -> Entry # setAnnotationAnchor :: HsForAllTelescope GhcPs -> Anchor -> EpAnnComments -> HsForAllTelescope GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsForAllTelescope GhcPs -> EP w m (HsForAllTelescope GhcPs) # |
data HsConDetails tyarg arg rec #
Describes the arguments to a data constructor. This is a common representation for several constructor-related concepts, including:
- The arguments in a Haskell98-style constructor declaration
(see
HsConDeclH98Details
in GHC.Hs.Decls). - The arguments in constructor patterns in
case
/function definitions (seeHsConPatDetails
in GHC.Hs.Pat). - The left-hand side arguments in a pattern synonym binding
(see
HsPatSynDetails
in GHC.Hs.Binds).
One notable exception is the arguments in a GADT constructor, which uses
a separate data type entirely (see HsConDeclGADTDetails
in
GHC.Hs.Decls). This is because GADT constructors cannot be declared with
infix syntax, unlike the concepts above (#18844).
Instances
(Data tyarg, Data arg, Data rec) => Data (HsConDetails tyarg arg rec) | |
Defined in Language.Haskell.Syntax.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsConDetails tyarg arg rec -> c (HsConDetails tyarg arg rec) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsConDetails tyarg arg rec) # toConstr :: HsConDetails tyarg arg rec -> Constr # dataTypeOf :: HsConDetails tyarg arg rec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsConDetails tyarg arg rec)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsConDetails tyarg arg rec)) # gmapT :: (forall b. Data b => b -> b) -> HsConDetails tyarg arg rec -> HsConDetails tyarg arg rec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsConDetails tyarg arg rec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsConDetails tyarg arg rec -> r # gmapQ :: (forall d. Data d => d -> u) -> HsConDetails tyarg arg rec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsConDetails tyarg arg rec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsConDetails tyarg arg rec -> m (HsConDetails tyarg arg rec) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsConDetails tyarg arg rec -> m (HsConDetails tyarg arg rec) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsConDetails tyarg arg rec -> m (HsConDetails tyarg arg rec) # | |
(Outputable tyarg, Outputable arg, Outputable rec) => Outputable (HsConDetails tyarg arg rec) | |
Defined in Language.Haskell.Syntax.Type Methods ppr :: HsConDetails tyarg arg rec -> SDoc # |
Denotes the type of arrows in the surface language
Constructors
HsUnrestrictedArrow IsUnicodeSyntax | a -> b or a → b |
HsLinearArrow IsUnicodeSyntax (Maybe AddEpAnn) | a %1 -> b or a %1 → b, or a ⊸ b |
HsExplicitMult IsUnicodeSyntax (Maybe AddEpAnn) (LHsType pass) | a %m -> b or a %m → b (very much including `a %Many -> b`!
This is how the programmer wrote it). It is stored as an
|
Instances
(Outputable tm, Outputable ty) => Outputable (HsArg tm ty) | |
Defined in Language.Haskell.Syntax.Type | |
(ExactPrint tm, ExactPrint ty, Outputable tm, Outputable ty) => ExactPrint (HsArg tm ty) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint |
Field Occurrence
Represents an *occurrence* of an unambiguous field. This may or may not be a
binding occurrence (e.g. this type is used in ConDeclField
and
RecordPatSynField
which bind their fields, but also in HsRecField
for
record construction and patterns, which do not).
We store both the RdrName
the user originally wrote, and after the renamer,
the selector function.
Constructors
FieldOcc | |
Fields
| |
XFieldOcc !(XXFieldOcc pass) |
Instances
data ConDeclField pass #
Constructor Declaration Field
Constructors
ConDeclField | |
Fields
| |
XConDeclField !(XXConDeclField pass) |
Instances
ExactPrint (LocatedL [LocatedA (ConDeclField GhcPs)]) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: LocatedL [LocatedA (ConDeclField GhcPs)] -> Entry # setAnnotationAnchor :: LocatedL [LocatedA (ConDeclField GhcPs)] -> Anchor -> EpAnnComments -> LocatedL [LocatedA (ConDeclField GhcPs)] # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => LocatedL [LocatedA (ConDeclField GhcPs)] -> EP w m (LocatedL [LocatedA (ConDeclField GhcPs)]) # | |
ExactPrint (ConDeclField GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: ConDeclField GhcPs -> Entry # setAnnotationAnchor :: ConDeclField GhcPs -> Anchor -> EpAnnComments -> ConDeclField GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => ConDeclField GhcPs -> EP w m (ConDeclField GhcPs) # | |
type Anno (ConDeclField (GhcPass p)) | |
Defined in GHC.Hs.Type | |
type Anno [LocatedA (ConDeclField (GhcPass _1))] | |
Defined in GHC.Hs.Decls |
data AmbiguousFieldOcc pass #
Ambiguous Field Occurrence
Represents an *occurrence* of a field that is potentially
ambiguous after the renamer, with the ambiguity resolved by the
typechecker. We always store the RdrName
that the user
originally wrote, and store the selector function after the renamer
(for unambiguous occurrences) or the typechecker (for ambiguous
occurrences).
See Note [HsRecField and HsRecUpdField] in GHC.Hs.Pat and Note [Disambiguating record fields] in GHC.Tc.Gen.Head. See Note [Located RdrNames] in GHC.Hs.Expr
Constructors
Unambiguous (XUnambiguous pass) (LocatedN RdrName) | |
Ambiguous (XAmbiguous pass) (LocatedN RdrName) | |
XAmbiguousFieldOcc !(XXAmbiguousFieldOcc pass) |
Instances
numVisibleArgs :: [HsArg tm ty] -> Arity #
noTypeArgs :: [Void] #
An empty list that can be used to indicate that there are no type arguments allowed in cases where HsConDetails is applied to Void.
mapHsOuterImplicit :: (XHsOuterImplicit pass -> XHsOuterImplicit pass) -> HsOuterTyVarBndrs flag pass -> HsOuterTyVarBndrs flag pass #
isHsKindedTyVar :: HsTyVarBndr flag pass -> Bool #
Does this HsTyVarBndr
come with an explicit kind annotation?
hsUnrestricted :: a -> HsScaled pass a #
When creating syntax we use the shorthands. It's better for printing, also, the shorthands work trivially at each pass.
hsScaledThing :: HsScaled pass a -> a #
hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr () pass] #
hsPatSigType :: HsPatSigType pass -> LHsType pass #
hsLinear :: a -> HsScaled pass a #
When creating syntax we use the shorthands. It's better for printing, also, the shorthands work trivially at each pass.
hsIPNameFS :: HsIPName -> FastString #
pat_con_ext :: Pat p -> XConPat p #
pat_args :: Pat p -> HsConPatDetails p #
pattern WildPat :: XWildPat p -> Pat p #
Wildcard Pattern The sole reason for a type on a WildPat is to support hsPatType :: Pat Id -> Type
pattern TuplePat :: XTuplePat p -> [LPat p] -> Boxity -> Pat p #
Tuple sub-patterns
AnnKeywordId
:AnnOpen
'('
or'(#'
,AnnClose
')'
or'#)'
pattern SumPat :: XSumPat p -> LPat p -> ConTag -> Arity -> Pat p #
Anonymous sum pattern
AnnKeywordId
:AnnOpen
'(#'
,AnnClose
'#)'
Arguments
:: XSplicePat p | |
-> HsSplice p | Splice Pattern (Includes quasi-quotes) |
-> Pat p |
AnnKeywordId
:AnnOpen
'$('
AnnClose
')'
Arguments
:: XSigPat p | |
-> LPat p | |
-> HsPatSigType (NoGhcTc p) | Pattern with a type signature |
-> Pat p |
pattern ParPat :: XParPat p -> LPat p -> Pat p #
Parenthesised pattern
See Note [Parens in HsSyn] in GHC.Hs.Expr
^ - AnnKeywordId
: AnnOpen
'('
,
AnnClose
')'
pattern NPlusKPat :: XNPlusKPat p -> LIdP p -> XRec p (HsOverLit p) -> HsOverLit p -> SyntaxExpr p -> SyntaxExpr p -> Pat p #
n+k pattern
pattern NPat :: XNPat p -> XRec p (HsOverLit p) -> Maybe (SyntaxExpr p) -> SyntaxExpr p -> Pat p #
Natural Pattern
pattern LitPat :: XLitPat p -> HsLit p -> Pat p #
Literal Pattern Used for *non-overloaded* literal patterns: Int#, Char#, Int, Char, String, etc.
pattern ListPat :: XListPat p -> [LPat p] -> Pat p #
Syntactic List
AnnKeywordId
:AnnOpen
'['
,AnnClose
']'
pattern ConPat :: XConPat p -> XRec p (ConLikeP p) -> HsConPatDetails p -> Pat p #
Constructor Pattern
data OverLitVal #
Overloaded Literal Value
Constructors
HsIntegral !IntegralLit | Integer-looking literals; |
HsFractional !FractionalLit | Frac-looking literals |
HsIsString !SourceText !FastString | String-looking literals |
Instances
Data OverLitVal | |
Defined in Language.Haskell.Syntax.Lit Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OverLitVal -> c OverLitVal # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OverLitVal # toConstr :: OverLitVal -> Constr # dataTypeOf :: OverLitVal -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OverLitVal) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OverLitVal) # gmapT :: (forall b. Data b => b -> b) -> OverLitVal -> OverLitVal # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OverLitVal -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OverLitVal -> r # gmapQ :: (forall d. Data d => d -> u) -> OverLitVal -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OverLitVal -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal # | |
Outputable OverLitVal | |
Defined in Language.Haskell.Syntax.Lit Methods ppr :: OverLitVal -> SDoc # | |
Eq OverLitVal | |
Defined in Language.Haskell.Syntax.Lit | |
Ord OverLitVal | |
Defined in Language.Haskell.Syntax.Lit Methods compare :: OverLitVal -> OverLitVal -> Ordering # (<) :: OverLitVal -> OverLitVal -> Bool # (<=) :: OverLitVal -> OverLitVal -> Bool # (>) :: OverLitVal -> OverLitVal -> Bool # (>=) :: OverLitVal -> OverLitVal -> Bool # max :: OverLitVal -> OverLitVal -> OverLitVal # min :: OverLitVal -> OverLitVal -> OverLitVal # |
Haskell Overloaded Literal
Constructors
OverLit | |
Fields
| |
XOverLit !(XXOverLit p) |
Instances
ExactPrint (HsOverLit GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint | |
Eq (XXOverLit p) => Eq (HsOverLit p) | |
Ord (XXOverLit p) => Ord (HsOverLit p) | |
Defined in Language.Haskell.Syntax.Lit | |
type Anno (HsOverLit (GhcPass p)) | |
Defined in GHC.Hs.Pat |
Haskell Literal
Constructors
HsChar (XHsChar x) Char | Character |
HsCharPrim (XHsCharPrim x) Char | Unboxed character |
HsString (XHsString x) FastString | String |
HsStringPrim (XHsStringPrim x) !ByteString | Packed bytes |
HsInt (XHsInt x) IntegralLit | Genuinely an Int; arises from GHC.Tc.Deriv.Generate, and from TRANSLATION |
HsIntPrim (XHsIntPrim x) Integer | literal |
HsWordPrim (XHsWordPrim x) Integer | literal |
HsInt64Prim (XHsInt64Prim x) Integer | literal |
HsWord64Prim (XHsWord64Prim x) Integer | literal |
HsInteger (XHsInteger x) Integer Type | Genuinely an integer; arises only from TRANSLATION (overloaded literals are done with HsOverLit) |
HsRat (XHsRat x) FractionalLit Type | Genuinely a rational; arises only from TRANSLATION (overloaded literals are done with HsOverLit) |
HsFloatPrim (XHsFloatPrim x) FractionalLit | Unboxed Float |
HsDoublePrim (XHsDoublePrim x) FractionalLit | Unboxed Double |
XLit !(XXLit x) |
hsOverLitNeedsParens :: PprPrec -> HsOverLit x -> Bool #
returns hsOverLitNeedsParens
p olTrue
if an overloaded literal
ol
needs to be parenthesized under precedence p
.
hsLitNeedsParens :: PprPrec -> HsLit x -> Bool #
returns hsLitNeedsParens
p lTrue
if a literal l
needs
to be parenthesized under precedence p
.
type LImportDecl pass #
Arguments
= XRec pass (ImportDecl pass) | When in a list this may have |
Located Import Declaration
type LIEWrappedName name = LocatedA (IEWrappedName name) #
Located name with possible adornment
- AnnKeywordId
s : AnnType
,
AnnPattern
data ImportDeclQualifiedStyle #
If/how an import is qualified
.
Constructors
QualifiedPre |
|
QualifiedPost |
|
NotQualified | Not qualified. |
Instances
data ImportDecl pass #
Import Declaration
A single Haskell import
declaration.
Constructors
ImportDecl | |
Fields
| |
XImportDecl !(XXImportDecl pass) |
Instances
(OutputableBndrId p, Outputable (Anno (IE (GhcPass p)))) => Outputable (ImportDecl (GhcPass p)) | |
Defined in GHC.Hs.ImpExp Methods ppr :: ImportDecl (GhcPass p) -> SDoc # | |
ExactPrint (ImportDecl GhcPs) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: ImportDecl GhcPs -> Entry # setAnnotationAnchor :: ImportDecl GhcPs -> Anchor -> EpAnnComments -> ImportDecl GhcPs # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => ImportDecl GhcPs -> EP w m (ImportDecl GhcPs) # | |
type Anno (ImportDecl (GhcPass p)) | |
Defined in GHC.Hs.ImpExp |
data IEWrappedName name #
A name in an import or export specification which may have
adornments. Used primarily for accurate pretty printing of
ParsedSource, and API Annotation placement. The
Annotation
is the location of the adornment in
the original source.
Constructors
IEName (LocatedN name) | no extra |
IEPattern EpaLocation (LocatedN name) | pattern X |
IEType EpaLocation (LocatedN name) | type (:+:) |
Instances
Data name => Data (IEWrappedName name) | |
Defined in GHC.Hs.ImpExp Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IEWrappedName name -> c (IEWrappedName name) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IEWrappedName name) # toConstr :: IEWrappedName name -> Constr # dataTypeOf :: IEWrappedName name -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IEWrappedName name)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IEWrappedName name)) # gmapT :: (forall b. Data b => b -> b) -> IEWrappedName name -> IEWrappedName name # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IEWrappedName name -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IEWrappedName name -> r # gmapQ :: (forall d. Data d => d -> u) -> IEWrappedName name -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IEWrappedName name -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IEWrappedName name -> m (IEWrappedName name) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IEWrappedName name -> m (IEWrappedName name) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IEWrappedName name -> m (IEWrappedName name) # | |
HasOccName name => HasOccName (IEWrappedName name) | |
Defined in GHC.Hs.ImpExp Methods occName :: IEWrappedName name -> OccName # | |
OutputableBndr name => Outputable (IEWrappedName name) | |
Defined in GHC.Hs.ImpExp Methods ppr :: IEWrappedName name -> SDoc # | |
OutputableBndr name => OutputableBndr (IEWrappedName name) | |
Defined in GHC.Hs.ImpExp Methods pprBndr :: BindingSite -> IEWrappedName name -> SDoc # pprPrefixOcc :: IEWrappedName name -> SDoc # pprInfixOcc :: IEWrappedName name -> SDoc # bndrIsJoin_maybe :: IEWrappedName name -> Maybe Int # | |
ExactPrint (IEWrappedName RdrName) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: IEWrappedName RdrName -> Entry # setAnnotationAnchor :: IEWrappedName RdrName -> Anchor -> EpAnnComments -> IEWrappedName RdrName # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => IEWrappedName RdrName -> EP w m (IEWrappedName RdrName) # | |
Eq name => Eq (IEWrappedName name) | |
Defined in GHC.Hs.ImpExp Methods (==) :: IEWrappedName name -> IEWrappedName name -> Bool # (/=) :: IEWrappedName name -> IEWrappedName name -> Bool # |
data IEWildcard #
Imported or Exported Wildcard
Constructors
NoIEWildcard | |
IEWildcard Int |
Instances
Data IEWildcard | |
Defined in GHC.Hs.ImpExp Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IEWildcard -> c IEWildcard # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IEWildcard # toConstr :: IEWildcard -> Constr # dataTypeOf :: IEWildcard -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IEWildcard) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IEWildcard) # gmapT :: (forall b. Data b => b -> b) -> IEWildcard -> IEWildcard # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IEWildcard -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IEWildcard -> r # gmapQ :: (forall d. Data d => d -> u) -> IEWildcard -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IEWildcard -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IEWildcard -> m IEWildcard # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IEWildcard -> m IEWildcard # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IEWildcard -> m IEWildcard # | |
Eq IEWildcard | |
Defined in GHC.Hs.ImpExp |
Imported or exported entity.
Constructors
IEVar (XIEVar pass) (LIEWrappedName (IdP pass)) | Imported or Exported Variable |
IEThingAbs (XIEThingAbs pass) (LIEWrappedName (IdP pass)) | Imported or exported Thing with Absent list The thing is a Class/Type (can't tell)
- |
IEThingAll (XIEThingAll pass) (LIEWrappedName (IdP pass)) | Imported or exported Thing with All imported or exported The thing is a ClassType and the All refers to methodsconstructors |
IEThingWith (XIEThingWith pass) (LIEWrappedName (IdP pass)) IEWildcard [LIEWrappedName (IdP pass)] | Imported or exported Thing With given imported or exported The thing is a Class/Type and the imported or exported things are
methods/constructors and record fields; see Note [IEThingWith]
- |
IEModuleContents (XIEModuleContents pass) (XRec pass ModuleName) | Imported or exported module contents (Export Only) |
IEGroup (XIEGroup pass) Int HsDocString | Doc section heading |
IEDoc (XIEDoc pass) HsDocString | Some documentation |
IEDocNamed (XIEDocNamed pass) String | Reference to named doc |
XIE !(XXIE pass) |
Instances
OutputableBndrId p => Outputable (IE (GhcPass p)) | |
ExactPrint (IE GhcPs) | |
ExactPrint (LocatedL [LocatedA (IE GhcPs)]) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: LocatedL [LocatedA (IE GhcPs)] -> Entry # setAnnotationAnchor :: LocatedL [LocatedA (IE GhcPs)] -> Anchor -> EpAnnComments -> LocatedL [LocatedA (IE GhcPs)] # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => LocatedL [LocatedA (IE GhcPs)] -> EP w m (LocatedL [LocatedA (IE GhcPs)]) # | |
type Anno (IE (GhcPass p)) | |
Defined in GHC.Hs.ImpExp | |
type Anno (LocatedA (IE (GhcPass p))) | |
Defined in GHC.Hs.ImpExp | |
type Anno [LocatedA (IE (GhcPass p))] | |
Defined in GHC.Hs.ImpExp |
data EpAnnImportDecl #
Constructors
EpAnnImportDecl | |
Instances
Data EpAnnImportDecl | |
Defined in GHC.Hs.ImpExp Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EpAnnImportDecl -> c EpAnnImportDecl # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EpAnnImportDecl # toConstr :: EpAnnImportDecl -> Constr # dataTypeOf :: EpAnnImportDecl -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EpAnnImportDecl) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EpAnnImportDecl) # gmapT :: (forall b. Data b => b -> b) -> EpAnnImportDecl -> EpAnnImportDecl # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EpAnnImportDecl -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EpAnnImportDecl -> r # gmapQ :: (forall d. Data d => d -> u) -> EpAnnImportDecl -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EpAnnImportDecl -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EpAnnImportDecl -> m EpAnnImportDecl # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EpAnnImportDecl -> m EpAnnImportDecl # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EpAnnImportDecl -> m EpAnnImportDecl # |
replaceWrappedName :: IEWrappedName name1 -> name2 -> IEWrappedName name2 #
replaceLWrappedName :: LIEWrappedName name1 -> name2 -> LIEWrappedName name2 #
pprImpExp :: (HasOccName name, OutputableBndr name) => name -> SDoc #
lieWrappedName :: LIEWrappedName name -> name #
isImportDeclQualified :: ImportDeclQualifiedStyle -> Bool #
Convenience function to answer the question if an import decl. is qualified.
importDeclQualifiedStyle :: Maybe EpaLocation -> Maybe EpaLocation -> (Maybe EpaLocation, ImportDeclQualifiedStyle) #
Given two possible located qualified
tokens, compute a style
(in a conforming Haskell program only one of the two can be not
Nothing
). This is called from GHC.Parser.
ieWrappedName :: IEWrappedName name -> name #
ieWrappedLName :: IEWrappedName name -> LocatedN name #
ieLWrappedName :: LIEWrappedName name -> LocatedN name #
Constructors
Parsed | |
Renamed | |
Typechecked |
Instances
Data Pass | |
Defined in GHC.Hs.Extension Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pass -> c Pass # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Pass # dataTypeOf :: Pass -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Pass) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Pass) # gmapT :: (forall b. Data b => b -> b) -> Pass -> Pass # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pass -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pass -> r # gmapQ :: (forall d. Data d => d -> u) -> Pass -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Pass -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pass -> m Pass # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pass -> m Pass # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pass -> m Pass # |
type OutputableBndrId (pass :: Pass) = (OutputableBndr (IdGhcP pass), OutputableBndr (IdGhcP (NoGhcTcPass pass)), Outputable (GenLocated (Anno (IdGhcP pass)) (IdGhcP pass)), Outputable (GenLocated (Anno (IdGhcP (NoGhcTcPass pass))) (IdGhcP (NoGhcTcPass pass))), IsPass pass) #
Constraint type to bundle up the requirement for OutputableBndr
on both
the id
and the NoGhcTc
of it. See Note [NoGhcTc].
type family NoGhcTcPass (p :: Pass) :: Pass where ... #
Equations
NoGhcTcPass 'Typechecked = 'Renamed | |
NoGhcTcPass other = other |
type IsSrcSpanAnn (p :: Pass) a = (Anno (IdGhcP p) ~ SrcSpanAnn' (EpAnn a), IsPass p) #
class (NoGhcTcPass (NoGhcTcPass p) ~ NoGhcTcPass p, IsPass (NoGhcTcPass p)) => IsPass (p :: Pass) where #
Allows us to check what phase we're in at GHC's runtime. For example, this class allows us to write > f :: forall p. IsPass p => HsExpr (GhcPass p) -> blah > f e = case ghcPass @p of > GhcPs -> ... in this RHS we have HsExpr GhcPs... > GhcRn -> ... in this RHS we have HsExpr GhcRn... > GhcTc -> ... in this RHS we have HsExpr GhcTc... which is very useful, for example, when pretty-printing. See Note [IsPass].
Instances
IsPass 'Parsed | |
Defined in GHC.Hs.Extension | |
IsPass 'Renamed | |
Defined in GHC.Hs.Extension | |
IsPass 'Typechecked | |
Defined in GHC.Hs.Extension Methods ghcPass :: GhcPass 'Typechecked # |
type GhcTc = GhcPass 'Typechecked #
data GhcPass (c :: Pass) where #
Used as a data type index for the hsSyn AST; also serves as a singleton type for Pass
Instances
type family SyntaxExpr p #
Syntax Expression
SyntaxExpr is represents the function used in interpreting rebindable
syntax. In the parser, we have no information to supply; in the renamer,
we have the name of the function (but see
Note [Monad fail : Rebindable syntax, overloaded strings] for a wrinkle)
and in the type-checker we have a more elaborate structure SyntaxExprTc
.
In some contexts, rebindable syntax is not implemented, and so we have constructors to represent that possibility in both the renamer and typechecker instantiations.
E.g. (>>=)
is filled in before the renamer by the appropriate Name
for
(>>=)
, and then instantiated by the type checker with its type args
etc
Instances
type SyntaxExpr (GhcPass p) | |
Defined in GHC.Hs.Expr |
data MatchGroup p body #
Constructors
MG | |
XMatchGroup !(XXMatchGroup p body) |
Instances
ExactPrint (MatchGroup GhcPs (LocatedA (HsCmd GhcPs))) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> Entry # setAnnotationAnchor :: MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> Anchor -> EpAnnComments -> MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => MatchGroup GhcPs (LocatedA (HsCmd GhcPs)) -> EP w m (MatchGroup GhcPs (LocatedA (HsCmd GhcPs))) # | |
ExactPrint (MatchGroup GhcPs (LocatedA (HsExpr GhcPs))) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> Entry # setAnnotationAnchor :: MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> Anchor -> EpAnnComments -> MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => MatchGroup GhcPs (LocatedA (HsExpr GhcPs)) -> EP w m (MatchGroup GhcPs (LocatedA (HsExpr GhcPs))) # |
Arguments
= XRec p (HsExpr p) | May have |
Located Haskell Expression
Haskell Splice
Constructors
HsTypedSplice (XTypedSplice id) SpliceDecoration (IdP id) (LHsExpr id) | |
HsUntypedSplice (XUntypedSplice id) SpliceDecoration (IdP id) (LHsExpr id) | |
HsQuasiQuote (XQuasiQuote id) (IdP id) (IdP id) SrcSpan FastString | |
HsSpliced (XSpliced id) ThModFinalizers (HsSplicedThing id) | |
XSplice !(XXSplice id) |
Instances
ExactPrint (HsSplice GhcPs) | |
type Anno (HsSplice (GhcPass p)) | |
Defined in GHC.Hs.Expr |
A Haskell expression.
Constructors
HsVar (XVar p) (LIdP p) | Variable See Note [Located RdrNames] |
HsUnboundVar (XUnboundVar p) OccName | Unbound variable; also used for "holes" (_ or _x). Turned from HsVar to HsUnboundVar by the renamer, when it finds an out-of-scope variable or hole. The (XUnboundVar p) field becomes an HoleExprRef after typechecking; this is where the erroring expression will be written after solving. See Note [Holes] in GHC.Tc.Types.Constraint. |
HsConLikeOut (XConLikeOut p) ConLike | After typechecker only; must be different HsVar for pretty printing |
HsRecFld (XRecFld p) (AmbiguousFieldOcc p) | Variable pointing to record selector The parser produces HsVars The renamer renames record-field selectors to HsRecFld The typechecker preserves HsRecFld |
HsOverLabel (XOverLabel p) FastString | Overloaded label (Note [Overloaded labels] in GHC.OverloadedLabels) |
HsIPVar (XIPVar p) HsIPName | Implicit parameter (not in use after typechecking) |
HsOverLit (XOverLitE p) (HsOverLit p) | Overloaded literals |
HsLit (XLitE p) (HsLit p) | Simple (non-overloaded) literals |
HsLam (XLam p) (MatchGroup p (LHsExpr p)) | Lambda abstraction. Currently always a single match |
HsLamCase (XLamCase p) (MatchGroup p (LHsExpr p)) | Lambda-case |
HsApp (XApp p) (LHsExpr p) (LHsExpr p) | Application |
HsAppType (XAppTypeE p) (LHsExpr p) (LHsWcType (NoGhcTc p)) | Visible type application Explicit type argument; e.g f @Int x y NB: Has wildcards, but no implicit quantification |
OpApp (XOpApp p) (LHsExpr p) (LHsExpr p) (LHsExpr p) | Operator applications: NB Bracketed ops such as (+) come out as Vars. |
NegApp (XNegApp p) (LHsExpr p) (SyntaxExpr p) | Negation operator. Contains the negated expression and the name
of |
HsPar |
|
SectionL (XSectionL p) (LHsExpr p) (LHsExpr p) | |
SectionR (XSectionR p) (LHsExpr p) (LHsExpr p) | |
ExplicitTuple (XExplicitTuple p) [HsTupArg p] Boxity | Used for explicit tuples and sections thereof |
ExplicitSum (XExplicitSum p) ConTag Arity (LHsExpr p) | Used for unboxed sum types
There will be multiple |
HsCase (XCase p) (LHsExpr p) (MatchGroup p (LHsExpr p)) |
|
HsIf (XIf p) (LHsExpr p) (LHsExpr p) (LHsExpr p) | |
HsMultiIf (XMultiIf p) [LGRHS p (LHsExpr p)] | Multi-way if |
HsLet (XLet p) (HsLocalBinds p) (LHsExpr p) | let(rec)
|
HsDo (XDo p) (HsStmtContext (HsDoRn p)) (XRec p [ExprLStmt p]) | |
ExplicitList (XExplicitList p) [LHsExpr p] | Syntactic list: [a,b,c,...]
|
RecordCon | Record construction
|
Fields
| |
RecordUpd | Record update |
Fields
| |
HsGetField | Record field selection e.g This case only arises when the OverloadedRecordDot langauge extension is enabled. |
HsProjection | Record field selector. e.g. This case only arises when the OverloadedRecordDot langauge extensions is enabled. |
Fields
| |
ExprWithTySig (XExprWithTySig p) (LHsExpr p) (LHsSigWcType (NoGhcTc p)) | Expression with an explicit type signature. |
ArithSeq (XArithSeq p) (Maybe (SyntaxExpr p)) (ArithSeqInfo p) | Arithmetic sequence
|
HsBracket (XBracket p) (HsBracket p) | |
HsRnBracketOut (XRnBracketOut p) (HsBracket (HsBracketRn p)) [PendingRnSplice' p] | |
HsTcBracketOut (XTcBracketOut p) (Maybe QuoteWrapper) (HsBracket (HsBracketRn p)) [PendingTcSplice' p] | |
HsSpliceE (XSpliceE p) (HsSplice p) | |
HsProc (XProc p) (LPat p) (LHsCmdTop p) |
|
HsStatic (XStatic p) (LHsExpr p) | |
HsTick (XTick p) CoreTickish (LHsExpr p) | |
HsBinTick (XBinTick p) Int Int (LHsExpr p) | |
HsPragE (XPragE p) (HsPragE p) (LHsExpr p) | |
XExpr !(XXExpr p) |
Instances
Guarded Right-Hand Sides
GRHSs are used both for pattern bindings and for Matches
Constructors
GRHSs | |
Fields
| |
XGRHSs !(XXGRHSs p body) |
Instances
ExactPrint (GRHSs GhcPs (LocatedA (HsCmd GhcPs))) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: GRHSs GhcPs (LocatedA (HsCmd GhcPs)) -> Entry # setAnnotationAnchor :: GRHSs GhcPs (LocatedA (HsCmd GhcPs)) -> Anchor -> EpAnnComments -> GRHSs GhcPs (LocatedA (HsCmd GhcPs)) # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => GRHSs GhcPs (LocatedA (HsCmd GhcPs)) -> EP w m (GRHSs GhcPs (LocatedA (HsCmd GhcPs))) # | |
ExactPrint (GRHSs GhcPs (LocatedA (HsExpr GhcPs))) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: GRHSs GhcPs (LocatedA (HsExpr GhcPs)) -> Entry # setAnnotationAnchor :: GRHSs GhcPs (LocatedA (HsExpr GhcPs)) -> Anchor -> EpAnnComments -> GRHSs GhcPs (LocatedA (HsExpr GhcPs)) # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => GRHSs GhcPs (LocatedA (HsExpr GhcPs)) -> EP w m (GRHSs GhcPs (LocatedA (HsExpr GhcPs))) # |
type family XXWarnDecls x #
Instances
type XXWarnDecls (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXWarnDecl x #
Instances
type XXWarnDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXValBindsLR x x' #
Instances
type XXValBindsLR (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
type family XXTyVarBndr x #
Instances
type XXTyVarBndr (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXTyFamInstDecl x #
Instances
type XXTyFamInstDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXTyClGroup x #
Instances
type XXTyClGroup (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXTyClDecl x #
Instances
type XXTyClDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXStandaloneKindSig x #
Instances
type XXStandaloneKindSig (GhcPass p) | |
Defined in GHC.Hs.Decls |
type family XXSpliceDecl x #
Instances
type XXSpliceDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XXSplice GhcPs | |
Defined in GHC.Hs.Expr | |
type XXSplice GhcRn | |
Defined in GHC.Hs.Expr | |
type XXSplice GhcTc | |
Defined in GHC.Hs.Expr |
type family XXRuleDecls x #
Instances
type XXRuleDecls (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXRuleDecl x #
Instances
type XXRuleDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXRuleBndr x #
Instances
type XXRuleBndr (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXRoleAnnotDecl x #
Instances
type XXRoleAnnotDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXPatSynBind x x' #
Instances
type XXPatSynBind (GhcPass idL) (GhcPass idR) | |
Defined in GHC.Hs.Binds |
type family XXParStmtBlock x x' #
Instances
type XXParStmtBlock (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Expr |
type family XXMatchGroup x b #
Instances
type XXMatchGroup (GhcPass _1) b | |
Defined in GHC.Hs.Expr |
type family XXLHsQTyVars x #
Instances
type XXLHsQTyVars (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXInstDecl x #
Instances
type XXInstDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXInjectivityAnn x #
Instances
type XXInjectivityAnn (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXImportDecl x #
Instances
type XXImportDecl (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
type family XXHsWildCardBndrs x b #
Instances
type XXHsWildCardBndrs (GhcPass _1) _2 | |
Defined in GHC.Hs.Type |
type family XXHsSigType x #
Instances
type XXHsSigType (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXHsPatSigType x #
Instances
type XXHsPatSigType (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXHsOuterTyVarBndrs x #
Instances
type XXHsOuterTyVarBndrs (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXHsLocalBindsLR x x' #
Instances
type XXHsLocalBindsLR (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
type family XXHsIPBinds x #
Instances
type XXHsIPBinds (GhcPass p) | |
Defined in GHC.Hs.Binds |
type family XXHsForAllTelescope x #
Instances
type XXHsForAllTelescope (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXHsFieldLabel x #
Instances
type XXHsFieldLabel (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XXHsDerivingClause x #
Instances
type XXHsDerivingClause (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXHsDataDefn x #
Instances
type XXHsDataDefn (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXHsBindsLR x x' #
Instances
type XXHsBindsLR (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
type family XXForeignDecl x #
Instances
type XXForeignDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXFixitySig x #
Instances
type XXFixitySig (GhcPass p) | |
Defined in GHC.Hs.Binds |
type family XXFieldOcc x #
Instances
type XXFieldOcc (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXFamilyResultSig x #
Instances
type XXFamilyResultSig (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXFamilyDecl x #
Instances
type XXFamilyDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XXExpr GhcPs | |
Defined in GHC.Hs.Expr | |
type XXExpr GhcRn | |
Defined in GHC.Hs.Expr | |
type XXExpr GhcTc | |
Defined in GHC.Hs.Expr |
type family XXDerivDecl x #
Instances
type XXDerivDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXDerivClauseTys x #
Instances
type XXDerivClauseTys (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXDefaultDecl x #
Instances
type XXDefaultDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXConDeclField x #
Instances
type XXConDeclField (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXClsInstDecl x #
Instances
type XXClsInstDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XXApplicativeArg x #
Instances
type XXApplicativeArg (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XXAmbiguousFieldOcc x #
Instances
type XXAmbiguousFieldOcc (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XXABExport x #
Instances
type XXABExport (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XWildPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XWildPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XWildPat GhcTc | |
Defined in GHC.Hs.Pat |
type family XWildCardTy x #
Instances
type XWildCardTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XWarnings GhcPs | |
Defined in GHC.Hs.Decls | |
type XWarnings GhcRn | |
Defined in GHC.Hs.Decls | |
type XWarnings GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XWarningD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XViewPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XViewPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XViewPat GhcTc | |
Defined in GHC.Hs.Pat |
type family XViaStrategy x #
Instances
type XViaStrategy GhcPs | |
Defined in GHC.Hs.Decls | |
type XViaStrategy GhcRn | |
Defined in GHC.Hs.Decls | |
type XViaStrategy GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XVarPat (GhcPass _1) | |
Defined in GHC.Hs.Pat |
Instances
type XVarBr (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XVarBind (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
Instances
type XVar (GhcPass _1) | |
Defined in GHC.Hs.Expr | |
type XVar (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XValD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XValBinds (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
type family XUserTyVar x #
Instances
type XUserTyVar (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XUntypedSplice x #
Instances
type XUntypedSplice (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XUnboundVar x #
Instances
type XUnboundVar GhcPs | |
Defined in GHC.Hs.Expr | |
type XUnboundVar GhcRn | |
Defined in GHC.Hs.Expr | |
type XUnboundVar GhcTc | |
Defined in GHC.Hs.Expr |
type family XUnambiguous x #
Instances
type XUnambiguous GhcPs | |
Defined in GHC.Hs.Type | |
type XUnambiguous GhcRn | |
Defined in GHC.Hs.Type | |
type XUnambiguous GhcTc | |
Defined in GHC.Hs.Type |
type family XTypedSplice x #
Instances
type XTypedSplice (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XTypBr (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XTyVarSig (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XTyLit (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XTyFamInstD x #
Instances
type XTyFamInstD GhcPs | |
Defined in GHC.Hs.Decls | |
type XTyFamInstD GhcRn | |
Defined in GHC.Hs.Decls | |
type XTyFamInstD GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XTyClD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XTuplePat GhcPs | |
Defined in GHC.Hs.Pat | |
type XTuplePat GhcRn | |
Defined in GHC.Hs.Pat | |
type XTuplePat GhcTc | |
Defined in GHC.Hs.Pat |
type family XTransStmt x x' b #
Instances
type XTransStmt (GhcPass _1) GhcPs b | |
Defined in GHC.Hs.Expr | |
type XTransStmt (GhcPass _1) GhcRn b | |
Defined in GHC.Hs.Expr | |
type XTransStmt (GhcPass _1) GhcTc b | |
Defined in GHC.Hs.Expr |
Instances
type XTick (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XTcBracketOut x #
Instances
type XTcBracketOut (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XTExpBr (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XSumPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XSumPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XSumPat GhcTc | |
Defined in GHC.Hs.Pat |
type family XStockStrategy x #
Instances
type XStockStrategy GhcPs | |
Defined in GHC.Hs.Decls | |
type XStockStrategy GhcRn | |
Defined in GHC.Hs.Decls | |
type XStockStrategy GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XStarTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XStandaloneKindSig x #
Instances
type XStandaloneKindSig GhcPs | |
Defined in GHC.Hs.Decls | |
type XStandaloneKindSig GhcRn | |
Defined in GHC.Hs.Decls | |
type XStandaloneKindSig GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XSpliced (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XSpliceTy GhcPs | |
Defined in GHC.Hs.Type | |
type XSpliceTy GhcRn | |
Defined in GHC.Hs.Type | |
type XSpliceTy GhcTc | |
Defined in GHC.Hs.Type |
type family XSplicePat x #
Instances
type XSplicePat (GhcPass _1) | |
Defined in GHC.Hs.Pat |
type family XSpliceDecl x #
Instances
type XSpliceDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XSpliceD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XSpecInstSig x #
Instances
type XSpecInstSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XSigPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XSigPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XSigPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XSigD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XSCCFunSig x #
Instances
type XSCCFunSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XRuleD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XRuleBndrSig x #
Instances
type XRuleBndrSig (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XRoleAnnotD x #
Instances
type XRoleAnnotD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XRnBracketOut x #
Instances
type XRnBracketOut (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XRecordUpd x #
Instances
type XRecordUpd GhcPs | |
Defined in GHC.Hs.Expr | |
type XRecordUpd GhcRn | |
Defined in GHC.Hs.Expr | |
type XRecordUpd GhcTc | |
Defined in GHC.Hs.Expr |
type family XRecordCon x #
Instances
type XRecordCon GhcPs | |
Defined in GHC.Hs.Expr | |
type XRecordCon GhcRn | |
Defined in GHC.Hs.Expr | |
type XRecordCon GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XRecTy GhcPs | |
Defined in GHC.Hs.Type | |
type XRecTy GhcRn | |
Defined in GHC.Hs.Type | |
type XRecTy GhcTc | |
Defined in GHC.Hs.Type |
Instances
type XRecFld (GhcPass _1) | |
Defined in GHC.Hs.Expr | |
type XRecFld (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XRec p a = (r :: Type) | r -> a #
GHC's L prefixed variants wrap their vanilla variant in this type family,
to add SrcLoc
info via Located
. Other passes than GhcPass
not
interested in location information can define this as
type instance XRec NoLocated a = a
.
See Note [XRec and SrcSpans in the AST]
Instances
type XRec (GhcPass p) a | |
Defined in GHC.Hs.Extension |
type family XQuasiQuote x #
Instances
type XQuasiQuote (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XQualTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XProjection x #
Instances
type XProjection GhcPs | |
Defined in GHC.Hs.Expr | |
type XProjection GhcRn | |
Defined in GHC.Hs.Expr | |
type XProjection GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XPragE (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XPatSynSig x #
Instances
type XPatSynSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
type family XPatSynBind x x' #
Instances
type XPatSynBind (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
Instances
type XPatBr (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XParStmtBlock x x' #
Instances
type XParStmtBlock (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Expr |
Instances
type XParStmt (GhcPass _1) GhcPs b | |
Defined in GHC.Hs.Expr | |
type XParStmt (GhcPass _1) GhcRn b | |
Defined in GHC.Hs.Expr | |
type XParStmt (GhcPass _1) GhcTc b | |
Defined in GHC.Hs.Expr |
Instances
Instances
type XOverLit GhcPs | |
Defined in GHC.Hs.Lit | |
type XOverLit GhcRn | |
Defined in GHC.Hs.Lit | |
type XOverLit GhcTc | |
Defined in GHC.Hs.Lit |
type family XOverLabel x #
Instances
type XOverLabel GhcPs | |
Defined in GHC.Hs.Expr | |
type XOverLabel GhcRn | |
Defined in GHC.Hs.Expr | |
type XOverLabel GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XOpTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XNoSig (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XNewtypeStrategy x #
Instances
type XNewtypeStrategy GhcPs | |
Defined in GHC.Hs.Decls | |
type XNewtypeStrategy GhcRn | |
Defined in GHC.Hs.Decls | |
type XNewtypeStrategy GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XNegApp GhcPs | |
Defined in GHC.Hs.Expr | |
type XNegApp GhcRn | |
Defined in GHC.Hs.Expr | |
type XNegApp GhcTc | |
Defined in GHC.Hs.Expr |
type family XNPlusKPat x #
Instances
type XNPlusKPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XNPlusKPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XNPlusKPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XMultiIf GhcPs | |
Defined in GHC.Hs.Expr | |
type XMultiIf GhcRn | |
Defined in GHC.Hs.Expr | |
type XMultiIf GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XMissing GhcPs | |
Defined in GHC.Hs.Expr | |
type XMissing GhcRn | |
Defined in GHC.Hs.Expr | |
type XMissing GhcTc | |
Defined in GHC.Hs.Expr |
type family XMinimalSig x #
Instances
type XMinimalSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XMG GhcPs b | |
Defined in GHC.Hs.Expr | |
type XMG GhcRn b | |
Defined in GHC.Hs.Expr | |
type XMG GhcTc b | |
Defined in GHC.Hs.Expr |
Instances
type XLitPat (GhcPass _1) | |
Defined in GHC.Hs.Pat |
Instances
type XLet GhcPs | |
Defined in GHC.Hs.Expr | |
type XLet GhcRn | |
Defined in GHC.Hs.Expr | |
type XLet GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XLazyPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XLazyPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XLazyPat GhcTc | |
Defined in GHC.Hs.Pat |
type family XLastStmt x x' b #
Instances
type XLastStmt (GhcPass _1) (GhcPass _2) b | |
Defined in GHC.Hs.Expr |
Instances
type XLam (GhcPass _1) | |
Defined in GHC.Hs.Expr | |
type XLam (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XKindedTyVar x #
Instances
type XKindedTyVar (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XKindSigD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XInstD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XInlineSig x #
Instances
type XInlineSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XIf GhcPs | |
Defined in GHC.Hs.Expr | |
type XIf GhcRn | |
Defined in GHC.Hs.Expr | |
type XIf GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XIdSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XIPBinds GhcPs | |
Defined in GHC.Hs.Binds | |
type XIPBinds GhcRn | |
Defined in GHC.Hs.Binds | |
type XIPBinds GhcTc | |
Defined in GHC.Hs.Binds |
Instances
type XIEVar GhcPs | |
Defined in GHC.Hs.ImpExp | |
type XIEVar GhcRn | |
Defined in GHC.Hs.ImpExp | |
type XIEVar GhcTc | |
Defined in GHC.Hs.ImpExp |
type family XIEThingWith x #
Instances
type XIEThingWith (GhcPass 'Parsed) | |
Defined in GHC.Hs.ImpExp | |
type XIEThingWith (GhcPass 'Renamed) | |
Defined in GHC.Hs.ImpExp | |
type XIEThingWith (GhcPass 'Typechecked) | |
Defined in GHC.Hs.ImpExp |
type family XIEThingAll x #
Instances
type XIEThingAll (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
type family XIEThingAbs x #
Instances
type XIEThingAbs (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
type family XIEModuleContents x #
Instances
type XIEModuleContents GhcPs | |
Defined in GHC.Hs.ImpExp | |
type XIEModuleContents GhcRn | |
Defined in GHC.Hs.ImpExp | |
type XIEModuleContents GhcTc | |
Defined in GHC.Hs.ImpExp |
Instances
type XIEGroup (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
type family XIEDocNamed x #
Instances
type XIEDocNamed (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
Instances
type XIEDoc (GhcPass _1) | |
Defined in GHC.Hs.ImpExp |
type family XHsWordPrim x #
Instances
type XHsWordPrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsWord64Prim x #
Instances
type XHsWord64Prim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XHsWC GhcPs b | |
Defined in GHC.Hs.Type | |
type XHsWC GhcRn b | |
Defined in GHC.Hs.Type | |
type XHsWC GhcTc b | |
Defined in GHC.Hs.Type |
type family XHsValBinds x x' #
Instances
type XHsValBinds (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
type family XHsStringPrim x #
Instances
type XHsStringPrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XHsString (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XHsSig (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XHsRecField x #
Instances
type XHsRecField _1 | |
Defined in GHC.Hs.Pat |
Instances
type XHsRat (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XHsQTvs GhcPs | |
Defined in GHC.Hs.Type | |
type XHsQTvs GhcRn | |
Defined in GHC.Hs.Type | |
type XHsQTvs GhcTc | |
Defined in GHC.Hs.Type |
Instances
type XHsPS GhcPs | |
Defined in GHC.Hs.Type | |
type XHsPS GhcRn | |
Defined in GHC.Hs.Type | |
type XHsPS GhcTc | |
Defined in GHC.Hs.Type |
type family XHsOuterImplicit x #
Instances
type XHsOuterImplicit GhcPs | |
Defined in GHC.Hs.Type | |
type XHsOuterImplicit GhcRn | |
Defined in GHC.Hs.Type | |
type XHsOuterImplicit GhcTc | |
Defined in GHC.Hs.Type |
type family XHsOuterExplicit x flag #
Instances
type XHsOuterExplicit GhcPs _1 | |
Defined in GHC.Hs.Type | |
type XHsOuterExplicit GhcRn _1 | |
Defined in GHC.Hs.Type | |
type XHsOuterExplicit GhcTc flag | |
Defined in GHC.Hs.Type |
type family XHsInteger x #
Instances
type XHsInteger (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsIntPrim x #
Instances
type XHsIntPrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsInt64Prim x #
Instances
type XHsInt64Prim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XHsInt (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsIPBinds x x' #
Instances
type XHsIPBinds (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
type family XHsForAllVis x #
Instances
type XHsForAllVis (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XHsForAllInvis x #
Instances
type XHsForAllInvis (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XHsFloatPrim x #
Instances
type XHsFloatPrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsDoublePrim x #
Instances
type XHsDoublePrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsCharPrim x #
Instances
type XHsCharPrim (GhcPass _1) | |
Defined in GHC.Hs.Lit |
Instances
type XHsChar (GhcPass _1) | |
Defined in GHC.Hs.Lit |
type family XHsAnnotation x #
Instances
type XHsAnnotation (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XGetField GhcPs | |
Defined in GHC.Hs.Expr | |
type XGetField GhcRn | |
Defined in GHC.Hs.Expr | |
type XGetField GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XFunTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
Instances
type XFunBind (GhcPass pL) GhcPs | |
Defined in GHC.Hs.Binds | |
type XFunBind (GhcPass pL) GhcRn | |
Defined in GHC.Hs.Binds | |
type XFunBind (GhcPass pL) GhcTc | |
Defined in GHC.Hs.Binds |
type family XForeignImport x #
Instances
type XForeignImport GhcPs | |
Defined in GHC.Hs.Decls | |
type XForeignImport GhcRn | |
Defined in GHC.Hs.Decls | |
type XForeignImport GhcTc | |
Defined in GHC.Hs.Decls |
type family XForeignExport x #
Instances
type XForeignExport GhcPs | |
Defined in GHC.Hs.Decls | |
type XForeignExport GhcRn | |
Defined in GHC.Hs.Decls | |
type XForeignExport GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XForD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XForAllTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XFixitySig x #
Instances
type XFixitySig (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XFamDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XExprWithTySig x #
Instances
type XExprWithTySig GhcPs | |
Defined in GHC.Hs.Expr | |
type XExprWithTySig GhcRn | |
Defined in GHC.Hs.Expr | |
type XExprWithTySig GhcTc | |
Defined in GHC.Hs.Expr |
type family XExplicitTupleTy x #
Instances
type XExplicitTupleTy GhcPs | |
Defined in GHC.Hs.Type | |
type XExplicitTupleTy GhcRn | |
Defined in GHC.Hs.Type | |
type XExplicitTupleTy GhcTc | |
Defined in GHC.Hs.Type |
type family XExplicitTuple x #
Instances
type XExplicitTuple GhcPs | |
Defined in GHC.Hs.Expr | |
type XExplicitTuple GhcRn | |
Defined in GHC.Hs.Expr | |
type XExplicitTuple GhcTc | |
Defined in GHC.Hs.Expr |
type family XExplicitSum x #
Instances
type XExplicitSum GhcPs | |
Defined in GHC.Hs.Expr | |
type XExplicitSum GhcRn | |
Defined in GHC.Hs.Expr | |
type XExplicitSum GhcTc | |
Defined in GHC.Hs.Expr |
type family XExplicitListTy x #
Instances
type XExplicitListTy GhcPs | |
Defined in GHC.Hs.Type | |
type XExplicitListTy GhcRn | |
Defined in GHC.Hs.Type | |
type XExplicitListTy GhcTc | |
Defined in GHC.Hs.Type |
type family XExplicitList x #
Instances
type XExplicitList GhcPs | |
Defined in GHC.Hs.Expr | |
type XExplicitList GhcRn | |
Defined in GHC.Hs.Expr | |
type XExplicitList GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XExpBr (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XEmptyLocalBinds x x' #
Instances
type XEmptyLocalBinds (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
Instances
type XDocD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XDo GhcPs | |
Defined in GHC.Hs.Expr | |
type XDo GhcRn | |
Defined in GHC.Hs.Expr | |
type XDo GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XDerivD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XDefD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XDecBrL (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XDecBrG (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XDctSingle x #
Instances
type XDctSingle (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XDctMulti (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XDataFamInstD x #
Instances
type XDataFamInstD GhcPs | |
Defined in GHC.Hs.Decls | |
type XDataFamInstD GhcRn | |
Defined in GHC.Hs.Decls | |
type XDataFamInstD GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XDataDecl GhcPs | |
Defined in GHC.Hs.Decls | |
type XDataDecl GhcRn | |
Defined in GHC.Hs.Decls | |
type XDataDecl GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XConPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XConPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XConPat GhcTc | |
Defined in GHC.Hs.Pat |
type family XConLikeOut x #
Instances
type XConLikeOut (GhcPass _1) | |
Defined in GHC.Hs.Expr | |
type XConLikeOut (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XConDeclH98 x #
Instances
type XConDeclH98 (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XConDeclGADT x #
Instances
type XConDeclGADT (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XConDeclField x #
Instances
type XConDeclField (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XCompleteMatchSig x #
Instances
type XCompleteMatchSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
Instances
type XCmdWrap (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XCmdTop GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdTop GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdTop GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XCmdLet GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdLet GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdLet GhcTc | |
Defined in GHC.Hs.Expr |
type family XCmdLamCase x #
Instances
type XCmdLamCase (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XCmdLam (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XCmdIf GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdIf GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdIf GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XCmdDo GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdDo GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdDo GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XCmdCase GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdCase GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdCase GhcTc | |
Defined in GHC.Hs.Expr |
type family XCmdArrForm x #
Instances
type XCmdArrForm GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdArrForm GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdArrForm GhcTc | |
Defined in GHC.Hs.Expr |
type family XCmdArrApp x #
Instances
type XCmdArrApp GhcPs | |
Defined in GHC.Hs.Expr | |
type XCmdArrApp GhcRn | |
Defined in GHC.Hs.Expr | |
type XCmdArrApp GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XClsInstD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XClassOpSig x #
Instances
type XClassOpSig (GhcPass p) | |
Defined in GHC.Hs.Binds |
type family XClassDecl x #
Instances
type XClassDecl GhcPs | |
Defined in GHC.Hs.Decls | |
type XClassDecl GhcRn | |
Defined in GHC.Hs.Decls | |
type XClassDecl GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XCase GhcPs | |
Defined in GHC.Hs.Expr | |
type XCase GhcRn | |
Defined in GHC.Hs.Expr | |
type XCase GhcTc | |
Defined in GHC.Hs.Expr |
type family XCTyFamInstDecl x #
Instances
type XCTyFamInstDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCTyClGroup x #
Instances
type XCTyClGroup (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCRuleDecls x #
Instances
type XCRuleDecls GhcPs | |
Defined in GHC.Hs.Decls | |
type XCRuleDecls GhcRn | |
Defined in GHC.Hs.Decls | |
type XCRuleDecls GhcTc | |
Defined in GHC.Hs.Decls |
type family XCRuleBndr x #
Instances
type XCRuleBndr (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCRoleAnnotDecl x #
Instances
type XCRoleAnnotDecl GhcPs | |
Defined in GHC.Hs.Decls | |
type XCRoleAnnotDecl GhcRn | |
Defined in GHC.Hs.Decls | |
type XCRoleAnnotDecl GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XCKindSig (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCInjectivityAnn x #
Instances
type XCInjectivityAnn (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCImportDecl x #
Instances
type XCImportDecl GhcPs | |
Defined in GHC.Hs.ImpExp | |
type XCImportDecl GhcRn | |
Defined in GHC.Hs.ImpExp | |
type XCImportDecl GhcTc | |
Defined in GHC.Hs.ImpExp |
Instances
type XCHsGroup (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCHsFieldLabel x #
Instances
type XCHsFieldLabel (GhcPass _1) | |
Defined in GHC.Hs.Expr |
type family XCHsDerivingClause x #
Instances
type XCHsDerivingClause (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCHsDataDefn x #
Instances
type XCHsDataDefn (GhcPass _1) | |
Defined in GHC.Hs.Decls |
Instances
type XCGRHSs (GhcPass _1) _2 | |
Defined in GHC.Hs.Expr |
type family XCFieldOcc x #
Instances
type XCFieldOcc GhcPs | |
Defined in GHC.Hs.Type | |
type XCFieldOcc GhcRn | |
Defined in GHC.Hs.Type | |
type XCFieldOcc GhcTc | |
Defined in GHC.Hs.Type |
type family XCFamilyDecl x #
Instances
type XCFamilyDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCDerivDecl x #
Instances
type XCDerivDecl (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XCDefaultDecl x #
Instances
type XCDefaultDecl GhcPs | |
Defined in GHC.Hs.Decls | |
type XCDefaultDecl GhcRn | |
Defined in GHC.Hs.Decls | |
type XCDefaultDecl GhcTc | |
Defined in GHC.Hs.Decls |
type family XCClsInstDecl x #
Instances
type XCClsInstDecl GhcPs | |
Defined in GHC.Hs.Decls | |
type XCClsInstDecl GhcRn | |
Defined in GHC.Hs.Decls | |
type XCClsInstDecl GhcTc | |
Defined in GHC.Hs.Decls |
type family XBodyStmt x x' b #
Instances
type XBodyStmt (GhcPass _1) GhcPs b | |
Defined in GHC.Hs.Expr | |
type XBodyStmt (GhcPass _1) GhcRn b | |
Defined in GHC.Hs.Expr | |
type XBodyStmt (GhcPass _1) GhcTc b | |
Defined in GHC.Hs.Expr |
Instances
type XBinTick (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XBangPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XBangPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XBangPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XAsPat GhcPs | |
Defined in GHC.Hs.Pat | |
type XAsPat GhcRn | |
Defined in GHC.Hs.Pat | |
type XAsPat GhcTc | |
Defined in GHC.Hs.Pat |
Instances
type XArithSeq GhcPs | |
Defined in GHC.Hs.Expr | |
type XArithSeq GhcRn | |
Defined in GHC.Hs.Expr | |
type XArithSeq GhcTc | |
Defined in GHC.Hs.Expr |
type family XApplicativeStmt x x' b #
Instances
type XApplicativeStmt (GhcPass _1) GhcPs b | |
Defined in GHC.Hs.Expr | |
type XApplicativeStmt (GhcPass _1) GhcRn b | |
Defined in GHC.Hs.Expr | |
type XApplicativeStmt (GhcPass _1) GhcTc b | |
Defined in GHC.Hs.Expr |
type family XApplicativeArgOne x #
Instances
type XApplicativeArgOne GhcPs | |
Defined in GHC.Hs.Expr | |
type XApplicativeArgOne GhcRn | |
Defined in GHC.Hs.Expr | |
type XApplicativeArgOne GhcTc | |
Defined in GHC.Hs.Expr |
type family XApplicativeArgMany x #
Instances
type XApplicativeArgMany (GhcPass _1) | |
Defined in GHC.Hs.Expr |
Instances
type XAppTypeE GhcPs | |
Defined in GHC.Hs.Expr | |
type XAppTypeE GhcRn | |
Defined in GHC.Hs.Expr | |
type XAppTypeE GhcTc | |
Defined in GHC.Hs.Expr |
Instances
type XAppTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XAppKindTy x #
Instances
type XAppKindTy (GhcPass _1) | |
Defined in GHC.Hs.Type |
type family XAnyClassStrategy x #
Instances
type XAnyClassStrategy GhcPs | |
Defined in GHC.Hs.Decls | |
type XAnyClassStrategy GhcRn | |
Defined in GHC.Hs.Decls | |
type XAnyClassStrategy GhcTc | |
Defined in GHC.Hs.Decls |
Instances
type XAnnD (GhcPass _1) | |
Defined in GHC.Hs.Decls |
type family XAmbiguous x #
Instances
type XAmbiguous GhcPs | |
Defined in GHC.Hs.Type | |
type XAmbiguous GhcRn | |
Defined in GHC.Hs.Type | |
type XAmbiguous GhcTc | |
Defined in GHC.Hs.Type |
Instances
type XAbsBinds (GhcPass pL) (GhcPass pR) | |
Defined in GHC.Hs.Binds |
Instances
type XABE (GhcPass p) | |
Defined in GHC.Hs.Binds |
The trivial wrapper that carries no additional information See Note [XRec and SrcSpans in the AST]
We can strip off the XRec to access the underlying data. See Note [XRec and SrcSpans in the AST]
See Note [NoGhcTc] in GHC.Hs.Extension. It has to be in this module because it is used like an extension point (in the data definitions of types that should be parameter-agnostic.
Instances
type NoGhcTc (GhcPass pass) | Marks that a field uses the GhcRn variant even when the pass parameter is GhcTc. Useful for storing HsTypes in GHC.Hs.Exprs, say, because HsType GhcTc should never occur. See Note [NoGhcTc] |
Defined in GHC.Hs.Extension |
data NoExtField #
A placeholder type for TTG extension points that are not currently unused to represent any particular value.
This should not be confused with NoExtCon
, which are found in unused
extension constructors and therefore should never be inhabited. In
contrast, NoExtField
is used in extension points (e.g., as the field of
some constructor), so it must have an inhabitant to construct AST passes
that manipulate fields with that extension point as their type.
Constructors
NoExtField |
Instances
Data NoExtField | |
Defined in Language.Haskell.Syntax.Extension Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NoExtField -> c NoExtField # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NoExtField # toConstr :: NoExtField -> Constr # dataTypeOf :: NoExtField -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NoExtField) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NoExtField) # gmapT :: (forall b. Data b => b -> b) -> NoExtField -> NoExtField # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NoExtField -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NoExtField -> r # gmapQ :: (forall d. Data d => d -> u) -> NoExtField -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NoExtField -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NoExtField -> m NoExtField # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtField -> m NoExtField # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtField -> m NoExtField # | |
Outputable NoExtField | |
Defined in Language.Haskell.Syntax.Extension Methods ppr :: NoExtField -> SDoc # | |
Eq NoExtField | |
Defined in Language.Haskell.Syntax.Extension | |
Ord NoExtField | |
Defined in Language.Haskell.Syntax.Extension Methods compare :: NoExtField -> NoExtField -> Ordering # (<) :: NoExtField -> NoExtField -> Bool # (<=) :: NoExtField -> NoExtField -> Bool # (>) :: NoExtField -> NoExtField -> Bool # (>=) :: NoExtField -> NoExtField -> Bool # max :: NoExtField -> NoExtField -> NoExtField # min :: NoExtField -> NoExtField -> NoExtField # |
Used in TTG extension constructors that have yet to be extended with
anything. If an extension constructor has NoExtCon
as its field, it is
not intended to ever be constructed anywhere, and any function that consumes
the extension constructor can eliminate it by way of noExtCon
.
This should not be confused with NoExtField
, which are found in unused
extension points (not constructors) and therefore can be inhabited.
Instances
Data NoExtCon | |
Defined in Language.Haskell.Syntax.Extension Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NoExtCon -> c NoExtCon # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NoExtCon # toConstr :: NoExtCon -> Constr # dataTypeOf :: NoExtCon -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NoExtCon) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NoExtCon) # gmapT :: (forall b. Data b => b -> b) -> NoExtCon -> NoExtCon # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NoExtCon -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NoExtCon -> r # gmapQ :: (forall d. Data d => d -> u) -> NoExtCon -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NoExtCon -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NoExtCon -> m NoExtCon # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtCon -> m NoExtCon # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtCon -> m NoExtCon # | |
Outputable NoExtCon | |
Defined in Language.Haskell.Syntax.Extension | |
Eq NoExtCon | |
Ord NoExtCon | |
Defined in Language.Haskell.Syntax.Extension |
We can map over the underlying type contained in an XRec
while preserving
the annotation as is.
Maps the "normal" id type for a given pass
type family Anno a = (b :: Type) #
Instances
Used when constructing a term with an unused extension point.
data SrcUnpackedness #
Source Unpackedness
What unpackedness the user requested
Constructors
SrcUnpack | {-# UNPACK #-} specified |
SrcNoUnpack | {-# NOUNPACK #-} specified |
NoSrcUnpack | no unpack pragma |
Instances
data SrcStrictness #
Source Strictness
What strictness annotation the user wrote
Constructors
SrcLazy | Lazy, ie |
SrcStrict | Strict, ie |
NoSrcStrict | no strictness annotation |
Instances
Data SrcStrictness | |
Defined in GHC.Core.DataCon Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcStrictness -> c SrcStrictness # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcStrictness # toConstr :: SrcStrictness -> Constr # dataTypeOf :: SrcStrictness -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcStrictness) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcStrictness) # gmapT :: (forall b. Data b => b -> b) -> SrcStrictness -> SrcStrictness # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r # gmapQ :: (forall d. Data d => d -> u) -> SrcStrictness -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcStrictness -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness # | |
Binary SrcStrictness | |
Defined in GHC.Core.DataCon Methods put_ :: BinHandle -> SrcStrictness -> IO () # put :: BinHandle -> SrcStrictness -> IO (Bin SrcStrictness) # get :: BinHandle -> IO SrcStrictness # | |
Outputable SrcStrictness | |
Defined in GHC.Core.DataCon Methods ppr :: SrcStrictness -> SDoc # | |
Eq SrcStrictness | |
Defined in GHC.Core.DataCon Methods (==) :: SrcStrictness -> SrcStrictness -> Bool # (/=) :: SrcStrictness -> SrcStrictness -> Bool # |
Haskell Source Bang
Bangs on data constructor arguments as the user wrote them in the source code.
(HsSrcBang _ SrcUnpack SrcLazy)
and
(HsSrcBang _ SrcUnpack NoSrcStrict)
(without StrictData) makes no sense, we
emit a warning (in checkValidDataCon) and treat it like
(HsSrcBang _ NoSrcUnpack SrcLazy)
Constructors
HsSrcBang SourceText SrcUnpackedness SrcStrictness |
Instances
Data HsSrcBang | |
Defined in GHC.Core.DataCon Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsSrcBang -> c HsSrcBang # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsSrcBang # toConstr :: HsSrcBang -> Constr # dataTypeOf :: HsSrcBang -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsSrcBang) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsSrcBang) # gmapT :: (forall b. Data b => b -> b) -> HsSrcBang -> HsSrcBang # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsSrcBang -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsSrcBang -> r # gmapQ :: (forall d. Data d => d -> u) -> HsSrcBang -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsSrcBang -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang # | |
Outputable HsSrcBang | |
Defined in GHC.Core.DataCon |
data HsImplBang #
Haskell Implementation Bang
Bangs of data constructor arguments as generated by the compiler after consulting HsSrcBang, flags, etc.
Constructors
HsLazy | Lazy field, or one with an unlifted type |
HsStrict | Strict but not unpacked field |
HsUnpack (Maybe Coercion) | Strict and unpacked field co :: arg-ty ~ product-ty HsBang |
Instances
Data HsImplBang | |
Defined in GHC.Core.DataCon Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsImplBang -> c HsImplBang # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsImplBang # toConstr :: HsImplBang -> Constr # dataTypeOf :: HsImplBang -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsImplBang) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsImplBang) # gmapT :: (forall b. Data b => b -> b) -> HsImplBang -> HsImplBang # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsImplBang -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsImplBang -> r # gmapQ :: (forall d. Data d => d -> u) -> HsImplBang -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsImplBang -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang # | |
Outputable HsImplBang | |
Defined in GHC.Core.DataCon Methods ppr :: HsImplBang -> SDoc # |
type LHsDocString = Located HsDocString #
Located Haskell Documentation String
data HsDocString #
Haskell Documentation String
Internally this is a UTF8-Encoded ByteString
.
Instances
Data HsDocString | |
Defined in GHC.Hs.Doc Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsDocString -> c HsDocString # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsDocString # toConstr :: HsDocString -> Constr # dataTypeOf :: HsDocString -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsDocString) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsDocString) # gmapT :: (forall b. Data b => b -> b) -> HsDocString -> HsDocString # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsDocString -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsDocString -> r # gmapQ :: (forall d. Data d => d -> u) -> HsDocString -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsDocString -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsDocString -> m HsDocString # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsDocString -> m HsDocString # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsDocString -> m HsDocString # | |
Show HsDocString | |
Defined in GHC.Hs.Doc Methods showsPrec :: Int -> HsDocString -> ShowS # show :: HsDocString -> String # showList :: [HsDocString] -> ShowS # | |
Binary HsDocString | |
Defined in GHC.Hs.Doc Methods put_ :: BinHandle -> HsDocString -> IO () # put :: BinHandle -> HsDocString -> IO (Bin HsDocString) # get :: BinHandle -> IO HsDocString # | |
Outputable HsDocString | |
Defined in GHC.Hs.Doc Methods ppr :: HsDocString -> SDoc # | |
ExactPrint HsDocString | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint Methods getAnnotationEntry :: HsDocString -> Entry # setAnnotationAnchor :: HsDocString -> Anchor -> EpAnnComments -> HsDocString # exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsDocString -> EP w m HsDocString # | |
Eq HsDocString | |
Defined in GHC.Hs.Doc |
data ExtractedTHDocs #
Maps of docs that were added via Template Haskell's putDoc
.
Constructors
ExtractedTHDocs | |
Fields
|
newtype DeclDocMap #
Docs for declarations: functions, data types, instances, methods etc.
Constructors
DeclDocMap (Map Name HsDocString) |
Instances
Binary DeclDocMap | |
Defined in GHC.Hs.Doc Methods put_ :: BinHandle -> DeclDocMap -> IO () # put :: BinHandle -> DeclDocMap -> IO (Bin DeclDocMap) # get :: BinHandle -> IO DeclDocMap # | |
Outputable DeclDocMap | |
Defined in GHC.Hs.Doc Methods ppr :: DeclDocMap -> SDoc # |
Docs for arguments. E.g. function arguments, method arguments.
Constructors
ArgDocMap (Map Name (IntMap HsDocString)) |
unpackHDS :: HsDocString -> String #
ppr_mbDoc :: Maybe LHsDocString -> SDoc #
mkHsDocStringUtf8ByteString :: ByteString -> HsDocString #
Create a HsDocString
from a UTF8-encoded ByteString
.
mkHsDocString :: String -> HsDocString #
isEmptyDocString :: HsDocString -> Bool #
hsDocStringToByteString :: HsDocString -> ByteString #
Return the contents of a HsDocString
as a UTF8-encoded ByteString
.
concatDocs :: [HsDocString] -> Maybe HsDocString #
Concat docstrings with two newlines in between.
Empty docstrings are skipped.
If all inputs are empty, Nothing
is returned.
appendDocs :: HsDocString -> HsDocString -> HsDocString #
Join two docstrings.
Non-empty docstrings are joined with two newlines in between, resulting in separate paragraphs.
data TrailingAnn #
Captures the location of punctuation occuring between items, normally in a list. It is captured as a trailing annotation.
Constructors
AddSemiAnn EpaLocation | Trailing ';' |
AddCommaAnn EpaLocation | Trailing ',' |
AddVbarAnn EpaLocation | Trailing '|' |
AddRarrowAnn EpaLocation | Trailing |
AddRarrowAnnU EpaLocation | Trailing |
AddLollyAnnU EpaLocation | Trailing |
Instances
Data TrailingAnn | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TrailingAnn -> c TrailingAnn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TrailingAnn # toConstr :: TrailingAnn -> Constr # dataTypeOf :: TrailingAnn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TrailingAnn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TrailingAnn) # gmapT :: (forall b. Data b => b -> b) -> TrailingAnn -> TrailingAnn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TrailingAnn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TrailingAnn -> r # gmapQ :: (forall d. Data d => d -> u) -> TrailingAnn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TrailingAnn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TrailingAnn -> m TrailingAnn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TrailingAnn -> m TrailingAnn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TrailingAnn -> m TrailingAnn # | |
Outputable TrailingAnn | |
Defined in GHC.Parser.Annotation Methods ppr :: TrailingAnn -> SDoc # | |
Eq TrailingAnn | |
Defined in GHC.Parser.Annotation | |
Ord TrailingAnn | |
Defined in GHC.Parser.Annotation Methods compare :: TrailingAnn -> TrailingAnn -> Ordering # (<) :: TrailingAnn -> TrailingAnn -> Bool # (<=) :: TrailingAnn -> TrailingAnn -> Bool # (>) :: TrailingAnn -> TrailingAnn -> Bool # (>=) :: TrailingAnn -> TrailingAnn -> Bool # max :: TrailingAnn -> TrailingAnn -> TrailingAnn # min :: TrailingAnn -> TrailingAnn -> TrailingAnn # |
type SrcSpanAnnP = SrcAnn AnnPragma #
type SrcSpanAnnN = SrcAnn NameAnn #
type SrcSpanAnnL = SrcAnn AnnList #
type SrcSpanAnnC = SrcAnn AnnContext #
type SrcSpanAnnA = SrcAnn AnnListItem #
data SrcSpanAnn' a #
The 'SrcSpanAnn'' type wraps a normal SrcSpan
, together with
an extra annotation type. This is mapped to a specific GenLocated
usage in the AST through the XRec
and Anno
type families.
Constructors
SrcSpanAnn | |
Instances
type SrcAnn ann = SrcSpanAnn' (EpAnn ann) #
We mostly use 'SrcSpanAnn'' with an 'EpAnn''
Detail of the "brackets" used in an AnnParen
exact print annotation.
Constructors
AnnParens | '(', ')' |
AnnParensHash | '(#', '#)' |
AnnParensSquare | '[', ']' |
Instances
Data ParenType | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ParenType -> c ParenType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ParenType # toConstr :: ParenType -> Constr # dataTypeOf :: ParenType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ParenType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ParenType) # gmapT :: (forall b. Data b => b -> b) -> ParenType -> ParenType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ParenType -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ParenType -> r # gmapQ :: (forall d. Data d => d -> u) -> ParenType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ParenType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ParenType -> m ParenType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ParenType -> m ParenType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ParenType -> m ParenType # | |
Eq ParenType | |
Ord ParenType | |
Constructors
NoEpAnns |
Instances
Data NoEpAnns | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NoEpAnns -> c NoEpAnns # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NoEpAnns # toConstr :: NoEpAnns -> Constr # dataTypeOf :: NoEpAnns -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NoEpAnns) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NoEpAnns) # gmapT :: (forall b. Data b => b -> b) -> NoEpAnns -> NoEpAnns # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NoEpAnns -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NoEpAnns -> r # gmapQ :: (forall d. Data d => d -> u) -> NoEpAnns -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NoEpAnns -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NoEpAnns -> m NoEpAnns # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NoEpAnns -> m NoEpAnns # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NoEpAnns -> m NoEpAnns # | |
Eq NoEpAnns | |
Ord NoEpAnns | |
Defined in GHC.Parser.Annotation |
exact print annotations for a RdrName
. There are many kinds of
adornment that can be attached to a given RdrName
. This type
captures them, as detailed on the individual constructors.
Constructors
NameAnn | Used for a name with an adornment, so |
Fields | |
NameAnnCommas | |
Fields | |
NameAnnOnly | Used for |
Fields | |
NameAnnRArrow | Used for |
Fields
| |
NameAnnQuote | Used for an item with a leading |
Fields | |
NameAnnTrailing | Used when adding a |
Fields
|
Instances
data NameAdornment #
A NameAnn
can capture the locations of surrounding adornments,
such as parens or backquotes. This data type identifies what
particular pair are being used.
Constructors
NameParens | '(' ')' |
NameParensHash | '(#' '#)' |
NameBackquotes | '`' |
NameSquare | '[' ']' |
Instances
type LocatedP = GenLocated SrcSpanAnnP #
type LocatedN = GenLocated SrcSpanAnnN #
type LocatedL = GenLocated SrcSpanAnnL #
type LocatedC = GenLocated SrcSpanAnnC #
type LocatedAn an = GenLocated (SrcAnn an) #
General representation of a GenLocated
type carrying a
parameterised annotation type.
type LocatedA = GenLocated SrcSpanAnnA #
type LEpaComment = GenLocated Anchor EpaComment #
data IsUnicodeSyntax #
Certain tokens can have alternate representations when unicode syntax is
enabled. This flag is attached to those tokens in the lexer so that the
original source representation can be reproduced in the corresponding
EpAnnotation
Constructors
UnicodeSyntax | |
NormalSyntax |
Instances
Some template haskell tokens have two variants, one with an e
the other
not:
[| or [e| [|| or [e||
This type indicates whether the e
is present or not.
Instances
Data HasE | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HasE -> c HasE # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HasE # dataTypeOf :: HasE -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HasE) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HasE) # gmapT :: (forall b. Data b => b -> b) -> HasE -> HasE # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HasE -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HasE -> r # gmapQ :: (forall d. Data d => d -> u) -> HasE -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HasE -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HasE -> m HasE # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HasE -> m HasE # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HasE -> m HasE # | |
Show HasE | |
Eq HasE | |
Ord HasE | |
data EpaLocation #
The anchor for an
. The Parser inserts the
AnnKeywordId
variant, giving the exact location of the original item
in the parsed source. This can be replaced by the EpaSpan
version, to provide a position for the item relative to the end of
the previous item in the source. This is useful when editing an
AST prior to exact printing the changed one. The list of comments
in the EpaDelta
variant captures any comments between the prior
output and the thing being marked here, since we cannot otherwise
sort the relative order.EpaDelta
Constructors
EpaSpan !RealSrcSpan | |
EpaDelta !DeltaPos ![LEpaComment] |
Instances
Data EpaLocation | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EpaLocation -> c EpaLocation # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EpaLocation # toConstr :: EpaLocation -> Constr # dataTypeOf :: EpaLocation -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EpaLocation) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EpaLocation) # gmapT :: (forall b. Data b => b -> b) -> EpaLocation -> EpaLocation # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EpaLocation -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EpaLocation -> r # gmapQ :: (forall d. Data d => d -> u) -> EpaLocation -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EpaLocation -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EpaLocation -> m EpaLocation # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EpaLocation -> m EpaLocation # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EpaLocation -> m EpaLocation # | |
Outputable EpaLocation | |
Defined in GHC.Parser.Annotation Methods ppr :: EpaLocation -> SDoc # | |
Eq EpaLocation | |
Defined in GHC.Parser.Annotation | |
Ord EpaLocation | |
Defined in GHC.Parser.Annotation Methods compare :: EpaLocation -> EpaLocation -> Ordering # (<) :: EpaLocation -> EpaLocation -> Bool # (<=) :: EpaLocation -> EpaLocation -> Bool # (>) :: EpaLocation -> EpaLocation -> Bool # (>=) :: EpaLocation -> EpaLocation -> Bool # max :: EpaLocation -> EpaLocation -> EpaLocation # min :: EpaLocation -> EpaLocation -> EpaLocation # |
data EpaCommentTok #
Constructors
EpaDocCommentNext String | something beginning '-- |' |
EpaDocCommentPrev String | something beginning '-- ^' |
EpaDocCommentNamed String | something beginning '-- $' |
EpaDocSection Int String | a section heading |
EpaDocOptions String | doc options (prune, ignore-exports, etc) |
EpaLineComment String | comment starting by "--" |
EpaBlockComment String | comment in {- -} |
EpaEofComment | empty comment, capturing location of EOF |
Instances
data EpaComment #
Constructors
EpaComment | |
Fields
|
Instances
data EpAnnComments #
When we are parsing we add comments that belong a particular AST
element, and print them together with the element, interleaving
them into the output stream. But when editing the AST to move
fragments around it is useful to be able to first separate the
comments into those occuring before the AST element and those
following it. The EpaCommentsBalanced
constructor is used to do
this. The GHC parser will only insert the EpaComments
form.
Constructors
EpaComments | |
Fields
| |
EpaCommentsBalanced | |
Fields
|
Instances
The exact print annotations (EPAs) are kept in the HsSyn AST for the GhcPs phase. We do not always have EPAs though, only for code that has been parsed as they do not exist for generated code. This type captures that they may be missing.
A goal of the annotations is that an AST can be edited, including moving subtrees from one place to another, duplicating them, and so on. This means that each fragment must be self-contained. To this end, each annotated fragment keeps track of the anchor position it was originally captured at, being simply the start span of the topmost element of the ast fragment. This gives us a way to later re-calculate all Located items in this layer of the AST, as well as any annotations captured. The comments associated with the AST fragment are also captured here.
The ann
type parameter allows this general structure to be
specialised to the specific set of locations of original exact
print annotation elements. So for HsLet
we have
type instance XLet GhcPs = EpAnn AnnsLet data AnnsLet = AnnsLet { alLet :: EpaLocation, alIn :: EpaLocation } deriving Data
The spacing between the items under the scope of a given EpAnn is
normally derived from the original Anchor
. But if a sub-element
is not in its original position, the required spacing can be
directly captured in the anchor_op
field of the entry
Anchor.
This allows us to freely move elements around, and stitch together
new AST fragments out of old ones, and have them still printed out
in a precise way.
Constructors
EpAnn | |
EpAnnNotUsed | No Annotation for generated code, e.g. from TH, deriving, etc. |
Instances
Spacing between output items when exact printing. It captures
the spacing from the current print position on the page to the
position required for the thing about to be printed. This is
either on the same line in which case is is simply the number of
spaces to emit, or it is some number of lines down, with a given
column offset. The exact printing algorithm keeps track of the
column offset pertaining to the current anchor position, so the
deltaColumn
is the additional spaces to add in this case. See
https://gitlab.haskell.org/ghc/ghc/wikis/api-annotations for
details.
Constructors
SameLine | |
Fields
| |
DifferentLine | |
Fields
|
Instances
Data DeltaPos | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DeltaPos -> c DeltaPos # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DeltaPos # toConstr :: DeltaPos -> Constr # dataTypeOf :: DeltaPos -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DeltaPos) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DeltaPos) # gmapT :: (forall b. Data b => b -> b) -> DeltaPos -> DeltaPos # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DeltaPos -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DeltaPos -> r # gmapQ :: (forall d. Data d => d -> u) -> DeltaPos -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DeltaPos -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DeltaPos -> m DeltaPos # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DeltaPos -> m DeltaPos # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DeltaPos -> m DeltaPos # | |
Show DeltaPos | |
Outputable DeltaPos | |
Defined in GHC.Parser.Annotation | |
Eq DeltaPos | |
Ord DeltaPos | |
Defined in GHC.Parser.Annotation |
data AnnSortKey #
Captures the sort order of sub elements. This is needed when the sub-elements have been split (as in a HsLocalBind which holds separate binds and sigs) or for infix patterns where the order has been re-arranged. It is captured explicitly so that after the Delta phase a SrcSpan is used purely as an index into the annotations, allowing transformations of the AST including the introduction of new Located items or re-arranging existing ones.
Constructors
NoAnnSortKey | |
AnnSortKey [RealSrcSpan] |
Instances
Data AnnSortKey | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnSortKey -> c AnnSortKey # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnSortKey # toConstr :: AnnSortKey -> Constr # dataTypeOf :: AnnSortKey -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnSortKey) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnSortKey) # gmapT :: (forall b. Data b => b -> b) -> AnnSortKey -> AnnSortKey # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnSortKey -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnSortKey -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnSortKey -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnSortKey -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnSortKey -> m AnnSortKey # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnSortKey -> m AnnSortKey # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnSortKey -> m AnnSortKey # | |
Monoid AnnSortKey | |
Defined in GHC.Parser.Annotation Methods mempty :: AnnSortKey # mappend :: AnnSortKey -> AnnSortKey -> AnnSortKey # mconcat :: [AnnSortKey] -> AnnSortKey # | |
Semigroup AnnSortKey | |
Defined in GHC.Parser.Annotation Methods (<>) :: AnnSortKey -> AnnSortKey -> AnnSortKey # sconcat :: NonEmpty AnnSortKey -> AnnSortKey # stimes :: Integral b => b -> AnnSortKey -> AnnSortKey # | |
Outputable AnnSortKey | |
Defined in GHC.Parser.Annotation Methods ppr :: AnnSortKey -> SDoc # | |
Eq AnnSortKey | |
Defined in GHC.Parser.Annotation |
exact print annotation used for capturing the locations of annotations in pragmas.
Instances
exact print annotation for an item having surrounding "brackets", such as tuples or lists
Constructors
AnnParen | |
Fields |
Instances
Data AnnParen | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnParen -> c AnnParen # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnParen # toConstr :: AnnParen -> Constr # dataTypeOf :: AnnParen -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnParen) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnParen) # gmapT :: (forall b. Data b => b -> b) -> AnnParen -> AnnParen # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnParen -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnParen -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnParen -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnParen -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnParen -> m AnnParen # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnParen -> m AnnParen # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnParen -> m AnnParen # |
data AnnListItem #
Annotation for items appearing in a list. They can have one or more trailing punctuations items, such as commas or semicolons.
Constructors
AnnListItem | |
Fields
|
Instances
Annotation for the "container" of a list. This captures surrounding items such as braces if present, and introductory keywords such as 'where'.
Constructors
AnnList | |
Instances
data AnnKeywordId #
Exact print annotations exist so that tools can perform source to source conversions of Haskell code. They are used to keep track of the various syntactic keywords that are not otherwise captured in the AST.
The wiki page describing this feature is https://gitlab.haskell.org/ghc/ghc/wikis/api-annotations https://gitlab.haskell.org/ghc/ghc/-/wikis/implementing-trees-that-grow/in-tree-api-annotations
Note: in general the names of these are taken from the corresponding token, unless otherwise noted See note [exact print annotations] above for details of the usage
Constructors
AnnAnyclass | |
AnnAs | |
AnnAt | |
AnnBang |
|
AnnBackquote | '`' |
AnnBy | |
AnnCase | case or lambda case |
AnnClass | |
AnnClose | '#)' or '#-}' etc |
AnnCloseB | '|)' |
AnnCloseBU | '|)', unicode variant |
AnnCloseC | '}' |
AnnCloseQ | '|]' |
AnnCloseQU | '|]', unicode variant |
AnnCloseP | ')' |
AnnClosePH | '#)' |
AnnCloseS | ']' |
AnnColon | |
AnnComma | as a list separator |
AnnCommaTuple | in a RdrName for a tuple |
AnnDarrow | '=>' |
AnnDarrowU | '=>', unicode variant |
AnnData | |
AnnDcolon | '::' |
AnnDcolonU | '::', unicode variant |
AnnDefault | |
AnnDeriving | |
AnnDo | |
AnnDot | |
AnnDotdot | '..' |
AnnElse | |
AnnEqual | |
AnnExport | |
AnnFamily | |
AnnForall | |
AnnForallU | Unicode variant |
AnnForeign | |
AnnFunId | for function name in matches where there are multiple equations for the function. |
AnnGroup | |
AnnHeader | for CType |
AnnHiding | |
AnnIf | |
AnnImport | |
AnnIn | |
AnnInfix | 'infix' or 'infixl' or 'infixr' |
AnnInstance | |
AnnLam | |
AnnLarrow | '<-' |
AnnLarrowU | '<-', unicode variant |
AnnLet | |
AnnLollyU | The |
AnnMdo | |
AnnMinus | |
AnnModule | |
AnnNewtype | |
AnnName | where a name loses its location in the AST, this carries it |
AnnOf | |
AnnOpen | '{-# DEPRECATED' etc. Opening of pragmas where
the capitalisation of the string can be changed by
the user. The actual text used is stored in a
|
AnnOpenB | '(|' |
AnnOpenBU | '(|', unicode variant |
AnnOpenC | '{' |
AnnOpenE | '[e|' or '[e||' |
AnnOpenEQ | '[|' |
AnnOpenEQU | '[|', unicode variant |
AnnOpenP | '(' |
AnnOpenS | '[' |
AnnOpenPH | '(#' |
AnnDollar | prefix |
AnnDollarDollar | prefix |
AnnPackageName | |
AnnPattern | |
AnnPercent |
|
AnnPercentOne | '%1' -- for HsLinearArrow |
AnnProc | |
AnnQualified | |
AnnRarrow |
|
AnnRarrowU |
|
AnnRec | |
AnnRole | |
AnnSafe | |
AnnSemi | ';' |
AnnSimpleQuote | ''' |
AnnSignature | |
AnnStatic |
|
AnnStock | |
AnnThen | |
AnnThTyQuote | double ''' |
AnnTilde |
|
AnnType | |
AnnUnit |
|
AnnUsing | |
AnnVal | e.g. INTEGER |
AnnValStr | String value, will need quotes when output |
AnnVbar | '|' |
AnnVia |
|
AnnWhere | |
Annlarrowtail |
|
AnnlarrowtailU |
|
Annrarrowtail |
|
AnnrarrowtailU |
|
AnnLarrowtail |
|
AnnLarrowtailU |
|
AnnRarrowtail |
|
AnnRarrowtailU |
|
Instances
data AnnContext #
Exact print annotation for the Context
data type.
Constructors
AnnContext | |
Fields
|
Instances
Data AnnContext | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnContext -> c AnnContext # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnContext # toConstr :: AnnContext -> Constr # dataTypeOf :: AnnContext -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnContext) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnContext) # gmapT :: (forall b. Data b => b -> b) -> AnnContext -> AnnContext # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnContext -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnContext -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnContext -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnContext -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnContext -> m AnnContext # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnContext -> m AnnContext # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnContext -> m AnnContext # | |
Outputable AnnContext | |
Defined in GHC.Parser.Annotation Methods ppr :: AnnContext -> SDoc # | |
ExactPrint a => ExactPrint (LocatedC a) | |
Defined in Language.Haskell.GHC.ExactPrint.ExactPrint |
data AnchorOperation #
If tools modify the parsed source, the MovedAnchor
variant can
directly provide the spacing for this item relative to the previous
one when printing. This allows AST fragments with a particular
anchor to be freely moved, without worrying about recalculating the
appropriate anchor span.
Constructors
UnchangedAnchor | |
MovedAnchor DeltaPos |
Instances
An Anchor
records the base location for the start of the
syntactic element holding the annotations, and is used as the point
of reference for calculating delta positions for contained
annotations.
It is also normally used as the reference point for the spacing of
the element relative to its container. If it is moved, that
relationship is tracked in the anchor_op
instead.
Constructors
Anchor | |
Fields
|
Instances
Data Anchor | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Anchor -> c Anchor # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Anchor # toConstr :: Anchor -> Constr # dataTypeOf :: Anchor -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Anchor) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Anchor) # gmapT :: (forall b. Data b => b -> b) -> Anchor -> Anchor # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Anchor -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Anchor -> r # gmapQ :: (forall d. Data d => d -> u) -> Anchor -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Anchor -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Anchor -> m Anchor # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Anchor -> m Anchor # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Anchor -> m Anchor # | |
Semigroup Anchor | |
Show Anchor | |
Outputable Anchor | |
Defined in GHC.Parser.Annotation | |
Eq Anchor | |
Ord Anchor | |
Outputable (GenLocated Anchor EpaComment) | |
Defined in GHC.Parser.Annotation Methods ppr :: GenLocated Anchor EpaComment -> SDoc # |
Captures an annotation, storing the
and its
location. The parser only ever inserts AnnKeywordId
fields with a
RealSrcSpan being the original location of the annotation in the
source file.
The EpaLocation
can also store a delta position if the AST has been
modified and needs to be pretty printed again.
The usual way an EpaLocation
AddEpAnn
is created is using the mj
("make
jump") function, and then it can be inserted into the appropriate
annotation.
Constructors
AddEpAnn AnnKeywordId EpaLocation |
Instances
Data AddEpAnn | |
Defined in GHC.Parser.Annotation Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AddEpAnn -> c AddEpAnn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AddEpAnn # toConstr :: AddEpAnn -> Constr # dataTypeOf :: AddEpAnn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AddEpAnn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AddEpAnn) # gmapT :: (forall b. Data b => b -> b) -> AddEpAnn -> AddEpAnn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AddEpAnn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AddEpAnn -> r # gmapQ :: (forall d. Data d => d -> u) -> AddEpAnn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AddEpAnn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AddEpAnn -> m AddEpAnn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AddEpAnn -> m AddEpAnn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AddEpAnn -> m AddEpAnn # | |
Outputable AddEpAnn | |
Defined in GHC.Parser.Annotation | |
Eq AddEpAnn | |
Ord AddEpAnn | |
Defined in GHC.Parser.Annotation |
widenSpan :: SrcSpan -> [AddEpAnn] -> SrcSpan #
The annotations need to all come after the anchor. Make sure this is the case.
widenLocatedAn :: SrcSpanAnn' an -> [AddEpAnn] -> SrcSpanAnn' an #
widenAnchorR :: Anchor -> RealSrcSpan -> Anchor #
widenAnchor :: Anchor -> [AddEpAnn] -> Anchor #
unicodeAnn :: AnnKeywordId -> AnnKeywordId #
Convert a normal annotation into its unicode equivalent one
transferAnnsA :: SrcSpanAnnA -> SrcSpanAnnA -> (SrcSpanAnnA, SrcSpanAnnA) #
Transfer comments and trailing items from the annotations in the
first SrcSpanAnnA
argument to those in the second.
spanAsAnchor :: SrcSpan -> Anchor #
sortLocatedA :: [GenLocated (SrcSpanAnn' a) e] -> [GenLocated (SrcSpanAnn' a) e] #
setPriorComments :: EpAnnComments -> [LEpaComment] -> EpAnnComments #
setFollowingComments :: EpAnnComments -> [LEpaComment] -> EpAnnComments #
setCommentsSrcAnn :: Monoid ann => SrcAnn ann -> EpAnnComments -> SrcAnn ann #
Replace any existing comments on a SrcAnn
, used for manipulating the
AST prior to exact printing the changed one.
setCommentsEpAnn :: Monoid a => SrcSpan -> EpAnn a -> EpAnnComments -> EpAnn a #
Replace any existing comments, used for manipulating the AST prior to exact printing the changed one.
removeCommentsA :: SrcAnn ann -> SrcAnn ann #
Remove the comments, leaving the exact print annotations payload
realSrcSpan :: SrcSpan -> RealSrcSpan #
realSpanAsAnchor :: RealSrcSpan -> Anchor #
reAnnL :: ann -> EpAnnComments -> Located e -> GenLocated (SrcAnn ann) e #
reAnnC :: AnnContext -> EpAnnComments -> Located a -> LocatedC a #
reAnn :: [TrailingAnn] -> EpAnnComments -> Located a -> LocatedA a #
parenTypeKws :: ParenType -> (AnnKeywordId, AnnKeywordId) #
Maps the ParenType
to the related opening and closing
AnnKeywordId. Used when actually printing the item.
noSrcSpanA :: SrcAnn ann #
noComments :: EpAnnCO #
noAnnSrcSpan :: SrcSpan -> SrcAnn ann #
Short form for EpAnnNotUsed
na2la :: SrcSpanAnn' a -> SrcAnn ann #
Helper function (temporary) during transition of names Discards any annotations
mapLocA :: (a -> b) -> GenLocated SrcSpan a -> GenLocated (SrcAnn ann) b #
la2r :: SrcSpanAnn' a -> RealSrcSpan #
la2na :: SrcSpanAnn' a -> SrcSpanAnnN #
Helper function (temporary) during transition of names Discards any annotations
la2la :: LocatedAn ann1 a2 -> LocatedAn ann2 a2 #
Helper function (temporary) during transition of names Discards any annotations
l2n :: LocatedAn a1 a2 -> LocatedN a2 #
Helper function (temporary) during transition of names Discards any annotations
l2l :: SrcSpanAnn' a -> SrcAnn ann #
getLocAnn :: Located a -> SrcSpanAnnA #
getLocA :: GenLocated (SrcSpanAnn' a) e -> SrcSpan #
getDeltaLine :: DeltaPos -> Int #
extraToAnnList :: AnnList -> [AddEpAnn] -> AnnList #
epaLocationRealSrcSpan :: EpaLocation -> RealSrcSpan #
Used in the parser only, extract the SrcSpan
from an
EpaLocation
. The parser will never insert a DeltaPos
, so the
partial function is safe.
epaLocationFromSrcAnn :: SrcAnn ann -> EpaLocation #
epAnnComments :: EpAnn an -> EpAnnComments #
epAnnAnnsL :: EpAnn a -> [a] #
deltaPos :: Int -> Int -> DeltaPos #
Smart constructor for a DeltaPos
. It preserves the invariant
that for the DifferentLine
constructor deltaLine
is always > 0.
commentsOnlyA :: Monoid ann => SrcAnn ann -> SrcAnn ann #
Remove the exact print annotations payload, leaving only the anchor and comments.
comment :: RealSrcSpan -> EpAnnComments -> EpAnnCO #
combineLocsA :: Semigroup a => GenLocated (SrcAnn a) e1 -> GenLocated (SrcAnn a) e2 -> SrcAnn a #
annParen2AddEpAnn :: EpAnn AnnParen -> [AddEpAnn] #
addTrailingCommaToN :: SrcSpan -> EpAnn NameAnn -> EpaLocation -> EpAnn NameAnn #
Helper function used in the parser to add a comma location to an existing annotation.
addTrailingAnnToL :: SrcSpan -> TrailingAnn -> EpAnnComments -> EpAnn AnnList -> EpAnn AnnList #
Helper function used in the parser to add a TrailingAnn
items
to an existing annotation.
addTrailingAnnToA :: SrcSpan -> TrailingAnn -> EpAnnComments -> EpAnn AnnListItem -> EpAnn AnnListItem #
Helper function used in the parser to add a TrailingAnn
items
to an existing annotation.
addCommentsToSrcAnn :: Monoid ann => SrcAnn ann -> EpAnnComments -> SrcAnn ann #
Add additional comments to a SrcAnn
, used for manipulating the
AST prior to exact printing the changed one.
addCommentsToEpAnn :: Monoid a => SrcSpan -> EpAnn a -> EpAnnComments -> EpAnn a #
Add additional comments, used for manipulating the AST prior to exact printing the changed one.
addCLocAA :: GenLocated (SrcSpanAnn' a1) e1 -> GenLocated (SrcSpanAnn' a2) e2 -> e3 -> GenLocated (SrcAnn ann) e3 #
addCLocA :: GenLocated (SrcSpanAnn' a) e1 -> GenLocated SrcSpan e2 -> e3 -> GenLocated (SrcAnn ann) e3 #
Combine locations from two Located
things and add them to a third thing
addAnnsA :: SrcSpanAnnA -> [TrailingAnn] -> EpAnnComments -> SrcSpanAnnA #
Mult is a type alias for Type.
Mult must contain Type because multiplicity variables are mere type variables (of kind Multiplicity) in Haskell. So the simplest implementation is to make Mult be Type.
Multiplicities can be formed with: - One: GHC.Types.One (= oneDataCon) - Many: GHC.Types.Many (= manyDataCon) - Multiplication: GHC.Types.MultMul (= multMulTyCon)
So that Mult feels a bit more structured, we provide pattern synonyms and smart constructors for these.
data SpliceExplicitFlag #
Constructors
ExplicitSplice | = $(f x y) |
ImplicitSplice | = f x y, i.e. a naked top level expression |
Instances
Data SpliceExplicitFlag | |
Defined in GHC.Types.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SpliceExplicitFlag -> c SpliceExplicitFlag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SpliceExplicitFlag # toConstr :: SpliceExplicitFlag -> Constr # dataTypeOf :: SpliceExplicitFlag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SpliceExplicitFlag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SpliceExplicitFlag) # gmapT :: (forall b. Data b => b -> b) -> SpliceExplicitFlag -> SpliceExplicitFlag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SpliceExplicitFlag -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SpliceExplicitFlag -> r # gmapQ :: (forall d. Data d => d -> u) -> SpliceExplicitFlag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SpliceExplicitFlag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag # |
Instances
Data Fixity | |
Defined in GHC.Types.Fixity Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixity -> c Fixity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Fixity # toConstr :: Fixity -> Constr # dataTypeOf :: Fixity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Fixity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fixity) # gmapT :: (forall b. Data b => b -> b) -> Fixity -> Fixity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQ :: (forall d. Data d => d -> u) -> Fixity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # | |
Binary Fixity | |
Outputable Fixity | |
Defined in GHC.Types.Fixity | |
Eq Fixity | |
Name OccName GHC.Types.Name
nameOccName :: Name -> OccName #
occName :: HasOccName name => name -> OccName #
occNameString :: OccName -> String #
ppr :: Outputable a => a -> SDoc #
Outputable / GHC.Utils.Outputable
showSDocUnsafe :: SDoc -> String #
Panic / GHC.Utils.Panic
handleGhcException :: ExceptionMonad m => (GhcException -> m a) -> m a -> m a #
RdrName / GHC.Types.Name.Reader
Reader Name
Do not use the data constructors of RdrName directly: prefer the family
of functions that creates them, such as mkRdrUnqual
- Note: A Located RdrName will only have API Annotations if it is a compound one, e.g.
`bar` ( ~ )
AnnKeywordId
:AnnType
,AnnOpen
'('
or'['
or'[:'
,AnnClose
')'
or']'
or':]'
,,AnnBackquote
'`'
,AnnVal
AnnTilde
,
Constructors
Unqual OccName | Unqualified name Used for ordinary, unqualified occurrences, e.g. |
Qual ModuleName OccName | Qualified name A qualified name written by the user in
source code. The module isn't necessarily
the module where the thing is defined;
just the one from which it is imported.
Examples are |
Orig Module OccName | Original name An original name; the module is the defining module.
This is used when GHC generates code that will be fed
into the renamer (e.g. from deriving clauses), but where
we want to say "Use Prelude.map dammit". One of these
can be created with |
Exact Name | Exact name We know exactly the
Such a |
Instances
rdrNameOcc :: RdrName -> OccName #
SrcLoc / GHC.Types.SrcLoc
data GenLocated l e #
We attach SrcSpans to lots of things, so let's have a datatype for it.
Constructors
L l e |
Instances
pattern RealSrcLoc' :: RealSrcLoc -> SrcLoc Source #
pattern RealSrcSpan' :: RealSrcSpan -> SrcSpan Source #
data RealSrcSpan #
A SrcSpan
delimits a portion of a text file. It could be represented
by a pair of (line,column) coordinates, but in fact we optimise
slightly by using more compact representations for single-line and
zero-length spans, both of which are quite common.
The end position is defined to be the column after the end of the span. That is, a span of (1,1)-(1,2) is one character long, and a span of (1,1)-(1,1) is zero characters long.
Real Source Span
Instances
type SrcSpanLess a = a Source #
combineSrcSpans :: SrcSpan -> SrcSpan -> SrcSpan #
Combines two SrcSpan
into one that spans at least all the characters
within both spans. Returns UnhelpfulSpan if the files differ.
composeSrcSpan :: a -> a Source #
decomposeSrcSpan :: a -> a Source #
StringBuffer
stringToStringBuffer :: String -> StringBuffer #
Encode a String
into a StringBuffer
as UTF-8. The resulting buffer
is automatically managed by the garbage collector.
Misc
impliedXFlags :: [(Extension, TurnOnFlag, Extension)] #
Non-GHC stuff
type FunBind = HsMatchContext GhcPs Source #
type DoGenReplacement an ast a = (Data ast, Data a) => a -> (LocatedAn an ast -> Bool) -> LocatedAn an ast -> LocatedAn an ast -> StateT Bool IO (LocatedAn an ast) Source #
type MonadFail' = MonadFail Source #
type ReplaceWorker a mod = (Data a, Data mod) => mod -> Parser (LocatedA a) -> Int -> Refactoring SrcSpan -> IO mod Source #
annSpanToSrcSpan :: AnnSpan -> SrcSpan Source #
badAnnSpan :: AnnSpan Source #
parseModuleName :: SrcSpan -> Parser (LocatedA ModuleName) Source #
setAnnSpanFile :: FastString -> AnnSpan -> AnnSpan Source #
setSrcSpanFile :: FastString -> SrcSpan -> SrcSpan Source #
srcSpanToAnnSpan :: SrcSpan -> AnnSpan Source #
type AnnSpan = RealSrcSpan Source #