Safe Haskell | None |
---|---|
Language | Haskell2010 |
Attempt at hiding the GHC version differences we can.
Synopsis
- getHeaderImports :: DynFlags -> StringBuffer -> FilePath -> FilePath -> IO (Either ErrorMessages ([(Maybe FastString, Located ModuleName)], [(Maybe FastString, Located ModuleName)], Located ModuleName))
- data HieFileResult = HieFileResult {}
- data HieFile = HieFile {}
- newtype NameCacheUpdater = NCU {
- updateNameCache :: forall c. (NameCache -> (NameCache, c)) -> IO c
- hieExportNames :: HieFile -> [(SrcSpan, Name)]
- mkHieFile :: ModSummary -> TcGblEnv -> RenamedSource -> ByteString -> Hsc HieFile
- writeHieFile :: FilePath -> HieFile -> IO ()
- readHieFile :: NameCacheUpdater -> FilePath -> IO HieFileResult
- supportsHieFiles :: Bool
- setHieDir :: FilePath -> DynFlags -> DynFlags
- dontWriteHieFiles :: DynFlags -> DynFlags
- ml_hie_file :: ModLocation -> FilePath
- hPutStringBuffer :: Handle -> StringBuffer -> IO ()
- includePathsGlobal :: IncludeSpecs -> [String]
- includePathsQuote :: IncludeSpecs -> [String]
- addIncludePathsQuote :: FilePath -> DynFlags -> DynFlags
- getModuleHash :: ModIface -> Fingerprint
- getPackageName :: DynFlags -> InstalledUnitId -> Maybe PackageName
- pattern DerivD :: DerivDecl p -> HsDecl p
- pattern ForD :: ForeignDecl p -> HsDecl p
- pattern InstD :: InstDecl p -> HsDecl p
- pattern TyClD :: TyClDecl p -> HsDecl p
- pattern ValD :: HsBind p -> HsDecl p
- pattern SigD :: Sig p -> HsDecl p
- pattern TypeSig :: [Located (IdP p)] -> LHsSigWcType p -> Sig p
- pattern ClassOpSig :: Bool -> [Located (IdP pass)] -> LHsSigType pass -> Sig pass
- pattern IEThingAll :: LIEWrappedName (IdP pass) -> IE pass
- pattern IEThingWith :: LIEWrappedName (IdP pass) -> IEWildcard -> [LIEWrappedName (IdP pass)] -> [Located (FieldLbl (IdP pass))] -> IE pass
- pattern VarPat :: Located (IdP p) -> Pat p
- pattern PatSynBind :: PatSynBind p p -> HsBind p
- data ModLocation
- addBootSuffix :: FilePath -> FilePath
- pattern ModLocation :: Maybe FilePath -> FilePath -> FilePath -> ModLocation
- getConArgs :: ConDecl pass -> HsConDeclDetails pass
- class HasSrcSpan a
- getLoc :: HasSrcSpan a => a -> SrcSpan
- upNameCache :: IORef NameCache -> (NameCache -> (NameCache, c)) -> IO c
- parser :: String -> DynFlags -> FilePath -> (WarningMessages, Either ErrorMessages (Located (HsModule GhcPs)))
- obtainTermFromId :: GhcMonad m => Int -> Bool -> Id -> m Term
- obtainTermFromVal :: GhcMonad m => Int -> Bool -> Type -> a -> m Term
- getHistorySpan :: GhcMonad m => History -> m SrcSpan
- getGHCiMonad :: GhcMonad m => m Name
- setGHCiMonad :: GhcMonad m => String -> m ()
- moduleTrustReqs :: GhcMonad m => Module -> m (Bool, Set InstalledUnitId)
- isModuleTrusted :: GhcMonad m => Module -> m Bool
- lookupModule :: GhcMonad m => ModuleName -> Maybe FastString -> m Module
- findModule :: GhcMonad m => ModuleName -> Maybe FastString -> m Module
- showRichTokenStream :: [(Located Token, String)] -> String
- addSourceToTokens :: RealSrcLoc -> StringBuffer -> [Located Token] -> [(Located Token, String)]
- getRichTokenStream :: GhcMonad m => Module -> m [(Located Token, String)]
- getTokenStream :: GhcMonad m => Module -> m [Located Token]
- pprParenSymName :: NamedThing a => a -> SDoc
- dataConType :: DataCon -> Type
- getNameToInstancesIndex :: GhcMonad m => [Module] -> Maybe [Module] -> m (Messages, Maybe (NameEnv ([ClsInst], [FamInst])))
- getGRE :: GhcMonad m => m GlobalRdrEnv
- findGlobalAnns :: (GhcMonad m, Typeable a) => ([Word8] -> a) -> AnnTarget Name -> m [a]
- lookupGlobalName :: GhcMonad m => Name -> m (Maybe TyThing)
- isDictonaryId :: Id -> Bool
- modInfoModBreaks :: ModuleInfo -> ModBreaks
- modInfoSafe :: ModuleInfo -> SafeHaskellMode
- modInfoIface :: ModuleInfo -> Maybe ModIface
- modInfoLookupName :: GhcMonad m => ModuleInfo -> Name -> m (Maybe TyThing)
- mkPrintUnqualifiedForModule :: GhcMonad m => ModuleInfo -> m (Maybe PrintUnqualified)
- modInfoIsExportedName :: ModuleInfo -> Name -> Bool
- modInfoInstances :: ModuleInfo -> [ClsInst]
- modInfoExportsWithSelectors :: ModuleInfo -> [Name]
- modInfoExports :: ModuleInfo -> [Name]
- modInfoTopLevelScope :: ModuleInfo -> Maybe [Name]
- modInfoTyThings :: ModuleInfo -> [TyThing]
- getModuleInfo :: GhcMonad m => Module -> m (Maybe ModuleInfo)
- getPrintUnqual :: GhcMonad m => m PrintUnqualified
- getInsts :: GhcMonad m => m ([ClsInst], [FamInst])
- getBindings :: GhcMonad m => m [TyThing]
- isLoaded :: GhcMonad m => ModuleName -> m Bool
- getModuleGraph :: GhcMonad m => m ModuleGraph
- compileToCoreSimplified :: GhcMonad m => FilePath -> m CoreModule
- compileToCoreModule :: GhcMonad m => FilePath -> m CoreModule
- loadModule :: (TypecheckedMod mod, GhcMonad m) => mod -> m mod
- desugarModule :: GhcMonad m => TypecheckedModule -> m DesugaredModule
- typecheckModule :: GhcMonad m => ParsedModule -> m TypecheckedModule
- parseModule :: GhcMonad m => ModSummary -> m ParsedModule
- getModSummary :: GhcMonad m => ModuleName -> m ModSummary
- workingDirectoryChanged :: GhcMonad m => m ()
- guessTarget :: GhcMonad m => String -> Maybe Phase -> m Target
- removeTarget :: GhcMonad m => TargetId -> m ()
- addTarget :: GhcMonad m => Target -> m ()
- getTargets :: GhcMonad m => m [Target]
- setTargets :: GhcMonad m => [Target] -> m ()
- parseDynamicFlags :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
- getInteractiveDynFlags :: GhcMonad m => m DynFlags
- setInteractiveDynFlags :: GhcMonad m => DynFlags -> m ()
- getProgramDynFlags :: GhcMonad m => m DynFlags
- setLogAction :: GhcMonad m => LogAction -> m ()
- setProgramDynFlags :: GhcMonad m => DynFlags -> m [InstalledUnitId]
- setSessionDynFlags :: GhcMonad m => DynFlags -> m [InstalledUnitId]
- initGhcMonad :: GhcMonad m => Maybe FilePath -> m ()
- withCleanupSession :: GhcMonad m => m a -> m a
- runGhcT :: ExceptionMonad m => Maybe FilePath -> GhcT m a -> m a
- runGhc :: Maybe FilePath -> Ghc a -> IO a
- defaultCleanupHandler :: ExceptionMonad m => DynFlags -> m a -> m a
- defaultErrorHandler :: ExceptionMonad m => FatalMessager -> FlushOut -> m a -> m a
- class ParsedMod m where
- parsedSource :: m -> ParsedSource
- class ParsedMod m => TypecheckedMod m where
- renamedSource :: m -> Maybe RenamedSource
- typecheckedSource :: m -> TypecheckedSource
- moduleInfo :: m -> ModuleInfo
- data ParsedModule = ParsedModule {}
- data TypecheckedModule = TypecheckedModule {}
- data DesugaredModule = DesugaredModule {}
- type ParsedSource = Located (HsModule GhcPs)
- type RenamedSource = (HsGroup GhcRn, [LImportDecl GhcRn], Maybe [(LIE GhcRn, Avails)], Maybe LHsDocString)
- type TypecheckedSource = LHsBinds GhcTc
- data CoreModule = CoreModule {
- cm_module :: !Module
- cm_types :: !TypeEnv
- cm_binds :: CoreProgram
- cm_safe :: SafeHaskellMode
- data ModuleInfo
- cyclicModuleErr :: [ModSummary] -> SDoc
- topSortModuleGraph :: Bool -> ModuleGraph -> Maybe ModuleName -> [SCC ModSummary]
- load :: GhcMonad m => LoadHowMuch -> m SuccessFlag
- depanal :: GhcMonad m => [ModuleName] -> Bool -> m ModuleGraph
- data LoadHowMuch
- reconstructType :: HscEnv -> Int -> Id -> IO (Maybe Type)
- moduleIsBootOrNotObjectLinkable :: GhcMonad m => ModSummary -> m Bool
- showModule :: GhcMonad m => ModSummary -> m String
- dynCompileExpr :: GhcMonad m => String -> m Dynamic
- compileParsedExpr :: GhcMonad m => LHsExpr GhcPs -> m HValue
- compileParsedExprRemote :: GhcMonad m => LHsExpr GhcPs -> m ForeignHValue
- compileExprRemote :: GhcMonad m => String -> m ForeignHValue
- compileExpr :: GhcMonad m => String -> m HValue
- parseExpr :: GhcMonad m => String -> m (LHsExpr GhcPs)
- typeKind :: GhcMonad m => Bool -> String -> m (Type, Kind)
- exprType :: GhcMonad m => TcRnExprMode -> String -> m Type
- getDocs :: GhcMonad m => Name -> m (Either GetDocsFailure (Maybe HsDocString, Map Int HsDocString))
- isDecl :: DynFlags -> String -> Bool
- isImport :: DynFlags -> String -> Bool
- hasImport :: DynFlags -> String -> Bool
- isStmt :: DynFlags -> String -> Bool
- parseName :: GhcMonad m => String -> m [Name]
- getRdrNamesInScope :: GhcMonad m => m [RdrName]
- getNamesInScope :: GhcMonad m => m [Name]
- getInfo :: GhcMonad m => Bool -> Name -> m (Maybe (TyThing, Fixity, [ClsInst], [FamInst], SDoc))
- moduleIsInterpreted :: GhcMonad m => Module -> m Bool
- getContext :: GhcMonad m => m [InteractiveImport]
- setContext :: GhcMonad m => [InteractiveImport] -> m ()
- abandonAll :: GhcMonad m => m Bool
- abandon :: GhcMonad m => m Bool
- forward :: GhcMonad m => Int -> m ([Name], Int, SrcSpan, String)
- back :: GhcMonad m => Int -> m ([Name], Int, SrcSpan, String)
- resumeExec :: GhcMonad m => (SrcSpan -> Bool) -> SingleStep -> m ExecResult
- parseImportDecl :: GhcMonad m => String -> m (ImportDecl GhcPs)
- runDeclsWithLocation :: GhcMonad m => String -> Int -> String -> m [Name]
- runDecls :: GhcMonad m => String -> m [Name]
- execStmt :: GhcMonad m => String -> ExecOptions -> m ExecResult
- execOptions :: ExecOptions
- getHistoryModule :: History -> Module
- getResumeContext :: GhcMonad m => m [Resume]
- data GetDocsFailure
- runTcInteractive :: HscEnv -> TcRn a -> IO (Messages, Maybe a)
- data TcRnExprMode
- pprFamInst :: FamInst -> SDoc
- defaultWarnErrLogger :: WarnErrLogger
- printException :: GhcMonad m => SourceError -> m ()
- getSessionDynFlags :: GhcMonad m => m DynFlags
- class (Functor m, MonadIO m, ExceptionMonad m, HasDynFlags m) => GhcMonad (m :: Type -> Type) where
- getSession :: m HscEnv
- setSession :: HscEnv -> m ()
- data Ghc a
- data GhcT (m :: Type -> Type) a
- type WarnErrLogger = forall (m :: Type -> Type). GhcMonad m => Maybe SourceError -> m ()
- ms_mod_name :: ModSummary -> ModuleName
- mkModuleGraph :: [ModSummary] -> ModuleGraph
- emptyMG :: ModuleGraph
- mgLookupModule :: ModuleGraph -> Module -> Maybe ModSummary
- mgModSummaries :: ModuleGraph -> [ModSummary]
- mapMG :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph
- needsTemplateHaskellOrQQ :: ModuleGraph -> Bool
- handleSourceError :: ExceptionMonad m => (SourceError -> m a) -> m a -> m a
- data HscEnv
- data Target = Target {}
- data TargetId
- data ModIface = ModIface {
- mi_module :: !Module
- mi_sig_of :: !(Maybe Module)
- mi_iface_hash :: !Fingerprint
- mi_mod_hash :: !Fingerprint
- mi_flag_hash :: !Fingerprint
- mi_opt_hash :: !Fingerprint
- mi_hpc_hash :: !Fingerprint
- mi_plugin_hash :: !Fingerprint
- mi_orphan :: !WhetherHasOrphans
- mi_finsts :: !WhetherHasFamInst
- mi_hsc_src :: !HscSource
- mi_deps :: Dependencies
- mi_usages :: [Usage]
- mi_exports :: ![IfaceExport]
- mi_exp_hash :: !Fingerprint
- mi_used_th :: !Bool
- mi_fixities :: [(OccName, Fixity)]
- mi_warns :: Warnings
- mi_anns :: [IfaceAnnotation]
- mi_decls :: [(Fingerprint, IfaceDecl)]
- mi_globals :: !(Maybe GlobalRdrEnv)
- mi_insts :: [IfaceClsInst]
- mi_fam_insts :: [IfaceFamInst]
- mi_rules :: [IfaceRule]
- mi_orphan_hash :: !Fingerprint
- mi_warn_fn :: OccName -> Maybe WarningTxt
- mi_fix_fn :: OccName -> Maybe Fixity
- mi_hash_fn :: OccName -> Maybe (OccName, Fingerprint)
- mi_hpc :: !AnyHpcUsage
- mi_trust :: !IfaceTrustInfo
- mi_trust_pkg :: !Bool
- mi_complete_sigs :: [IfaceCompleteMatch]
- mi_doc_hdr :: Maybe HsDocString
- mi_decl_docs :: DeclDocMap
- mi_arg_docs :: ArgDocMap
- data InteractiveImport
- data ModuleGraph
- data ModSummary = ModSummary {
- ms_mod :: Module
- ms_hsc_src :: HscSource
- ms_location :: ModLocation
- ms_hs_date :: UTCTime
- ms_obj_date :: Maybe UTCTime
- ms_iface_date :: Maybe UTCTime
- ms_srcimps :: [(Maybe FastString, Located ModuleName)]
- ms_textual_imps :: [(Maybe FastString, Located ModuleName)]
- ms_parsed_mod :: Maybe HsParsedModule
- ms_hspp_file :: FilePath
- ms_hspp_opts :: DynFlags
- ms_hspp_buf :: Maybe StringBuffer
- data HsModule pass = HsModule {
- hsmodName :: Maybe (Located ModuleName)
- hsmodExports :: Maybe (Located [LIE pass])
- hsmodImports :: [LImportDecl pass]
- hsmodDecls :: [LHsDecl pass]
- hsmodDeprecMessage :: Maybe (Located WarningTxt)
- hsmodHaddockModHeader :: Maybe LHsDocString
- lPatImplicits :: LPat GhcRn -> NameSet
- hsValBindsImplicits :: HsValBindsLR GhcRn (GhcPass idR) -> NameSet
- lStmtsImplicits :: [LStmtLR GhcRn (GhcPass idR) (Located (body (GhcPass idR)))] -> NameSet
- hsDataFamInstBinders :: DataFamInstDecl pass -> ([Located (IdP pass)], [LFieldOcc pass])
- getPatSynBinds :: [(RecFlag, LHsBinds id)] -> [PatSynBind id id]
- hsPatSynSelectors :: HsValBinds (GhcPass p) -> [IdP (GhcPass p)]
- hsForeignDeclsBinders :: [LForeignDecl pass] -> [Located (IdP pass)]
- hsLTyClDeclBinders :: Located (TyClDecl pass) -> ([Located (IdP pass)], [LFieldOcc pass])
- hsTyClForeignBinders :: [TyClGroup GhcRn] -> [LForeignDecl GhcRn] -> [Name]
- hsGroupBinders :: HsGroup GhcRn -> [Name]
- collectPatsBinders :: [LPat a] -> [IdP a]
- collectPatBinders :: LPat a -> [IdP a]
- collectStmtBinders :: StmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
- collectLStmtBinders :: LStmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
- collectStmtsBinders :: [StmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
- collectLStmtsBinders :: [LStmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
- collectMethodBinders :: LHsBindsLR idL idR -> [Located (IdP idL)]
- collectHsBindListBinders :: [LHsBindLR idL idR] -> [IdP idL]
- collectHsBindsBinders :: LHsBindsLR idL idR -> [IdP idL]
- collectHsBindBinders :: HsBindLR idL idR -> [IdP idL]
- collectHsValBinders :: HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- collectHsIdBinders :: HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- collectLocalBinders :: HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- isBangedHsBind :: HsBind GhcTc -> Bool
- isUnliftedHsBind :: HsBind GhcTc -> Bool
- mkMatch :: HsMatchContext (NameOrRdrName (IdP (GhcPass p))) -> [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> Located (HsLocalBinds (GhcPass p)) -> LMatch (GhcPass p) (LHsExpr (GhcPass p))
- mkPrefixFunRhs :: Located id -> HsMatchContext id
- mk_easy_FunBind :: SrcSpan -> RdrName -> [LPat GhcPs] -> LHsExpr GhcPs -> LHsBind GhcPs
- isInfixFunBind :: HsBindLR id1 id2 -> Bool
- mkPatSynBind :: Located RdrName -> HsPatSynDetails (Located RdrName) -> LPat GhcPs -> HsPatSynDir GhcPs -> HsBind GhcPs
- mkVarBind :: IdP (GhcPass p) -> LHsExpr (GhcPass p) -> LHsBind (GhcPass p)
- mkHsVarBind :: SrcSpan -> RdrName -> LHsExpr GhcPs -> LHsBind GhcPs
- mkTopFunBind :: Origin -> Located Name -> [LMatch GhcRn (LHsExpr GhcRn)] -> HsBind GhcRn
- mkFunBind :: Located RdrName -> [LMatch GhcPs (LHsExpr GhcPs)] -> HsBind GhcPs
- mkHsDictLet :: TcEvBinds -> LHsExpr GhcTc -> LHsExpr GhcTc
- mkHsWrapPatCo :: TcCoercionN -> Pat (GhcPass id) -> Type -> Pat (GhcPass id)
- mkHsWrapPat :: HsWrapper -> Pat (GhcPass id) -> Type -> Pat (GhcPass id)
- mkLHsCmdWrap :: HsWrapper -> LHsCmd (GhcPass p) -> LHsCmd (GhcPass p)
- mkHsCmdWrap :: HsWrapper -> HsCmd (GhcPass p) -> HsCmd (GhcPass p)
- mkLHsWrapCo :: TcCoercionN -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- mkHsWrapCoR :: TcCoercionR -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)
- mkHsWrapCo :: TcCoercionN -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)
- mkHsWrap :: HsWrapper -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)
- mkLHsWrap :: HsWrapper -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- typeToLHsType :: Type -> LHsType GhcPs
- mkClassOpSigs :: [LSig GhcPs] -> [LSig GhcPs]
- mkHsSigEnv :: (LSig GhcRn -> Maybe ([Located Name], a)) -> [LSig GhcRn] -> NameEnv a
- mkLHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs
- mkLHsSigType :: LHsType GhcPs -> LHsSigType GhcPs
- chunkify :: [a] -> [[a]]
- mkChunkified :: ([a] -> a) -> [a] -> a
- mkBigLHsPatTup :: [LPat GhcRn] -> LPat GhcRn
- mkBigLHsVarPatTup :: [IdP GhcRn] -> LPat GhcRn
- mkBigLHsTup :: [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- mkBigLHsVarTup :: [IdP (GhcPass id)] -> LHsExpr (GhcPass id)
- missingTupArg :: HsTupArg GhcPs
- nlTuplePat :: [LPat GhcPs] -> Boxity -> LPat GhcPs
- mkLHsVarTuple :: [IdP (GhcPass a)] -> LHsExpr (GhcPass a)
- mkLHsTupleExpr :: [LHsExpr (GhcPass a)] -> LHsExpr (GhcPass a)
- nlHsTyConApp :: IdP (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p)
- nlHsParTy :: LHsType (GhcPass p) -> LHsType (GhcPass p)
- nlHsFunTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- nlHsTyVar :: IdP (GhcPass p) -> LHsType (GhcPass p)
- nlHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- nlList :: [LHsExpr GhcPs] -> LHsExpr GhcPs
- nlHsCase :: LHsExpr GhcPs -> [LMatch GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs
- nlHsIf :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- nlHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- nlHsLam :: LMatch GhcPs (LHsExpr GhcPs) -> LHsExpr GhcPs
- nlHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs
- nlHsDo :: HsStmtContext Name -> [LStmt GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs
- nlWildPatName :: LPat GhcRn
- nlWildPat :: LPat GhcPs
- nlWildConPat :: DataCon -> LPat GhcPs
- nlNullaryConPat :: IdP id -> LPat id
- nlConPatName :: Name -> [LPat GhcRn] -> LPat GhcRn
- nlConPat :: RdrName -> [LPat GhcPs] -> LPat GhcPs
- nlInfixConPat :: RdrName -> LPat GhcPs -> LPat GhcPs -> LPat GhcPs
- nlConVarPatName :: Name -> [Name] -> LPat GhcRn
- nlConVarPat :: RdrName -> [RdrName] -> LPat GhcPs
- nlHsVarApps :: IdP (GhcPass id) -> [IdP (GhcPass id)] -> LHsExpr (GhcPass id)
- nlHsApps :: IdP (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- nlHsSyntaxApps :: SyntaxExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- nlHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- nlLitPat :: HsLit GhcPs -> LPat GhcPs
- nlVarPat :: IdP (GhcPass id) -> LPat (GhcPass id)
- nlHsIntLit :: Integer -> LHsExpr (GhcPass p)
- nlHsLit :: HsLit (GhcPass p) -> LHsExpr (GhcPass p)
- nlHsDataCon :: DataCon -> LHsExpr GhcTc
- nlHsVar :: IdP (GhcPass id) -> LHsExpr (GhcPass id)
- userHsTyVarBndrs :: SrcSpan -> [IdP (GhcPass p)] -> [LHsTyVarBndr (GhcPass p)]
- userHsLTyVarBndrs :: SrcSpan -> [Located (IdP (GhcPass p))] -> [LHsTyVarBndr (GhcPass p)]
- mkHsStringPrimLit :: FastString -> HsLit (GhcPass p)
- mkHsString :: String -> HsLit (GhcPass p)
- unqualQuasiQuote :: RdrName
- mkHsQuasiQuote :: RdrName -> SrcSpan -> FastString -> HsSplice GhcPs
- mkHsSpliceTy :: SpliceDecoration -> LHsExpr GhcPs -> HsType GhcPs
- mkHsSpliceTE :: SpliceDecoration -> LHsExpr GhcPs -> HsExpr GhcPs
- mkHsSpliceE :: SpliceDecoration -> LHsExpr GhcPs -> HsExpr GhcPs
- mkUntypedSplice :: SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs
- mkHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> HsExpr GhcPs
- mkRecStmt :: [LStmtLR (GhcPass idL) GhcPs bodyR] -> StmtLR (GhcPass idL) GhcPs bodyR
- emptyRecStmtId :: StmtLR GhcTc GhcTc bodyR
- emptyRecStmtName :: StmtLR GhcRn GhcRn bodyR
- emptyRecStmt :: StmtLR (GhcPass idL) GhcPs bodyR
- unitRecStmtTc :: RecStmtTc
- mkTcBindStmt :: LPat GhcTc -> Located (bodyR GhcTc) -> StmtLR GhcTc GhcTc (Located (bodyR GhcTc))
- mkBindStmt :: XBindStmt (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR))) ~ NoExt => LPat (GhcPass idL) -> Located (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR)))
- mkBodyStmt :: Located (bodyR GhcPs) -> StmtLR (GhcPass idL) GhcPs (Located (bodyR GhcPs))
- mkLastStmt :: Located (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR)))
- mkGroupByUsingStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- mkGroupUsingStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- mkTransformByStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- mkTransformStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- emptyTransStmt :: StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- mkNPlusKPat :: Located RdrName -> Located (HsOverLit GhcPs) -> Pat GhcPs
- mkNPat :: Located (HsOverLit GhcPs) -> Maybe (SyntaxExpr GhcPs) -> Pat GhcPs
- mkHsIf :: LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) -> HsExpr (GhcPass p)
- mkHsComp :: HsStmtContext Name -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> HsExpr GhcPs
- mkHsDo :: HsStmtContext Name -> [ExprLStmt GhcPs] -> HsExpr GhcPs
- mkHsIsString :: SourceText -> FastString -> HsOverLit GhcPs
- mkHsFractional :: FractionalLit -> HsOverLit GhcPs
- mkHsIntegral :: IntegralLit -> HsOverLit GhcPs
- nlParPat :: LPat (GhcPass name) -> LPat (GhcPass name)
- mkParPat :: LPat (GhcPass name) -> LPat (GhcPass name)
- mkLHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- nlHsTyApps :: IdP (GhcPass id) -> [Type] -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- nlHsTyApp :: IdP (GhcPass id) -> [Type] -> LHsExpr (GhcPass id)
- mkHsCaseAlt :: LPat (GhcPass p) -> Located (body (GhcPass p)) -> LMatch (GhcPass p) (Located (body (GhcPass p)))
- mkHsLams :: [TyVar] -> [EvVar] -> LHsExpr GhcTc -> LHsExpr GhcTc
- mkHsLam :: [LPat GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs
- mkHsAppTypes :: LHsExpr GhcRn -> [LHsWcType GhcRn] -> LHsExpr GhcRn
- mkHsAppType :: XAppTypeE (GhcPass id) ~ LHsWcType GhcRn => LHsExpr (GhcPass id) -> LHsWcType GhcRn -> LHsExpr (GhcPass id)
- mkHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- mkMatchGroup :: XMG name (Located (body name)) ~ NoExt => Origin -> [LMatch name (Located (body name))] -> MatchGroup name (Located (body name))
- unguardedRHS :: SrcSpan -> Located (body (GhcPass p)) -> [LGRHS (GhcPass p) (Located (body (GhcPass p)))]
- unguardedGRHSs :: Located (body (GhcPass p)) -> GRHSs (GhcPass p) (Located (body (GhcPass p)))
- mkSimpleMatch :: HsMatchContext (NameOrRdrName (IdP (GhcPass p))) -> [LPat (GhcPass p)] -> Located (body (GhcPass p)) -> LMatch (GhcPass p) (Located (body (GhcPass p)))
- mkHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- pprStmtInCtxt :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR), Outputable body) => HsStmtContext (IdP (GhcPass idL)) -> StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
- pprMatchInCtxt :: (OutputableBndrId (GhcPass idR), Outputable (NameOrRdrName (NameOrRdrName (IdP (GhcPass idR)))), Outputable body) => Match (GhcPass idR) body -> SDoc
- matchContextErrString :: Outputable id => HsMatchContext id -> SDoc
- pprStmtContext :: (Outputable id, Outputable (NameOrRdrName id)) => HsStmtContext id -> SDoc
- pprAStmtContext :: (Outputable id, Outputable (NameOrRdrName id)) => HsStmtContext id -> SDoc
- pprMatchContextNoun :: (Outputable (NameOrRdrName id), Outputable id) => HsMatchContext id -> SDoc
- pprMatchContext :: (Outputable (NameOrRdrName id), Outputable id) => HsMatchContext id -> SDoc
- matchSeparator :: HsMatchContext id -> SDoc
- isMonadFailStmtContext :: HsStmtContext id -> Bool
- isListCompExpr :: HsStmtContext id -> Bool
- isPatSynCtxt :: HsMatchContext id -> Bool
- pp_dotdot :: SDoc
- thTyBrackets :: SDoc -> SDoc
- thBrackets :: SDoc -> SDoc -> SDoc
- pprHsBracket :: OutputableBndrId (GhcPass p) => HsBracket (GhcPass p) -> SDoc
- isTypedBracket :: HsBracket id -> Bool
- ppr_splice :: OutputableBndrId (GhcPass p) => SDoc -> IdP (GhcPass p) -> LHsExpr (GhcPass p) -> SDoc -> SDoc
- ppr_quasi :: OutputableBndr p => p -> p -> FastString -> SDoc
- ppr_splice_decl :: OutputableBndrId (GhcPass p) => HsSplice (GhcPass p) -> SDoc
- pprPendingSplice :: OutputableBndrId (GhcPass p) => SplicePointName -> LHsExpr (GhcPass p) -> SDoc
- isTypedSplice :: HsSplice id -> Bool
- pprQuals :: (OutputableBndrId (GhcPass p), Outputable body) => [LStmt (GhcPass p) body] -> SDoc
- pprComp :: (OutputableBndrId (GhcPass p), Outputable body) => [LStmt (GhcPass p) body] -> SDoc
- ppr_do_stmts :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR), Outputable body) => [LStmtLR (GhcPass idL) (GhcPass idR) body] -> SDoc
- pprDo :: (OutputableBndrId (GhcPass p), Outputable body) => HsStmtContext any -> [LStmt (GhcPass p) body] -> SDoc
- pprBy :: Outputable body => Maybe body -> SDoc
- pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc
- pprTransformStmt :: OutputableBndrId (GhcPass p) => [IdP (GhcPass p)] -> LHsExpr (GhcPass p) -> Maybe (LHsExpr (GhcPass p)) -> SDoc
- pprStmt :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR), Outputable body) => StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
- pp_rhs :: Outputable body => HsMatchContext idL -> body -> SDoc
- pprGRHS :: (OutputableBndrId (GhcPass idR), Outputable body) => HsMatchContext idL -> GRHS (GhcPass idR) body -> SDoc
- pprGRHSs :: (OutputableBndrId (GhcPass idR), Outputable body) => HsMatchContext idL -> GRHSs (GhcPass idR) body -> SDoc
- pprMatch :: (OutputableBndrId (GhcPass idR), Outputable body) => Match (GhcPass idR) body -> SDoc
- pprMatches :: (OutputableBndrId (GhcPass idR), Outputable body) => MatchGroup (GhcPass idR) body -> SDoc
- hsLMatchPats :: LMatch id body -> [LPat id]
- matchGroupArity :: MatchGroup id body -> Arity
- isSingletonMatchGroup :: [LMatch id body] -> Bool
- isEmptyMatchGroup :: MatchGroup id body -> Bool
- isInfixMatch :: Match id body -> Bool
- pprCmdArg :: OutputableBndrId (GhcPass p) => HsCmdTop (GhcPass p) -> SDoc
- ppr_cmd :: OutputableBndrId (GhcPass p) => HsCmd (GhcPass p) -> SDoc
- ppr_lcmd :: OutputableBndrId (GhcPass p) => LHsCmd (GhcPass p) -> SDoc
- isQuietHsCmd :: HsCmd id -> Bool
- pprCmd :: OutputableBndrId (GhcPass p) => HsCmd (GhcPass p) -> SDoc
- pprLCmd :: OutputableBndrId (GhcPass p) => LHsCmd (GhcPass p) -> SDoc
- isAtomicHsExpr :: HsExpr id -> Bool
- parenthesizeHsExpr :: PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
- hsExprNeedsParens :: PprPrec -> HsExpr p -> Bool
- pprParendExpr :: OutputableBndrId (GhcPass p) => PprPrec -> HsExpr (GhcPass p) -> SDoc
- pprParendLExpr :: OutputableBndrId (GhcPass p) => PprPrec -> LHsExpr (GhcPass p) -> SDoc
- pprDebugParendExpr :: OutputableBndrId (GhcPass p) => PprPrec -> LHsExpr (GhcPass p) -> SDoc
- pprExternalSrcLoc :: (StringLiteral, (Int, Int), (Int, Int)) -> SDoc
- ppr_apps :: OutputableBndrId (GhcPass p) => HsExpr (GhcPass p) -> [Either (LHsExpr (GhcPass p)) (XAppTypeE (GhcPass p))] -> SDoc
- ppr_expr :: OutputableBndrId (GhcPass p) => HsExpr (GhcPass p) -> SDoc
- ppr_lexpr :: OutputableBndrId (GhcPass p) => LHsExpr (GhcPass p) -> SDoc
- pprBinds :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR)) => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
- isQuietHsExpr :: HsExpr id -> Bool
- tupArgPresent :: LHsTupArg id -> Bool
- unboundVarOcc :: UnboundVar -> OccName
- mkRnSyntaxExpr :: Name -> SyntaxExpr GhcRn
- noSyntaxExpr :: SyntaxExpr (GhcPass p)
- noExpr :: HsExpr (GhcPass p)
- type PostTcExpr = HsExpr GhcTc
- type PostTcTable = [(Name, PostTcExpr)]
- type CmdSyntaxTable p = [(Name, HsExpr p)]
- data UnboundVar
- data RecordConTc = RecordConTc {}
- data RecordUpdTc = RecordUpdTc {
- rupd_cons :: [ConLike]
- rupd_in_tys :: [Type]
- rupd_out_tys :: [Type]
- rupd_wrap :: HsWrapper
- type LHsTupArg id = Located (HsTupArg id)
- data HsTupArg id
- type LHsCmd id = Located (HsCmd id)
- data HsArrAppType
- type LHsCmdTop p = Located (HsCmdTop p)
- data HsCmdTop p
- data CmdTopTc = CmdTopTc Type Type (CmdSyntaxTable GhcTc)
- type HsRecordBinds p = HsRecFields p (LHsExpr p)
- data MatchGroupTc = MatchGroupTc {
- mg_arg_tys :: [Type]
- mg_res_ty :: Type
- type LMatch id body = Located (Match id body)
- data Match p body
- type LGRHS id body = Located (GRHS id body)
- data GRHS p body
- = GRHS (XCGRHS p body) [GuardLStmt p] body
- | XGRHS (XXGRHS p body)
- type LStmt id body = Located (StmtLR id id body)
- type LStmtLR idL idR body = Located (StmtLR idL idR body)
- type Stmt id body = StmtLR id id body
- type CmdLStmt id = LStmt id (LHsCmd id)
- type CmdStmt id = Stmt id (LHsCmd id)
- type ExprLStmt id = LStmt id (LHsExpr id)
- type ExprStmt id = Stmt id (LHsExpr id)
- type GuardLStmt id = LStmt id (LHsExpr id)
- type GuardStmt id = Stmt id (LHsExpr id)
- type GhciLStmt id = LStmt id (LHsExpr id)
- type GhciStmt id = Stmt id (LHsExpr id)
- data StmtLR idL idR body
- = LastStmt (XLastStmt idL idR body) body Bool (SyntaxExpr idR)
- | BindStmt (XBindStmt idL idR body) (LPat idL) body (SyntaxExpr idR) (SyntaxExpr idR)
- | 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) (LHsLocalBindsLR idL idR)
- | ParStmt (XParStmt idL idR body) [ParStmtBlock idL idR] (HsExpr idR) (SyntaxExpr idR)
- | TransStmt { }
- | RecStmt {
- recS_ext :: XRecStmt idL idR body
- recS_stmts :: [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 RecStmtTc = RecStmtTc {
- recS_bind_ty :: Type
- recS_later_rets :: [PostTcExpr]
- recS_rec_rets :: [PostTcExpr]
- recS_ret_ty :: Type
- data TransForm
- data ParStmtBlock idL idR
- = ParStmtBlock (XParStmtBlock idL idR) [ExprLStmt idL] [IdP idR] (SyntaxExpr idR)
- | XParStmtBlock (XXParStmtBlock idL idR)
- data ApplicativeArg idL
- = ApplicativeArgOne (XApplicativeArgOne idL) (LPat idL) (LHsExpr idL) Bool
- | ApplicativeArgMany (XApplicativeArgMany idL) [ExprLStmt idL] (HsExpr idL) (LPat idL)
- | XApplicativeArg (XXApplicativeArg idL)
- data SpliceDecoration
- newtype ThModFinalizers = ThModFinalizers [ForeignRef (Q ())]
- data HsSplicedThing id
- = HsSplicedExpr (HsExpr id)
- | HsSplicedTy (HsType id)
- | HsSplicedPat (Pat id)
- type SplicePointName = Name
- data PendingRnSplice = PendingRnSplice UntypedSpliceFlavour SplicePointName (LHsExpr GhcRn)
- data UntypedSpliceFlavour
- data PendingTcSplice = PendingTcSplice SplicePointName (LHsExpr GhcTc)
- data HsBracket p
- data ArithSeqInfo id
- data HsMatchContext id
- = FunRhs { }
- | LambdaExpr
- | CaseAlt
- | IfAlt
- | ProcExpr
- | PatBindRhs
- | PatBindGuards
- | RecUpd
- | StmtCtxt (HsStmtContext id)
- | ThPatSplice
- | ThPatQuote
- | PatSyn
- data HsStmtContext id
- = ListComp
- | MonadComp
- | DoExpr
- | MDoExpr
- | ArrowExpr
- | GhciStmtCtxt
- | PatGuard (HsMatchContext id)
- | ParStmtCtxt (HsStmtContext id)
- | TransStmtCtxt (HsStmtContext id)
- roleAnnotDeclName :: RoleAnnotDecl pass -> IdP pass
- annProvenanceName_maybe :: AnnProvenance name -> Maybe name
- docDeclDoc :: DocDecl -> HsDocString
- pprFullRuleName :: Located (SourceText, RuleName) -> SDoc
- collectRuleBndrSigTys :: [RuleBndr pass] -> [LHsSigWcType pass]
- flattenRuleDecls :: [LRuleDecls pass] -> [LRuleDecl pass]
- derivStrategyName :: DerivStrategy a -> SDoc
- instDeclDataFamInsts :: [LInstDecl pass] -> [DataFamInstDecl pass]
- pprFamInstLHS :: OutputableBndrId (GhcPass p) => Located (IdP (GhcPass p)) -> HsTyPats (GhcPass p) -> LexicalFixity -> HsContext (GhcPass p) -> Maybe (LHsKind (GhcPass p)) -> SDoc
- pprDataFamInstFlavour :: DataFamInstDecl (GhcPass p) -> SDoc
- hsConDeclTheta :: Maybe (LHsContext pass) -> [LHsType pass]
- hsConDeclArgTys :: HsConDeclDetails pass -> [LBangType pass]
- getConNames :: ConDecl pass -> [Located (IdP pass)]
- newOrDataToFlavour :: NewOrData -> TyConFlavour
- resultVariableName :: FamilyResultSig a -> Maybe (IdP a)
- famDeclHasCusk :: Maybe Bool -> FamilyDecl pass -> Bool
- mkTyClGroup :: [LTyClDecl (GhcPass p)] -> [LInstDecl (GhcPass p)] -> TyClGroup (GhcPass p)
- tyClGroupRoleDecls :: [TyClGroup pass] -> [LRoleAnnotDecl pass]
- tyClGroupInstDecls :: [TyClGroup pass] -> [LInstDecl pass]
- tyClGroupTyClDecls :: [TyClGroup pass] -> [LTyClDecl pass]
- emptyTyClGroup :: TyClGroup (GhcPass p)
- pprTyClDeclFlavour :: TyClDecl (GhcPass p) -> SDoc
- hsDeclHasCusk :: TyClDecl GhcRn -> Bool
- countTyClDecls :: [TyClDecl pass] -> (Int, Int, Int, Int, Int)
- tyClDeclTyVars :: TyClDecl pass -> LHsQTyVars pass
- tcdName :: TyClDecl pass -> IdP pass
- tyClDeclLName :: TyClDecl pass -> Located (IdP pass)
- tyFamInstDeclLName :: TyFamInstDecl pass -> Located (IdP pass)
- tyFamInstDeclName :: TyFamInstDecl pass -> IdP pass
- isDataFamilyDecl :: TyClDecl pass -> Bool
- isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool
- isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool
- isTypeFamilyDecl :: TyClDecl pass -> Bool
- isFamilyDecl :: TyClDecl pass -> Bool
- isClassDecl :: TyClDecl pass -> Bool
- isSynDecl :: TyClDecl pass -> Bool
- isDataDecl :: TyClDecl pass -> Bool
- appendGroups :: HsGroup (GhcPass p) -> HsGroup (GhcPass p) -> HsGroup (GhcPass p)
- hsGroupInstDecls :: HsGroup id -> [LInstDecl id]
- emptyRnGroup :: HsGroup (GhcPass p)
- emptyRdrGroup :: HsGroup (GhcPass p)
- type LHsDecl p = Located (HsDecl p)
- data HsDecl p
- = DefD (XDefD p) (DefaultDecl 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 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]
- | XHsGroup (XXHsGroup p)
- = HsGroup {
- type LSpliceDecl pass = Located (SpliceDecl pass)
- data SpliceDecl p
- = SpliceDecl (XSpliceDecl p) (Located (HsSplice p)) SpliceExplicitFlag
- | XSpliceDecl (XXSpliceDecl p)
- type LTyClDecl pass = Located (TyClDecl pass)
- data TyClDecl pass
- = FamDecl {
- tcdFExt :: XFamDecl pass
- tcdFam :: FamilyDecl pass
- | SynDecl { }
- | DataDecl {
- tcdDExt :: XDataDecl pass
- tcdLName :: Located (IdP pass)
- tcdTyVars :: LHsQTyVars pass
- tcdFixity :: LexicalFixity
- tcdDataDefn :: HsDataDefn pass
- | ClassDecl {
- tcdCExt :: XClassDecl pass
- tcdCtxt :: LHsContext pass
- tcdLName :: Located (IdP pass)
- tcdTyVars :: LHsQTyVars pass
- tcdFixity :: LexicalFixity
- tcdFDs :: [Located (FunDep (Located (IdP pass)))]
- tcdSigs :: [LSig pass]
- tcdMeths :: LHsBinds pass
- tcdATs :: [LFamilyDecl pass]
- tcdATDefs :: [LTyFamDefltEqn pass]
- tcdDocs :: [LDocDecl]
- | XTyClDecl (XXTyClDecl pass)
- = FamDecl {
- data DataDeclRn = DataDeclRn {
- tcdDataCusk :: Bool
- tcdFVs :: NameSet
- data TyClGroup pass
- = TyClGroup {
- group_ext :: XCTyClGroup pass
- group_tyclds :: [LTyClDecl pass]
- group_roles :: [LRoleAnnotDecl pass]
- group_instds :: [LInstDecl pass]
- | XTyClGroup (XXTyClGroup pass)
- = TyClGroup {
- type LFamilyResultSig pass = Located (FamilyResultSig pass)
- data FamilyResultSig pass
- = NoSig (XNoSig pass)
- | KindSig (XCKindSig pass) (LHsKind pass)
- | TyVarSig (XTyVarSig pass) (LHsTyVarBndr pass)
- | XFamilyResultSig (XXFamilyResultSig pass)
- type LFamilyDecl pass = Located (FamilyDecl pass)
- data FamilyDecl pass
- = FamilyDecl {
- fdExt :: XCFamilyDecl pass
- fdInfo :: FamilyInfo pass
- fdLName :: Located (IdP pass)
- fdTyVars :: LHsQTyVars pass
- fdFixity :: LexicalFixity
- fdResultSig :: LFamilyResultSig pass
- fdInjectivityAnn :: Maybe (LInjectivityAnn pass)
- | XFamilyDecl (XXFamilyDecl pass)
- = FamilyDecl {
- type LInjectivityAnn pass = Located (InjectivityAnn pass)
- data InjectivityAnn pass = InjectivityAnn (Located (IdP pass)) [Located (IdP pass)]
- data FamilyInfo pass
- = DataFamily
- | OpenTypeFamily
- | ClosedTypeFamily (Maybe [LTyFamInstEqn pass])
- data HsDataDefn pass
- = HsDataDefn {
- dd_ext :: XCHsDataDefn pass
- dd_ND :: NewOrData
- dd_ctxt :: LHsContext pass
- dd_cType :: Maybe (Located CType)
- dd_kindSig :: Maybe (LHsKind pass)
- dd_cons :: [LConDecl pass]
- dd_derivs :: HsDeriving pass
- | XHsDataDefn (XXHsDataDefn pass)
- = HsDataDefn {
- type HsDeriving pass = Located [LHsDerivingClause pass]
- type LHsDerivingClause pass = Located (HsDerivingClause pass)
- data HsDerivingClause pass
- = HsDerivingClause {
- deriv_clause_ext :: XCHsDerivingClause pass
- deriv_clause_strategy :: Maybe (LDerivStrategy pass)
- deriv_clause_tys :: Located [LHsSigType pass]
- | XHsDerivingClause (XXHsDerivingClause pass)
- = HsDerivingClause {
- data NewOrData
- type LConDecl pass = Located (ConDecl pass)
- data ConDecl pass
- = ConDeclGADT {
- con_g_ext :: XConDeclGADT pass
- con_names :: [Located (IdP pass)]
- con_forall :: Located Bool
- con_qvars :: LHsQTyVars pass
- con_mb_cxt :: Maybe (LHsContext pass)
- con_args :: HsConDeclDetails pass
- con_res_ty :: LHsType pass
- con_doc :: Maybe LHsDocString
- | ConDeclH98 {
- con_ext :: XConDeclH98 pass
- con_name :: Located (IdP pass)
- con_forall :: Located Bool
- con_ex_tvs :: [LHsTyVarBndr pass]
- con_mb_cxt :: Maybe (LHsContext pass)
- con_args :: HsConDeclDetails pass
- con_doc :: Maybe LHsDocString
- | XConDecl (XXConDecl pass)
- = ConDeclGADT {
- type HsConDeclDetails pass = HsConDetails (LBangType pass) (Located [LConDeclField pass])
- type LTyFamInstEqn pass = Located (TyFamInstEqn pass)
- type LTyFamDefltEqn pass = Located (TyFamDefltEqn pass)
- type HsTyPats pass = [LHsType pass]
- type TyFamInstEqn pass = FamInstEqn pass (LHsType pass)
- type TyFamDefltEqn pass = FamEqn pass (LHsQTyVars pass) (LHsType pass)
- type LTyFamInstDecl pass = Located (TyFamInstDecl pass)
- newtype TyFamInstDecl pass = TyFamInstDecl {
- tfid_eqn :: TyFamInstEqn pass
- type LDataFamInstDecl pass = Located (DataFamInstDecl pass)
- newtype DataFamInstDecl pass = DataFamInstDecl {
- dfid_eqn :: FamInstEqn pass (HsDataDefn pass)
- type LFamInstEqn pass rhs = Located (FamInstEqn pass rhs)
- type FamInstEqn pass rhs = HsImplicitBndrs pass (FamEqn pass (HsTyPats pass) rhs)
- data FamEqn pass pats rhs
- = FamEqn {
- feqn_ext :: XCFamEqn pass pats rhs
- feqn_tycon :: Located (IdP pass)
- feqn_pats :: pats
- feqn_fixity :: LexicalFixity
- feqn_rhs :: rhs
- | XFamEqn (XXFamEqn pass pats rhs)
- = FamEqn {
- type LClsInstDecl pass = Located (ClsInstDecl pass)
- 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 (Located OverlapMode)
- | XClsInstDecl (XXClsInstDecl pass)
- = ClsInstDecl {
- type LInstDecl pass = Located (InstDecl 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 {
- type LDerivDecl pass = Located (DerivDecl pass)
- data DerivDecl pass
- = DerivDecl {
- deriv_ext :: XCDerivDecl pass
- deriv_type :: LHsSigWcType pass
- deriv_strategy :: Maybe (LDerivStrategy pass)
- deriv_overlap_mode :: Maybe (Located OverlapMode)
- | XDerivDecl (XXDerivDecl pass)
- = DerivDecl {
- type LDerivStrategy pass = Located (DerivStrategy pass)
- data DerivStrategy pass
- type LDefaultDecl pass = Located (DefaultDecl pass)
- data DefaultDecl pass
- = DefaultDecl (XCDefaultDecl pass) [LHsType pass]
- | XDefaultDecl (XXDefaultDecl pass)
- type LForeignDecl pass = Located (ForeignDecl pass)
- data ForeignDecl pass
- = ForeignImport {
- fd_i_ext :: XForeignImport pass
- fd_name :: Located (IdP pass)
- fd_sig_ty :: LHsSigType pass
- fd_fi :: ForeignImport
- | ForeignExport {
- fd_e_ext :: XForeignExport pass
- fd_name :: Located (IdP pass)
- fd_sig_ty :: LHsSigType pass
- fd_fe :: ForeignExport
- | XForeignDecl (XXForeignDecl pass)
- = ForeignImport {
- data ForeignImport = CImport (Located CCallConv) (Located Safety) (Maybe Header) CImportSpec (Located SourceText)
- data CImportSpec
- data ForeignExport = CExport (Located CExportSpec) (Located SourceText)
- type LRuleDecls pass = Located (RuleDecls pass)
- data RuleDecls pass
- = HsRules {
- rds_ext :: XCRuleDecls pass
- rds_src :: SourceText
- rds_rules :: [LRuleDecl pass]
- | XRuleDecls (XXRuleDecls pass)
- = HsRules {
- type LRuleDecl pass = Located (RuleDecl pass)
- data RuleDecl pass
- = HsRule (XHsRule pass) (Located (SourceText, RuleName)) Activation [LRuleBndr pass] (Located (HsExpr pass)) (Located (HsExpr pass))
- | XRuleDecl (XXRuleDecl pass)
- data HsRuleRn = HsRuleRn NameSet NameSet
- type LRuleBndr pass = Located (RuleBndr pass)
- data RuleBndr pass
- = RuleBndr (XCRuleBndr pass) (Located (IdP pass))
- | RuleBndrSig (XRuleBndrSig pass) (Located (IdP pass)) (LHsSigWcType pass)
- | XRuleBndr (XXRuleBndr pass)
- type LDocDecl = Located DocDecl
- data DocDecl
- type LWarnDecls pass = Located (WarnDecls pass)
- data WarnDecls pass
- = Warnings {
- wd_ext :: XWarnings pass
- wd_src :: SourceText
- wd_warnings :: [LWarnDecl pass]
- | XWarnDecls (XXWarnDecls pass)
- = Warnings {
- type LWarnDecl pass = Located (WarnDecl pass)
- data WarnDecl pass
- = Warning (XWarning pass) [Located (IdP pass)] WarningTxt
- | XWarnDecl (XXWarnDecl pass)
- type LAnnDecl pass = Located (AnnDecl pass)
- data AnnDecl pass
- = HsAnnotation (XHsAnnotation pass) SourceText (AnnProvenance (IdP pass)) (Located (HsExpr pass))
- | XAnnDecl (XXAnnDecl pass)
- data AnnProvenance name
- = ValueAnnProvenance (Located name)
- | TypeAnnProvenance (Located name)
- | ModuleAnnProvenance
- type LRoleAnnotDecl pass = Located (RoleAnnotDecl pass)
- data RoleAnnotDecl pass
- = RoleAnnotDecl (XCRoleAnnotDecl pass) (Located (IdP pass)) [Located (Maybe Role)]
- | XRoleAnnotDecl (XXRoleAnnotDecl pass)
- collectEvVarsPat :: Pat GhcTc -> Bag EvVar
- collectEvVarsPats :: [Pat GhcTc] -> Bag EvVar
- parenthesizePat :: PprPrec -> LPat (GhcPass p) -> LPat (GhcPass p)
- patNeedsParens :: PprPrec -> Pat p -> Bool
- isIrrefutableHsPat :: OutputableBndrId p => LPat p -> Bool
- looksLazyPatBind :: HsBind p -> Bool
- isBangedLPat :: LPat p -> Bool
- mkCharLitPat :: SourceText -> Char -> OutPat (GhcPass p)
- mkNilPat :: Type -> OutPat p
- mkPrefixConPat :: DataCon -> [OutPat p] -> [Type] -> OutPat p
- pprConArgs :: OutputableBndrId (GhcPass p) => HsConPatDetails (GhcPass p) -> SDoc
- pprParendLPat :: OutputableBndrId (GhcPass p) => PprPrec -> LPat (GhcPass p) -> SDoc
- hsRecUpdFieldOcc :: HsRecField' (AmbiguousFieldOcc GhcTc) arg -> LFieldOcc GhcTc
- hsRecUpdFieldId :: HsRecField' (AmbiguousFieldOcc GhcTc) arg -> Located Id
- hsRecUpdFieldRdr :: HsRecUpdField (GhcPass p) -> Located RdrName
- hsRecFieldId :: HsRecField GhcTc arg -> Located Id
- hsRecFieldSel :: HsRecField pass arg -> Located (XCFieldOcc pass)
- hsRecFieldsArgs :: HsRecFields p arg -> [arg]
- hsRecFields :: HsRecFields p arg -> [XCFieldOcc p]
- hsConPatArgs :: HsConPatDetails p -> [LPat p]
- type InPat p = LPat p
- type OutPat p = LPat p
- data ListPatTc = ListPatTc Type (Maybe (Type, SyntaxExpr GhcTc))
- type HsConPatDetails p = HsConDetails (LPat p) (HsRecFields p (LPat p))
- data HsRecFields p arg = HsRecFields {
- rec_flds :: [LHsRecField p arg]
- rec_dotdot :: Maybe Int
- type LHsRecField' p arg = Located (HsRecField' p arg)
- type LHsRecField p arg = Located (HsRecField p arg)
- type LHsRecUpdField p = Located (HsRecUpdField p)
- type HsRecField p arg = HsRecField' (FieldOcc p) arg
- type HsRecUpdField p = HsRecField' (AmbiguousFieldOcc p) (LHsExpr p)
- data HsRecField' id arg = HsRecField {
- hsRecFieldLbl :: Located id
- hsRecFieldArg :: arg
- hsRecPun :: Bool
- pprMinimalSig :: OutputableBndr name => LBooleanFormula (Located name) -> SDoc
- pprTcSpecPrags :: TcSpecPrags -> SDoc
- pprSpec :: OutputableBndr id => id -> SDoc -> InlinePragma -> SDoc
- pprVarSig :: OutputableBndr id => [id] -> SDoc -> SDoc
- pragSrcBrackets :: SourceText -> String -> SDoc -> SDoc
- pragBrackets :: SDoc -> SDoc
- ppr_sig :: OutputableBndrId (GhcPass p) => Sig (GhcPass p) -> SDoc
- hsSigDoc :: Sig name -> SDoc
- isCompleteMatchSig :: LSig name -> Bool
- isSCCFunSig :: LSig name -> Bool
- isMinimalLSig :: LSig name -> Bool
- isInlineLSig :: LSig name -> Bool
- isPragLSig :: LSig name -> Bool
- isSpecInstLSig :: LSig name -> Bool
- isSpecLSig :: LSig name -> Bool
- isTypeLSig :: LSig name -> Bool
- isFixityLSig :: LSig name -> Bool
- isDefaultMethod :: TcSpecPrags -> Bool
- hasSpecPrags :: TcSpecPrags -> Bool
- noSpecPrags :: TcSpecPrags
- isEmptyIPBindsTc :: HsIPBinds GhcTc -> Bool
- isEmptyIPBindsPR :: HsIPBinds (GhcPass p) -> Bool
- pprTicks :: SDoc -> SDoc -> SDoc
- ppr_monobind :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR)) => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc
- plusHsValBinds :: HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) -> HsValBinds (GhcPass a)
- isEmptyLHsBinds :: LHsBindsLR idL idR -> Bool
- emptyLHsBinds :: LHsBindsLR idL idR
- emptyValBindsOut :: HsValBindsLR (GhcPass a) (GhcPass b)
- emptyValBindsIn :: HsValBindsLR (GhcPass a) (GhcPass b)
- isEmptyValBinds :: HsValBindsLR (GhcPass a) (GhcPass b) -> Bool
- eqEmptyLocalBinds :: HsLocalBindsLR a b -> Bool
- isEmptyLocalBindsPR :: HsLocalBindsLR (GhcPass a) (GhcPass b) -> Bool
- isEmptyLocalBindsTc :: HsLocalBindsLR (GhcPass a) GhcTc -> Bool
- emptyLocalBinds :: HsLocalBindsLR (GhcPass a) (GhcPass b)
- pprDeclList :: [SDoc] -> SDoc
- pprLHsBindsForUser :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR), OutputableBndrId (GhcPass id2)) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc]
- pprLHsBinds :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR)) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
- type HsLocalBinds id = HsLocalBindsLR id id
- type LHsLocalBinds id = Located (HsLocalBinds id)
- 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 LHsLocalBindsLR idL idR = Located (HsLocalBindsLR idL idR)
- type HsValBinds id = HsValBindsLR id id
- data HsValBindsLR idL idR
- = ValBinds (XValBinds idL idR) (LHsBindsLR idL idR) [LSig idR]
- | XValBindsLR (XXValBindsLR idL idR)
- data NHsValBindsLR idL = NValBinds [(RecFlag, LHsBinds idL)] [LSig GhcRn]
- type LHsBind id = LHsBindLR id id
- type LHsBinds id = LHsBindsLR id id
- type HsBind id = HsBindLR id id
- type LHsBindsLR idL idR = Bag (LHsBindLR idL idR)
- type LHsBindLR idL idR = Located (HsBindLR idL idR)
- data HsBindLR idL idR
- = FunBind { }
- | PatBind { }
- | 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
- | XHsBindsLR (XXHsBindsLR idL idR)
- data NPatBindTc = NPatBindTc {
- pat_fvs :: NameSet
- pat_rhs_ty :: Type
- data ABExport p
- pattern XPatSynBind :: XXPatSynBind idL idR -> PatSynBind idL idR
- pattern PSB :: XPSB idL idR -> Located (IdP idL) -> HsPatSynDetails (Located (IdP idR)) -> LPat idR -> HsPatSynDir idR -> PatSynBind idL idR
- psb_ext :: PatSynBind idL idR -> XPSB idL idR
- psb_id :: PatSynBind idL idR -> Located (IdP idL)
- psb_args :: PatSynBind idL idR -> HsPatSynDetails (Located (IdP idR))
- psb_def :: PatSynBind idL idR -> LPat idR
- psb_dir :: PatSynBind idL idR -> HsPatSynDir idR
- data HsIPBinds id
- = IPBinds (XIPBinds id) [LIPBind id]
- | XHsIPBinds (XXHsIPBinds id)
- type LIPBind id = Located (IPBind id)
- data IPBind id
- type LSig pass = Located (Sig pass)
- data Sig pass
- = PatSynSig (XPatSynSig pass) [Located (IdP pass)] (LHsSigType pass)
- | IdSig (XIdSig pass) Id
- | FixSig (XFixSig pass) (FixitySig pass)
- | InlineSig (XInlineSig pass) (Located (IdP pass)) InlinePragma
- | SpecSig (XSpecSig pass) (Located (IdP pass)) [LHsSigType pass] InlinePragma
- | SpecInstSig (XSpecInstSig pass) SourceText (LHsSigType pass)
- | MinimalSig (XMinimalSig pass) SourceText (LBooleanFormula (Located (IdP pass)))
- | SCCFunSig (XSCCFunSig pass) SourceText (Located (IdP pass)) (Maybe (Located StringLiteral))
- | CompleteMatchSig (XCompleteMatchSig pass) SourceText (Located [Located (IdP pass)]) (Maybe (Located (IdP pass)))
- | XSig (XXSig pass)
- type LFixitySig pass = Located (FixitySig pass)
- data FixitySig pass
- = FixitySig (XFixitySig pass) [Located (IdP pass)] Fixity
- | XFixitySig (XXFixitySig pass)
- data TcSpecPrags
- type LTcSpecPrag = Located TcSpecPrag
- data TcSpecPrag = SpecPrag Id HsWrapper InlinePragma
- type HsPatSynDetails arg = HsConDetails arg [RecordPatSynField arg]
- data RecordPatSynField a = RecordPatSynField {
- recordPatSynSelectorId :: a
- recordPatSynPatVar :: a
- data HsPatSynDir id
- pprInstanceHdr :: ClsInst -> SDoc
- pprInstance :: ClsInst -> SDoc
- instanceDFunId :: ClsInst -> DFunId
- data ClsInst
- data FamInst
- type BreakIndex = Int
- data ModBreaks = ModBreaks {}
- parenthesizeHsType :: PprPrec -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- hsTypeNeedsParens :: PprPrec -> HsType pass -> Bool
- pprHsType :: OutputableBndrId (GhcPass p) => HsType (GhcPass p) -> SDoc
- pprConDeclFields :: OutputableBndrId (GhcPass p) => [LConDeclField (GhcPass p)] -> SDoc
- pprHsContextMaybe :: OutputableBndrId (GhcPass p) => HsContext (GhcPass p) -> Maybe SDoc
- pprHsContextNoArrow :: OutputableBndrId (GhcPass p) => HsContext (GhcPass p) -> SDoc
- pprHsContext :: OutputableBndrId (GhcPass p) => HsContext (GhcPass p) -> SDoc
- pprHsForAllTvs :: OutputableBndrId (GhcPass p) => [LHsTyVarBndr (GhcPass p)] -> SDoc
- pprHsForAllExtra :: OutputableBndrId (GhcPass p) => Maybe SrcSpan -> [LHsTyVarBndr (GhcPass p)] -> LHsContext (GhcPass p) -> SDoc
- pprHsForAll :: OutputableBndrId (GhcPass p) => [LHsTyVarBndr (GhcPass p)] -> LHsContext (GhcPass p) -> SDoc
- pprAnonWildCard :: SDoc
- ambiguousFieldOcc :: FieldOcc GhcTc -> AmbiguousFieldOcc GhcTc
- unambiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> FieldOcc GhcTc
- selectorAmbiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> Id
- rdrNameAmbiguousFieldOcc :: AmbiguousFieldOcc (GhcPass p) -> RdrName
- mkAmbiguousFieldOcc :: Located RdrName -> AmbiguousFieldOcc GhcPs
- mkFieldOcc :: Located RdrName -> FieldOcc GhcPs
- getLHsInstDeclClass_maybe :: LHsSigType (GhcPass p) -> Maybe (Located (IdP (GhcPass p)))
- getLHsInstDeclHead :: LHsSigType pass -> LHsType pass
- splitLHsInstDeclTy :: LHsSigType GhcRn -> ([Name], LHsContext GhcRn, LHsType GhcRn)
- splitLHsQualTy :: LHsType pass -> (LHsContext pass, LHsType pass)
- splitLHsForAllTy :: LHsType pass -> ([LHsTyVarBndr pass], LHsType pass)
- splitLHsSigmaTy :: LHsType pass -> ([LHsTyVarBndr pass], LHsContext pass, LHsType pass)
- splitLHsPatSynTy :: LHsType pass -> ([LHsTyVarBndr pass], LHsContext pass, [LHsTyVarBndr pass], LHsContext pass, LHsType pass)
- splitHsAppTys :: LHsType GhcRn -> [LHsType GhcRn] -> (LHsType GhcRn, [LHsType GhcRn])
- hsTyGetAppHead_maybe :: LHsType (GhcPass p) -> Maybe (Located (IdP (GhcPass p)), [LHsType (GhcPass p)])
- splitHsFunType :: LHsType GhcRn -> ([LHsType GhcRn], LHsType GhcRn)
- mkHsAppTys :: LHsType (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p)
- mkHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- mkHsOpTy :: LHsType (GhcPass p) -> Located (IdP (GhcPass p)) -> LHsType (GhcPass p) -> HsType (GhcPass p)
- mkAnonWildCardTy :: HsType GhcPs
- isLHsForAllTy :: LHsType p -> Bool
- ignoreParens :: LHsType pass -> LHsType pass
- sameWildCard :: Located HsWildCardInfo -> Located HsWildCardInfo -> Bool
- wildCardName :: HsWildCardInfo -> Name
- hsLTyVarBndrsToTypes :: LHsQTyVars (GhcPass p) -> [LHsType (GhcPass p)]
- hsLTyVarBndrToType :: LHsTyVarBndr (GhcPass p) -> LHsType (GhcPass p)
- hsLTyVarLocNames :: LHsQTyVars pass -> [Located (IdP pass)]
- hsLTyVarLocName :: LHsTyVarBndr pass -> Located (IdP pass)
- hsAllLTyVarNames :: LHsQTyVars GhcRn -> [Name]
- hsExplicitLTyVarNames :: LHsQTyVars pass -> [IdP pass]
- hsLTyVarName :: LHsTyVarBndr pass -> IdP pass
- hsTyVarName :: HsTyVarBndr pass -> IdP pass
- hsScopedTvs :: LHsSigType GhcRn -> [Name]
- hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name]
- hsTvbAllKinded :: LHsQTyVars pass -> Bool
- isHsKindedTyVar :: HsTyVarBndr pass -> Bool
- hsIPNameFS :: HsIPName -> FastString
- mkEmptyWildCardBndrs :: thing -> HsWildCardBndrs GhcRn thing
- mkEmptyImplicitBndrs :: thing -> HsImplicitBndrs GhcRn thing
- mkHsWildCardBndrs :: thing -> HsWildCardBndrs GhcPs thing
- mkHsImplicitBndrs :: thing -> HsImplicitBndrs GhcPs thing
- dropWildCards :: LHsSigWcType pass -> LHsSigType pass
- hsSigWcType :: LHsSigWcType pass -> LHsType pass
- hsSigType :: LHsSigType pass -> LHsType pass
- hsImplicitBody :: HsImplicitBndrs pass thing -> thing
- isEmptyLHsQTvs :: LHsQTyVars GhcRn -> Bool
- emptyLHsQTvs :: LHsQTyVars GhcRn
- hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr pass]
- mkHsQTvs :: [LHsTyVarBndr GhcPs] -> LHsQTyVars GhcPs
- getBangStrictness :: LHsType a -> HsSrcBang
- getBangType :: LHsType a -> LHsType a
- type LBangType pass = Located (BangType pass)
- type BangType pass = HsType pass
- type LHsContext pass = Located (HsContext pass)
- type HsContext pass = [LHsType pass]
- type LHsType pass = Located (HsType pass)
- type HsKind pass = HsType pass
- type LHsKind pass = Located (HsKind pass)
- type LHsTyVarBndr pass = Located (HsTyVarBndr pass)
- data LHsQTyVars pass
- = HsQTvs {
- hsq_ext :: XHsQTvs pass
- hsq_explicit :: [LHsTyVarBndr pass]
- | XLHsQTyVars (XXLHsQTyVars pass)
- = HsQTvs {
- data HsQTvsRn = HsQTvsRn {
- hsq_implicit :: [Name]
- hsq_dependent :: NameSet
- data HsImplicitBndrs pass thing
- = HsIB { }
- | XHsImplicitBndrs (XXHsImplicitBndrs pass thing)
- data HsIBRn = HsIBRn {
- hsib_vars :: [Name]
- hsib_closed :: Bool
- data HsWildCardBndrs pass thing
- = HsWC { }
- | XHsWildCardBndrs (XXHsWildCardBndrs pass thing)
- type LHsSigType pass = HsImplicitBndrs pass (LHsType pass)
- type LHsWcType pass = HsWildCardBndrs pass (LHsType pass)
- type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass)
- newtype HsIPName = HsIPName FastString
- data HsTyVarBndr pass
- = UserTyVar (XUserTyVar pass) (Located (IdP pass))
- | KindedTyVar (XKindedTyVar pass) (Located (IdP pass)) (LHsKind pass)
- | XTyVarBndr (XXTyVarBndr pass)
- data HsType pass
- = HsForAllTy {
- hst_xforall :: XForAllTy pass
- hst_bndrs :: [LHsTyVarBndr pass]
- hst_body :: LHsType pass
- | HsQualTy { }
- | HsTyVar (XTyVar pass) Promoted (Located (IdP pass))
- | HsAppTy (XAppTy pass) (LHsType pass) (LHsType pass)
- | HsFunTy (XFunTy 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) (Located (IdP pass)) (LHsType pass)
- | HsParTy (XParTy pass) (LHsType pass)
- | HsIParamTy (XIParamTy pass) (Located 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) Promoted [LHsType pass]
- | HsExplicitTupleTy (XExplicitTupleTy pass) [LHsType pass]
- | HsTyLit (XTyLit pass) HsTyLit
- | HsWildCardTy (XWildCardTy pass)
- | XHsType (XXType pass)
- = HsForAllTy {
- data NewHsTypeX = NHsCoreTy Type
- data HsTyLit
- newtype HsWildCardInfo = AnonWildCard (Located Name)
- data HsTupleSort
- data Promoted
- type LConDeclField pass = Located (ConDeclField pass)
- 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 {
- data HsConDetails arg rec
- type LFieldOcc pass = Located (FieldOcc pass)
- data FieldOcc pass
- = FieldOcc {
- extFieldOcc :: XCFieldOcc pass
- rdrNameFieldOcc :: Located RdrName
- | XFieldOcc (XXFieldOcc pass)
- = FieldOcc {
- data AmbiguousFieldOcc pass
- = Unambiguous (XUnambiguous pass) (Located RdrName)
- | Ambiguous (XAmbiguous pass) (Located RdrName)
- | XAmbiguousFieldOcc (XXAmbiguousFieldOcc pass)
- data ExecOptions = ExecOptions {}
- data SingleStep
- data ExecResult
- = ExecComplete { }
- | ExecBreak {
- breakNames :: [Name]
- breakInfo :: Maybe BreakInfo
- data BreakInfo
- data Resume = Resume {
- resumeStmt :: String
- resumeContext :: ForeignRef (ResumeContext [HValueRef])
- resumeBindings :: ([TyThing], GlobalRdrEnv)
- resumeFinalIds :: [Id]
- resumeApStack :: ForeignHValue
- resumeBreakInfo :: Maybe BreakInfo
- resumeSpan :: SrcSpan
- resumeDecl :: String
- resumeCCS :: RemotePtr CostCentreStack
- resumeHistory :: [History]
- resumeHistoryIx :: Int
- data History
- isBottomingId :: Var -> Bool
- isDeadBinder :: Id -> Bool
- isImplicitId :: Id -> Bool
- idDataCon :: Id -> DataCon
- isDataConWorkId :: Id -> Bool
- isFCallId :: Id -> Bool
- isPrimOpId :: Id -> Bool
- isClassOpId_maybe :: Id -> Maybe Class
- isRecordSelector :: Id -> Bool
- recordSelectorTyCon :: Id -> RecSelParent
- idType :: Id -> Kind
- isVanillaDataCon :: DataCon -> Bool
- dataConUserType :: DataCon -> Type
- dataConSig :: DataCon -> ([TyVar], ThetaType, [Type], Type)
- dataConSrcBangs :: DataCon -> [HsSrcBang]
- dataConIsInfix :: DataCon -> Bool
- isMarkedStrict :: StrictnessMark -> Bool
- data HsSrcBang = HsSrcBang SourceText SrcUnpackedness SrcStrictness
- data HsImplBang
- data SrcStrictness
- data SrcUnpackedness
- data StrictnessMark
- hsOverLitNeedsParens :: PprPrec -> HsOverLit x -> Bool
- hsLitNeedsParens :: PprPrec -> HsLit x -> Bool
- pmPprHsLit :: HsLit (GhcPass x) -> SDoc
- pp_st_suffix :: SourceText -> SDoc -> SDoc -> SDoc
- convertLit :: ConvertIdX a b => HsLit a -> HsLit b
- overLitType :: HsOverLit GhcTc -> Type
- negateOverLitVal :: OverLitVal -> OverLitVal
- 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)
- data HsOverLit p
- = OverLit {
- ol_ext :: XOverLit p
- ol_val :: OverLitVal
- ol_witness :: HsExpr p
- | XOverLit (XXOverLit p)
- = OverLit {
- data OverLitTc = OverLitTc {
- ol_rebindable :: Bool
- ol_type :: Type
- data OverLitVal
- splitForAllTys :: Type -> ([TyVar], Type)
- funResultTy :: Type -> Type
- alphaTyVars :: [TyVar]
- pprTypeApp :: TyCon -> [Type] -> SDoc
- pprForAll :: [TyVarBinder] -> SDoc
- pprThetaArrowTy :: ThetaType -> SDoc
- pprParendType :: Type -> SDoc
- tyConClass_maybe :: TyCon -> Maybe Class
- isClassTyCon :: TyCon -> Bool
- synTyConRhs_maybe :: TyCon -> Maybe Type
- synTyConDefn_maybe :: TyCon -> Maybe ([TyVar], Type)
- tyConDataCons :: TyCon -> [DataCon]
- isOpenTypeFamilyTyCon :: TyCon -> Bool
- isTypeFamilyTyCon :: TyCon -> Bool
- isOpenFamilyTyCon :: TyCon -> Bool
- isFamilyTyCon :: TyCon -> Bool
- isTypeSynonymTyCon :: TyCon -> Bool
- isNewTyCon :: TyCon -> Bool
- isPrimTyCon :: TyCon -> Bool
- pprFundeps :: Outputable a => [FunDep a] -> SDoc
- classTvsFds :: Class -> ([TyVar], [FunDep TyVar])
- classSCTheta :: Class -> [PredType]
- classATs :: Class -> [TyCon]
- classMethods :: Class -> [Id]
- data Class
- dataConTyCon :: DataCon -> TyCon
- dataConFieldLabels :: DataCon -> [FieldLabel]
- data DataCon
- pprLExpr :: OutputableBndrId (GhcPass p) => LHsExpr (GhcPass p) -> SDoc
- pprExpr :: OutputableBndrId (GhcPass p) => HsExpr (GhcPass p) -> SDoc
- pprSplice :: OutputableBndrId (GhcPass p) => HsSplice (GhcPass p) -> SDoc
- pprSpliceDecl :: OutputableBndrId (GhcPass p) => HsSplice (GhcPass p) -> SpliceExplicitFlag -> SDoc
- pprPatBind :: (OutputableBndrId (GhcPass bndr), OutputableBndrId (GhcPass p), Outputable body) => LPat (GhcPass bndr) -> GRHSs (GhcPass p) body -> SDoc
- pprFunBind :: (OutputableBndrId (GhcPass idR), Outputable body) => MatchGroup (GhcPass idR) body -> SDoc
- data HsExpr p
- = HsVar (XVar p) (Located (IdP p))
- | HsUnboundVar (XUnboundVar p) UnboundVar
- | HsConLikeOut (XConLikeOut p) ConLike
- | HsRecFld (XRecFld p) (AmbiguousFieldOcc p)
- | HsOverLabel (XOverLabel p) (Maybe (IdP 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)
- | 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) [LHsTupArg p] Boxity
- | ExplicitSum (XExplicitSum p) ConTag Arity (LHsExpr p)
- | HsCase (XCase p) (LHsExpr p) (MatchGroup p (LHsExpr p))
- | HsIf (XIf p) (Maybe (SyntaxExpr p)) (LHsExpr p) (LHsExpr p) (LHsExpr p)
- | HsMultiIf (XMultiIf p) [LGRHS p (LHsExpr p)]
- | HsLet (XLet p) (LHsLocalBinds p) (LHsExpr p)
- | HsDo (XDo p) (HsStmtContext Name) (Located [ExprLStmt p])
- | ExplicitList (XExplicitList p) (Maybe (SyntaxExpr p)) [LHsExpr p]
- | RecordCon {
- rcon_ext :: XRecordCon p
- rcon_con_name :: Located (IdP p)
- rcon_flds :: HsRecordBinds p
- | RecordUpd {
- rupd_ext :: XRecordUpd p
- rupd_expr :: LHsExpr p
- rupd_flds :: [LHsRecUpdField p]
- | ExprWithTySig (XExprWithTySig p) (LHsExpr p)
- | ArithSeq (XArithSeq p) (Maybe (SyntaxExpr p)) (ArithSeqInfo p)
- | HsSCC (XSCC p) SourceText StringLiteral (LHsExpr p)
- | HsCoreAnn (XCoreAnn p) SourceText StringLiteral (LHsExpr p)
- | HsBracket (XBracket p) (HsBracket p)
- | HsRnBracketOut (XRnBracketOut p) (HsBracket GhcRn) [PendingRnSplice]
- | HsTcBracketOut (XTcBracketOut p) (HsBracket GhcRn) [PendingTcSplice]
- | HsSpliceE (XSpliceE p) (HsSplice p)
- | HsProc (XProc p) (LPat p) (LHsCmdTop p)
- | HsStatic (XStatic p) (LHsExpr p)
- | HsArrApp (XArrApp p) (LHsExpr p) (LHsExpr p) HsArrAppType Bool
- | HsArrForm (XArrForm p) (LHsExpr p) (Maybe Fixity) [LHsCmdTop p]
- | HsTick (XTick p) (Tickish (IdP p)) (LHsExpr p)
- | HsBinTick (XBinTick p) Int Int (LHsExpr p)
- | HsTickPragma (XTickPragma p) SourceText (StringLiteral, (Int, Int), (Int, Int)) ((SourceText, SourceText), (SourceText, SourceText)) (LHsExpr p)
- | EWildPat (XEWildPat p)
- | EAsPat (XEAsPat p) (Located (IdP p)) (LHsExpr p)
- | EViewPat (XEViewPat p) (LHsExpr p) (LHsExpr p)
- | ELazyPat (XELazyPat p) (LHsExpr p)
- | HsWrap (XWrap p) HsWrapper (HsExpr p)
- | XExpr (XXExpr 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))
- | HsCmdIf (XCmdIf id) (Maybe (SyntaxExpr id)) (LHsExpr id) (LHsCmd id) (LHsCmd id)
- | HsCmdLet (XCmdLet id) (LHsLocalBinds id) (LHsCmd id)
- | HsCmdDo (XCmdDo id) (Located [CmdLStmt id])
- | HsCmdWrap (XCmdWrap id) HsWrapper (HsCmd id)
- | XCmd (XXCmd id)
- 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 MatchGroup p body
- = MG { }
- | XMatchGroup (XXMatchGroup p body)
- data GRHSs p body
- = GRHSs {
- grhssExt :: XCGRHSs p body
- grhssGRHSs :: [LGRHS p body]
- grhssLocalBinds :: LHsLocalBinds p
- | XGRHSs (XXGRHSs p body)
- = GRHSs {
- data SyntaxExpr p = SyntaxExpr {
- syn_expr :: HsExpr p
- syn_arg_wraps :: [HsWrapper]
- syn_res_wrap :: HsWrapper
- type LHsExpr p = Located (HsExpr p)
- pprImpExp :: (HasOccName name, OutputableBndr name) => name -> SDoc
- replaceLWrappedName :: LIEWrappedName name1 -> name2 -> LIEWrappedName name2
- replaceWrappedName :: IEWrappedName name1 -> name2 -> IEWrappedName name2
- ieLWrappedName :: LIEWrappedName name -> Located name
- ieWrappedName :: IEWrappedName name -> name
- ieNames :: IE pass -> [IdP pass]
- ieName :: IE pass -> IdP pass
- simpleImportDecl :: ModuleName -> ImportDecl (GhcPass p)
- type LImportDecl pass = Located (ImportDecl pass)
- data ImportDecl pass
- = ImportDecl {
- ideclExt :: XCImportDecl pass
- ideclSourceSrc :: SourceText
- ideclName :: Located ModuleName
- ideclPkgQual :: Maybe StringLiteral
- ideclSource :: Bool
- ideclSafe :: Bool
- ideclQualified :: Bool
- ideclImplicit :: Bool
- ideclAs :: Maybe (Located ModuleName)
- ideclHiding :: Maybe (Bool, Located [LIE pass])
- | XImportDecl (XXImportDecl pass)
- = ImportDecl {
- data IEWrappedName name
- type LIEWrappedName name = Located (IEWrappedName name)
- type LIE pass = Located (IE pass)
- data IE pass
- = IEVar (XIEVar pass) (LIEWrappedName (IdP pass))
- | IEThingAbs (XIEThingAbs pass) (LIEWrappedName (IdP pass))
- | IEModuleContents (XIEModuleContents pass) (Located ModuleName)
- | IEGroup (XIEGroup pass) Int HsDocString
- | IEDoc (XIEDoc pass) HsDocString
- | IEDocNamed (XIEDocNamed pass) String
- | XIE (XXIE pass)
- data IEWildcard
- data Pat p
- = WildPat (XWildPat p)
- | LazyPat (XLazyPat p) (LPat p)
- | AsPat (XAsPat p) (Located (IdP p)) (LPat p)
- | ParPat (XParPat p) (LPat p)
- | BangPat (XBangPat p) (LPat p)
- | ListPat (XListPat p) [LPat p]
- | TuplePat (XTuplePat p) [LPat p] Boxity
- | SumPat (XSumPat p) (LPat p) ConTag Arity
- | ConPatIn (Located (IdP p)) (HsConPatDetails p)
- | ConPatOut { }
- | ViewPat (XViewPat p) (LHsExpr p) (LPat p)
- | SplicePat (XSplicePat p) (HsSplice p)
- | LitPat (XLitPat p) (HsLit p)
- | NPat (XNPat p) (Located (HsOverLit p)) (Maybe (SyntaxExpr p)) (SyntaxExpr p)
- | NPlusKPat (XNPlusKPat p) (Located (IdP p)) (Located (HsOverLit p)) (HsOverLit p) (SyntaxExpr p) (SyntaxExpr p)
- | SigPat (XSigPat p) (LPat p)
- | CoPat (XCoPat p) HsWrapper (Pat p) Type
- | XPat (XXPat p)
- type LPat p = Located (Pat p)
- noExt :: NoExt
- data NoExt = NoExt
- data GhcPass (c :: Pass)
- data Pass
- = Parsed
- | Renamed
- | Typechecked
- type GhcPs = GhcPass Parsed
- type GhcRn = GhcPass Renamed
- type GhcTc = GhcPass Typechecked
- type GhcTcId = GhcTc
- type family IdP p :: Type
- type LIdP p = Located (IdP p)
- type family XHsValBinds x x' :: Type
- type family XHsIPBinds x x' :: Type
- type family XEmptyLocalBinds x x' :: Type
- type family XXHsLocalBindsLR x x' :: Type
- type ForallXHsLocalBindsLR (c :: Type -> Constraint) x x' = (c (XHsValBinds x x'), c (XHsIPBinds x x'), c (XEmptyLocalBinds x x'), c (XXHsLocalBindsLR x x'))
- type family XValBinds x x' :: Type
- type family XXValBindsLR x x' :: Type
- type ForallXValBindsLR (c :: Type -> Constraint) x x' = (c (XValBinds x x'), c (XXValBindsLR x x'))
- type family XFunBind x x' :: Type
- type family XPatBind x x' :: Type
- type family XVarBind x x' :: Type
- type family XAbsBinds x x' :: Type
- type family XPatSynBind x x' :: Type
- type family XXHsBindsLR x x' :: Type
- type ForallXHsBindsLR (c :: Type -> Constraint) x x' = (c (XFunBind x x'), c (XPatBind x x'), c (XVarBind x x'), c (XAbsBinds x x'), c (XPatSynBind x x'), c (XXHsBindsLR x x'))
- type family XABE x :: Type
- type family XXABExport x :: Type
- type ForallXABExport (c :: Type -> Constraint) x = (c (XABE x), c (XXABExport x))
- type family XPSB x x' :: Type
- type family XXPatSynBind x x' :: Type
- type ForallXPatSynBind (c :: Type -> Constraint) x x' = (c (XPSB x x'), c (XXPatSynBind x x'))
- type family XIPBinds x :: Type
- type family XXHsIPBinds x :: Type
- type ForallXHsIPBinds (c :: Type -> Constraint) x = (c (XIPBinds x), c (XXHsIPBinds x))
- type family XCIPBind x :: Type
- type family XXIPBind x :: Type
- type ForallXIPBind (c :: Type -> Constraint) x = (c (XCIPBind x), c (XXIPBind x))
- type family XTypeSig x :: Type
- type family XPatSynSig x :: Type
- type family XClassOpSig x :: Type
- type family XIdSig x :: Type
- type family XFixSig x :: Type
- type family XInlineSig x :: Type
- type family XSpecSig x :: Type
- type family XSpecInstSig x :: Type
- type family XMinimalSig x :: Type
- type family XSCCFunSig x :: Type
- type family XCompleteMatchSig x :: Type
- type family XXSig x :: Type
- type ForallXSig (c :: Type -> Constraint) x = (c (XTypeSig x), c (XPatSynSig x), c (XClassOpSig x), c (XIdSig x), c (XFixSig x), c (XInlineSig x), c (XSpecSig x), c (XSpecInstSig x), c (XMinimalSig x), c (XSCCFunSig x), c (XCompleteMatchSig x), c (XXSig x))
- type family XFixitySig x :: Type
- type family XXFixitySig x :: Type
- type ForallXFixitySig (c :: Type -> Constraint) x = (c (XFixitySig x), c (XXFixitySig x))
- type family XTyClD x :: Type
- type family XInstD x :: Type
- type family XDerivD x :: Type
- type family XValD x :: Type
- type family XSigD x :: Type
- type family XDefD x :: Type
- type family XForD x :: Type
- type family XWarningD x :: Type
- type family XAnnD x :: Type
- type family XRuleD x :: Type
- type family XSpliceD x :: Type
- type family XDocD x :: Type
- type family XRoleAnnotD x :: Type
- type family XXHsDecl x :: Type
- type ForallXHsDecl (c :: Type -> Constraint) x = (c (XTyClD x), c (XInstD x), c (XDerivD x), c (XValD x), c (XSigD x), c (XDefD x), c (XForD x), c (XWarningD x), c (XAnnD x), c (XRuleD x), c (XSpliceD x), c (XDocD x), c (XRoleAnnotD x), c (XXHsDecl x))
- type family XCHsGroup x :: Type
- type family XXHsGroup x :: Type
- type ForallXHsGroup (c :: Type -> Constraint) x = (c (XCHsGroup x), c (XXHsGroup x))
- type family XSpliceDecl x :: Type
- type family XXSpliceDecl x :: Type
- type ForallXSpliceDecl (c :: Type -> Constraint) x = (c (XSpliceDecl x), c (XXSpliceDecl x))
- type family XFamDecl x :: Type
- type family XSynDecl x :: Type
- type family XDataDecl x :: Type
- type family XClassDecl x :: Type
- type family XXTyClDecl x :: Type
- type ForallXTyClDecl (c :: Type -> Constraint) x = (c (XFamDecl x), c (XSynDecl x), c (XDataDecl x), c (XClassDecl x), c (XXTyClDecl x))
- type family XCTyClGroup x :: Type
- type family XXTyClGroup x :: Type
- type ForallXTyClGroup (c :: Type -> Constraint) x = (c (XCTyClGroup x), c (XXTyClGroup x))
- type family XNoSig x :: Type
- type family XCKindSig x :: Type
- type family XTyVarSig x :: Type
- type family XXFamilyResultSig x :: Type
- type ForallXFamilyResultSig (c :: Type -> Constraint) x = (c (XNoSig x), c (XCKindSig x), c (XTyVarSig x), c (XXFamilyResultSig x))
- type family XCFamilyDecl x :: Type
- type family XXFamilyDecl x :: Type
- type ForallXFamilyDecl (c :: Type -> Constraint) x = (c (XCFamilyDecl x), c (XXFamilyDecl x))
- type family XCHsDataDefn x :: Type
- type family XXHsDataDefn x :: Type
- type ForallXHsDataDefn (c :: Type -> Constraint) x = (c (XCHsDataDefn x), c (XXHsDataDefn x))
- type family XCHsDerivingClause x :: Type
- type family XXHsDerivingClause x :: Type
- type ForallXHsDerivingClause (c :: Type -> Constraint) x = (c (XCHsDerivingClause x), c (XXHsDerivingClause x))
- type family XConDeclGADT x :: Type
- type family XConDeclH98 x :: Type
- type family XXConDecl x :: Type
- type ForallXConDecl (c :: Type -> Constraint) x = (c (XConDeclGADT x), c (XConDeclH98 x), c (XXConDecl x))
- type family XCFamEqn x p r :: Type
- type family XXFamEqn x p r :: Type
- type ForallXFamEqn (c :: Type -> Constraint) x p r = (c (XCFamEqn x p r), c (XXFamEqn x p r))
- type family XCClsInstDecl x :: Type
- type family XXClsInstDecl x :: Type
- type ForallXClsInstDecl (c :: Type -> Constraint) x = (c (XCClsInstDecl x), c (XXClsInstDecl x))
- type family XClsInstD x :: Type
- type family XDataFamInstD x :: Type
- type family XTyFamInstD x :: Type
- type family XXInstDecl x :: Type
- type ForallXInstDecl (c :: Type -> Constraint) x = (c (XClsInstD x), c (XDataFamInstD x), c (XTyFamInstD x), c (XXInstDecl x))
- type family XCDerivDecl x :: Type
- type family XXDerivDecl x :: Type
- type ForallXDerivDecl (c :: Type -> Constraint) x = (c (XCDerivDecl x), c (XXDerivDecl x))
- type family XViaStrategy x :: Type
- type family XCDefaultDecl x :: Type
- type family XXDefaultDecl x :: Type
- type ForallXDefaultDecl (c :: Type -> Constraint) x = (c (XCDefaultDecl x), c (XXDefaultDecl x))
- type family XForeignImport x :: Type
- type family XForeignExport x :: Type
- type family XXForeignDecl x :: Type
- type ForallXForeignDecl (c :: Type -> Constraint) x = (c (XForeignImport x), c (XForeignExport x), c (XXForeignDecl x))
- type family XCRuleDecls x :: Type
- type family XXRuleDecls x :: Type
- type ForallXRuleDecls (c :: Type -> Constraint) x = (c (XCRuleDecls x), c (XXRuleDecls x))
- type family XHsRule x :: Type
- type family XXRuleDecl x :: Type
- type ForallXRuleDecl (c :: Type -> Constraint) x = (c (XHsRule x), c (XXRuleDecl x))
- type family XCRuleBndr x :: Type
- type family XRuleBndrSig x :: Type
- type family XXRuleBndr x :: Type
- type ForallXRuleBndr (c :: Type -> Constraint) x = (c (XCRuleBndr x), c (XRuleBndrSig x), c (XXRuleBndr x))
- type family XWarnings x :: Type
- type family XXWarnDecls x :: Type
- type ForallXWarnDecls (c :: Type -> Constraint) x = (c (XWarnings x), c (XXWarnDecls x))
- type family XWarning x :: Type
- type family XXWarnDecl x :: Type
- type ForallXWarnDecl (c :: Type -> Constraint) x = (c (XWarning x), c (XXWarnDecl x))
- type family XHsAnnotation x :: Type
- type family XXAnnDecl x :: Type
- type ForallXAnnDecl (c :: Type -> Constraint) x = (c (XHsAnnotation x), c (XXAnnDecl x))
- type family XCRoleAnnotDecl x :: Type
- type family XXRoleAnnotDecl x :: Type
- type ForallXRoleAnnotDecl (c :: Type -> Constraint) x = (c (XCRoleAnnotDecl x), c (XXRoleAnnotDecl x))
- type family XVar x :: Type
- type family XUnboundVar x :: Type
- type family XConLikeOut x :: Type
- type family XRecFld x :: Type
- type family XOverLabel x :: Type
- type family XIPVar x :: Type
- type family XOverLitE x :: Type
- type family XLitE x :: Type
- type family XLam x :: Type
- type family XLamCase x :: Type
- type family XApp x :: Type
- type family XAppTypeE x :: Type
- type family XOpApp x :: Type
- type family XNegApp x :: Type
- type family XPar x :: Type
- type family XSectionL x :: Type
- type family XSectionR x :: Type
- type family XExplicitTuple x :: Type
- type family XExplicitSum x :: Type
- type family XCase x :: Type
- type family XIf x :: Type
- type family XMultiIf x :: Type
- type family XLet x :: Type
- type family XDo x :: Type
- type family XExplicitList x :: Type
- type family XRecordCon x :: Type
- type family XRecordUpd x :: Type
- type family XExprWithTySig x :: Type
- type family XArithSeq x :: Type
- type family XSCC x :: Type
- type family XCoreAnn x :: Type
- type family XBracket x :: Type
- type family XRnBracketOut x :: Type
- type family XTcBracketOut x :: Type
- type family XSpliceE x :: Type
- type family XProc x :: Type
- type family XStatic x :: Type
- type family XArrApp x :: Type
- type family XArrForm x :: Type
- type family XTick x :: Type
- type family XBinTick x :: Type
- type family XTickPragma x :: Type
- type family XEWildPat x :: Type
- type family XEAsPat x :: Type
- type family XEViewPat x :: Type
- type family XELazyPat x :: Type
- type family XWrap x :: Type
- type family XXExpr x :: Type
- type ForallXExpr (c :: Type -> Constraint) x = (c (XVar x), c (XUnboundVar x), c (XConLikeOut x), c (XRecFld x), c (XOverLabel x), c (XIPVar x), c (XOverLitE x), c (XLitE x), c (XLam x), c (XLamCase x), c (XApp x), c (XAppTypeE x), c (XOpApp x), c (XNegApp x), c (XPar x), c (XSectionL x), c (XSectionR x), c (XExplicitTuple x), c (XExplicitSum x), c (XCase x), c (XIf x), c (XMultiIf x), c (XLet x), c (XDo x), c (XExplicitList x), c (XRecordCon x), c (XRecordUpd x), c (XExprWithTySig x), c (XArithSeq x), c (XSCC x), c (XCoreAnn x), c (XBracket x), c (XRnBracketOut x), c (XTcBracketOut x), c (XSpliceE x), c (XProc x), c (XStatic x), c (XArrApp x), c (XArrForm x), c (XTick x), c (XBinTick x), c (XTickPragma x), c (XEWildPat x), c (XEAsPat x), c (XEViewPat x), c (XELazyPat x), c (XWrap x), c (XXExpr x))
- type family XUnambiguous x :: Type
- type family XAmbiguous x :: Type
- type family XXAmbiguousFieldOcc x :: Type
- type ForallXAmbiguousFieldOcc (c :: Type -> Constraint) x = (c (XUnambiguous x), c (XAmbiguous x), c (XXAmbiguousFieldOcc x))
- type family XPresent x :: Type
- type family XMissing x :: Type
- type family XXTupArg x :: Type
- type ForallXTupArg (c :: Type -> Constraint) x = (c (XPresent x), c (XMissing x), c (XXTupArg x))
- type family XTypedSplice x :: Type
- type family XUntypedSplice x :: Type
- type family XQuasiQuote x :: Type
- type family XSpliced x :: Type
- type family XXSplice x :: Type
- type ForallXSplice (c :: Type -> Constraint) x = (c (XTypedSplice x), c (XUntypedSplice x), c (XQuasiQuote x), c (XSpliced x), c (XXSplice x))
- type family XExpBr x :: Type
- type family XPatBr x :: Type
- type family XDecBrL x :: Type
- type family XDecBrG x :: Type
- type family XTypBr x :: Type
- type family XVarBr x :: Type
- type family XTExpBr x :: Type
- type family XXBracket x :: Type
- type ForallXBracket (c :: Type -> Constraint) x = (c (XExpBr x), c (XPatBr x), c (XDecBrL x), c (XDecBrG x), c (XTypBr x), c (XVarBr x), c (XTExpBr x), c (XXBracket x))
- type family XCmdTop x :: Type
- type family XXCmdTop x :: Type
- type ForallXCmdTop (c :: Type -> Constraint) x = (c (XCmdTop x), c (XXCmdTop x))
- type family XMG x b :: Type
- type family XXMatchGroup x b :: Type
- type ForallXMatchGroup (c :: Type -> Constraint) x b = (c (XMG x b), c (XXMatchGroup x b))
- type family XCMatch x b :: Type
- type family XXMatch x b :: Type
- type ForallXMatch (c :: Type -> Constraint) x b = (c (XCMatch x b), c (XXMatch x b))
- type family XCGRHSs x b :: Type
- type family XXGRHSs x b :: Type
- type ForallXGRHSs (c :: Type -> Constraint) x b = (c (XCGRHSs x b), c (XXGRHSs x b))
- type family XCGRHS x b :: Type
- type family XXGRHS x b :: Type
- type ForallXGRHS (c :: Type -> Constraint) x b = (c (XCGRHS x b), c (XXGRHS x b))
- type family XLastStmt x x' b :: Type
- type family XBindStmt x x' b :: Type
- type family XApplicativeStmt x x' b :: Type
- type family XBodyStmt x x' b :: Type
- type family XLetStmt x x' b :: Type
- type family XParStmt x x' b :: Type
- type family XTransStmt x x' b :: Type
- type family XRecStmt x x' b :: Type
- type family XXStmtLR x x' b :: Type
- type ForallXStmtLR (c :: Type -> Constraint) x x' b = (c (XLastStmt x x' b), c (XBindStmt x x' b), c (XApplicativeStmt x x' b), c (XBodyStmt x x' b), c (XLetStmt x x' b), c (XParStmt x x' b), c (XTransStmt x x' b), c (XRecStmt x x' b), c (XXStmtLR x x' b))
- type family XCmdArrApp x :: Type
- type family XCmdArrForm x :: Type
- type family XCmdApp x :: Type
- type family XCmdLam x :: Type
- type family XCmdPar x :: Type
- type family XCmdCase x :: Type
- type family XCmdIf x :: Type
- type family XCmdLet x :: Type
- type family XCmdDo x :: Type
- type family XCmdWrap x :: Type
- type family XXCmd x :: Type
- type ForallXCmd (c :: Type -> Constraint) x = (c (XCmdArrApp x), c (XCmdArrForm x), c (XCmdApp x), c (XCmdLam x), c (XCmdPar x), c (XCmdCase x), c (XCmdIf x), c (XCmdLet x), c (XCmdDo x), c (XCmdWrap x), c (XXCmd x))
- type family XParStmtBlock x x' :: Type
- type family XXParStmtBlock x x' :: Type
- type ForallXParStmtBlock (c :: Type -> Constraint) x x' = (c (XParStmtBlock x x'), c (XXParStmtBlock x x'))
- type family XApplicativeArgOne x :: Type
- type family XApplicativeArgMany x :: Type
- type family XXApplicativeArg x :: Type
- type ForallXApplicativeArg (c :: Type -> Constraint) x = (c (XApplicativeArgOne x), c (XApplicativeArgMany x), c (XXApplicativeArg x))
- type family XHsChar x :: Type
- type family XHsCharPrim x :: Type
- type family XHsString x :: Type
- type family XHsStringPrim x :: Type
- type family XHsInt x :: Type
- type family XHsIntPrim x :: Type
- type family XHsWordPrim x :: Type
- type family XHsInt64Prim x :: Type
- type family XHsWord64Prim x :: Type
- type family XHsInteger x :: Type
- type family XHsRat x :: Type
- type family XHsFloatPrim x :: Type
- type family XHsDoublePrim x :: Type
- type family XXLit x :: Type
- type ForallXHsLit (c :: Type -> Constraint) x = (c (XHsChar x), c (XHsCharPrim x), c (XHsDoublePrim x), c (XHsFloatPrim x), c (XHsInt x), c (XHsInt64Prim x), c (XHsIntPrim x), c (XHsInteger x), c (XHsRat x), c (XHsString x), c (XHsStringPrim x), c (XHsWord64Prim x), c (XHsWordPrim x), c (XXLit x))
- type family XOverLit x :: Type
- type family XXOverLit x :: Type
- type ForallXOverLit (c :: Type -> Constraint) x = (c (XOverLit x), c (XXOverLit x))
- type family XWildPat x :: Type
- type family XVarPat x :: Type
- type family XLazyPat x :: Type
- type family XAsPat x :: Type
- type family XParPat x :: Type
- type family XBangPat x :: Type
- type family XListPat x :: Type
- type family XTuplePat x :: Type
- type family XSumPat x :: Type
- type family XConPat x :: Type
- type family XViewPat x :: Type
- type family XSplicePat x :: Type
- type family XLitPat x :: Type
- type family XNPat x :: Type
- type family XNPlusKPat x :: Type
- type family XSigPat x :: Type
- type family XCoPat x :: Type
- type family XXPat x :: Type
- type ForallXPat (c :: Type -> Constraint) x = (c (XWildPat x), c (XVarPat x), c (XLazyPat x), c (XAsPat x), c (XParPat x), c (XBangPat x), c (XListPat x), c (XTuplePat x), c (XSumPat x), c (XViewPat x), c (XSplicePat x), c (XLitPat x), c (XNPat x), c (XNPlusKPat x), c (XSigPat x), c (XCoPat x), c (XXPat x))
- type family XHsQTvs x :: Type
- type family XXLHsQTyVars x :: Type
- type ForallXLHsQTyVars (c :: Type -> Constraint) x = (c (XHsQTvs x), c (XXLHsQTyVars x))
- type family XHsIB x b :: Type
- type family XXHsImplicitBndrs x b :: Type
- type ForallXHsImplicitBndrs (c :: Type -> Constraint) x b = (c (XHsIB x b), c (XXHsImplicitBndrs x b))
- type family XHsWC x b :: Type
- type family XXHsWildCardBndrs x b :: Type
- type ForallXHsWildCardBndrs (c :: Type -> Constraint) x b = (c (XHsWC x b), c (XXHsWildCardBndrs x b))
- type family XForAllTy x :: Type
- type family XQualTy x :: Type
- type family XTyVar x :: Type
- type family XAppTy x :: Type
- type family XFunTy x :: Type
- type family XListTy x :: Type
- type family XTupleTy x :: Type
- type family XSumTy x :: Type
- type family XOpTy x :: Type
- type family XParTy x :: Type
- type family XIParamTy x :: Type
- type family XStarTy x :: Type
- type family XKindSig x :: Type
- type family XSpliceTy x :: Type
- type family XDocTy x :: Type
- type family XBangTy x :: Type
- type family XRecTy x :: Type
- type family XExplicitListTy x :: Type
- type family XExplicitTupleTy x :: Type
- type family XTyLit x :: Type
- type family XWildCardTy x :: Type
- type family XXType x :: Type
- type ForallXType (c :: Type -> Constraint) x = (c (XForAllTy x), c (XQualTy x), c (XTyVar x), c (XAppTy x), c (XFunTy x), c (XListTy x), c (XTupleTy x), c (XSumTy x), c (XOpTy x), c (XParTy x), c (XIParamTy x), c (XStarTy x), c (XKindSig x), c (XSpliceTy x), c (XDocTy x), c (XBangTy x), c (XRecTy x), c (XExplicitListTy x), c (XExplicitTupleTy x), c (XTyLit x), c (XWildCardTy x), c (XXType x))
- type family XUserTyVar x :: Type
- type family XKindedTyVar x :: Type
- type family XXTyVarBndr x :: Type
- type ForallXTyVarBndr (c :: Type -> Constraint) x = (c (XUserTyVar x), c (XKindedTyVar x), c (XXTyVarBndr x))
- type family XConDeclField x :: Type
- type family XXConDeclField x :: Type
- type ForallXConDeclField (c :: Type -> Constraint) x = (c (XConDeclField x), c (XXConDeclField x))
- type family XCFieldOcc x :: Type
- type family XXFieldOcc x :: Type
- type ForallXFieldOcc (c :: Type -> Constraint) x = (c (XCFieldOcc x), c (XXFieldOcc x))
- type family XCImportDecl x :: Type
- type family XXImportDecl x :: Type
- type ForallXImportDecl (c :: Type -> Constraint) x = (c (XCImportDecl x), c (XXImportDecl x))
- type family XIEVar x :: Type
- type family XIEThingAbs x :: Type
- type family XIEThingAll x :: Type
- type family XIEThingWith x :: Type
- type family XIEModuleContents x :: Type
- type family XIEGroup x :: Type
- type family XIEDoc x :: Type
- type family XIEDocNamed x :: Type
- type family XXIE x :: Type
- type ForallXIE (c :: Type -> Constraint) x = (c (XIEVar x), c (XIEThingAbs x), c (XIEThingAll x), c (XIEThingWith x), c (XIEModuleContents x), c (XIEGroup x), c (XIEDoc x), c (XIEDocNamed x), c (XXIE x))
- class Convertable a b | a -> b where
- convert :: a -> b
- type ConvertIdX a b = (XHsDoublePrim a ~ XHsDoublePrim b, XHsFloatPrim a ~ XHsFloatPrim b, XHsRat a ~ XHsRat b, XHsInteger a ~ XHsInteger b, XHsWord64Prim a ~ XHsWord64Prim b, XHsInt64Prim a ~ XHsInt64Prim b, XHsWordPrim a ~ XHsWordPrim b, XHsIntPrim a ~ XHsIntPrim b, XHsInt a ~ XHsInt b, XHsStringPrim a ~ XHsStringPrim b, XHsString a ~ XHsString b, XHsCharPrim a ~ XHsCharPrim b, XHsChar a ~ XHsChar b, XXLit a ~ XXLit b)
- type OutputableX p = (Outputable (XSigPat p), Outputable (XSigPat GhcRn), Outputable (XIPBinds p), Outputable (XExprWithTySig p), Outputable (XExprWithTySig GhcRn), Outputable (XAppTypeE p), Outputable (XAppTypeE GhcRn), Outputable (XViaStrategy p), Outputable (XViaStrategy GhcRn))
- type OutputableBndrId id = (OutputableBndr (NameOrRdrName (IdP id)), OutputableBndr (IdP id), OutputableX id)
- placeHolderNamesTc :: NameSet
- type family NameOrRdrName id :: Type where ...
- isExportedId :: Var -> Bool
- isGlobalId :: Var -> Bool
- isLocalId :: Var -> Bool
- type Id = Var
- type TyVar = Var
- data Token
- unicodeAnn :: AnnKeywordId -> AnnKeywordId
- getAndRemoveAnnotationComments :: ApiAnns -> SrcSpan -> ([Located AnnotationComment], ApiAnns)
- getAnnotationComments :: ApiAnns -> SrcSpan -> [Located AnnotationComment]
- getAndRemoveAnnotation :: ApiAnns -> SrcSpan -> AnnKeywordId -> ([SrcSpan], ApiAnns)
- getAnnotation :: ApiAnns -> SrcSpan -> AnnKeywordId -> [SrcSpan]
- type ApiAnns = (Map ApiAnnKey [SrcSpan], Map SrcSpan [Located AnnotationComment])
- data AnnKeywordId
- = AnnAnyclass
- | AnnAs
- | AnnAt
- | AnnBang
- | AnnBackquote
- | AnnBy
- | AnnCase
- | AnnClass
- | AnnClose
- | AnnCloseB
- | AnnCloseBU
- | AnnCloseC
- | AnnCloseQ
- | AnnCloseQU
- | AnnCloseP
- | 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
- | AnnMdo
- | AnnMinus
- | AnnModule
- | AnnNewtype
- | AnnName
- | AnnOf
- | AnnOpen
- | AnnOpenB
- | AnnOpenBU
- | AnnOpenC
- | AnnOpenE
- | AnnOpenEQ
- | AnnOpenEQU
- | AnnOpenP
- | AnnOpenPE
- | AnnOpenPTE
- | AnnOpenS
- | AnnPackageName
- | AnnPattern
- | AnnProc
- | AnnQualified
- | AnnRarrow
- | AnnRarrowU
- | AnnRec
- | AnnRole
- | AnnSafe
- | AnnSemi
- | AnnSimpleQuote
- | AnnSignature
- | AnnStatic
- | AnnStock
- | AnnThen
- | AnnThIdSplice
- | AnnThIdTySplice
- | AnnThTyQuote
- | AnnTilde
- | AnnType
- | AnnUnit
- | AnnUsing
- | AnnVal
- | AnnValStr
- | AnnVbar
- | AnnVia
- | AnnWhere
- | Annlarrowtail
- | AnnlarrowtailU
- | Annrarrowtail
- | AnnrarrowtailU
- | AnnLarrowtail
- | AnnLarrowtailU
- | AnnRarrowtail
- | AnnRarrowtailU
- | AnnEofPos
- data AnnotationComment
- data RdrName
- prettyPrintGhcErrors :: ExceptionMonad m => DynFlags -> m a -> m a
- emptyArgDocMap :: ArgDocMap
- emptyDeclDocMap :: DeclDocMap
- concatDocs :: [HsDocString] -> Maybe HsDocString
- appendDocs :: HsDocString -> HsDocString -> HsDocString
- ppr_mbDoc :: Maybe LHsDocString -> SDoc
- hsDocStringToByteString :: HsDocString -> ByteString
- unpackHDS :: HsDocString -> String
- mkHsDocStringUtf8ByteString :: ByteString -> HsDocString
- mkHsDocString :: String -> HsDocString
- data HsDocString
- type LHsDocString = Located HsDocString
- newtype DeclDocMap = DeclDocMap (Map Name HsDocString)
- newtype ArgDocMap = ArgDocMap (Map Name (Map Int HsDocString))
- nameModule :: HasDebugCallStack -> Name -> Module
- isExternalName :: Name -> Bool
- nameSrcSpan :: Name -> SrcSpan
- class NamedThing a where
- getOccName :: a -> OccName
- getName :: a -> Name
- gopt :: GeneralFlag -> DynFlags -> Bool
- defaultObjectTarget :: Platform -> HscTarget
- data SafeHaskellMode
- data HscTarget
- data GhcMode
- data GhcLink
- data Phase
- pprModule :: Module -> SDoc
- mkModule :: UnitId -> ModuleName -> Module
- mkModuleName :: String -> ModuleName
- moduleNameString :: ModuleName -> String
- ml_hs_file :: ModLocation -> Maybe FilePath
- ml_hi_file :: ModLocation -> FilePath
- ml_obj_file :: ModLocation -> FilePath
- failed :: SuccessFlag -> Bool
- succeeded :: SuccessFlag -> Bool
- compareFixity :: Fixity -> Fixity -> (Bool, Bool)
- negateFixity :: Fixity
- defaultFixity :: Fixity
- maxPrecedence :: Int
- data Fixity
- data FixityDirection
- data LexicalFixity
- data SuccessFlag
- data SpliceExplicitFlag
- data Severity
- isSubspanOf :: SrcSpan -> SrcSpan -> Bool
- spans :: SrcSpan -> (Int, Int) -> Bool
- leftmost_largest :: SrcSpan -> SrcSpan -> Ordering
- leftmost_smallest :: SrcSpan -> SrcSpan -> Ordering
- rightmost :: SrcSpan -> SrcSpan -> Ordering
- cmpLocated :: Ord a => Located a -> Located a -> Ordering
- eqLocated :: Eq a => Located a -> Located a -> Bool
- addCLoc :: Located a -> Located b -> c -> Located c
- combineLocs :: Located a -> Located b -> SrcSpan
- mkGeneralLocated :: String -> e -> Located e
- noLoc :: e -> Located e
- unLoc :: GenLocated l e -> e
- srcSpanEnd :: SrcSpan -> SrcLoc
- srcSpanStart :: SrcSpan -> SrcLoc
- srcSpanEndCol :: RealSrcSpan -> Int
- srcSpanStartCol :: RealSrcSpan -> Int
- srcSpanEndLine :: RealSrcSpan -> Int
- srcSpanStartLine :: RealSrcSpan -> Int
- isGoodSrcSpan :: SrcSpan -> Bool
- mkSrcSpan :: SrcLoc -> SrcLoc -> SrcSpan
- srcLocSpan :: SrcLoc -> SrcSpan
- noSrcSpan :: SrcSpan
- srcLocCol :: RealSrcLoc -> Int
- srcLocLine :: RealSrcLoc -> Int
- srcLocFile :: RealSrcLoc -> FastString
- noSrcLoc :: SrcLoc
- mkSrcLoc :: FastString -> Int -> Int -> SrcLoc
- data RealSrcLoc
- data SrcLoc
- data RealSrcSpan
- data SrcSpan
- data GenLocated l e = L l e
- type Located = GenLocated SrcSpan
- data Type
- data TyThing
- type PredType = Type
- type Kind = Type
- type ThetaType = [PredType]
- alwaysQualify :: PrintUnqualified
- data PrintUnqualified
- data Module
- data ModuleName
- data UnitId
- isFunTyCon :: TyCon -> Bool
- data TyCon
- data DynFlags = DynFlags {
- ghcMode :: GhcMode
- ghcLink :: GhcLink
- hscTarget :: HscTarget
- settings :: Settings
- llvmTargets :: LlvmTargets
- llvmPasses :: LlvmPasses
- verbosity :: Int
- optLevel :: Int
- debugLevel :: Int
- simplPhases :: Int
- maxSimplIterations :: Int
- maxPmCheckIterations :: Int
- ruleCheck :: Maybe String
- inlineCheck :: Maybe String
- strictnessBefore :: [Int]
- parMakeCount :: Maybe Int
- enableTimeStats :: Bool
- ghcHeapSize :: Maybe Int
- maxRelevantBinds :: Maybe Int
- maxValidHoleFits :: Maybe Int
- maxRefHoleFits :: Maybe Int
- refLevelHoleFits :: Maybe Int
- maxUncoveredPatterns :: Int
- simplTickFactor :: Int
- specConstrThreshold :: Maybe Int
- specConstrCount :: Maybe Int
- specConstrRecursive :: Int
- liberateCaseThreshold :: Maybe Int
- floatLamArgs :: Maybe Int
- cmmProcAlignment :: Maybe Int
- historySize :: Int
- importPaths :: [FilePath]
- mainModIs :: Module
- mainFunIs :: Maybe String
- reductionDepth :: IntWithInf
- solverIterations :: IntWithInf
- thisInstalledUnitId :: InstalledUnitId
- thisComponentId_ :: Maybe ComponentId
- thisUnitIdInsts_ :: Maybe [(ModuleName, Module)]
- ways :: [Way]
- buildTag :: String
- splitInfo :: Maybe (String, Int)
- objectDir :: Maybe String
- dylibInstallName :: Maybe String
- hiDir :: Maybe String
- stubDir :: Maybe String
- dumpDir :: Maybe String
- objectSuf :: String
- hcSuf :: String
- hiSuf :: String
- canGenerateDynamicToo :: IORef Bool
- dynObjectSuf :: String
- dynHiSuf :: String
- outputFile :: Maybe String
- dynOutputFile :: Maybe String
- outputHi :: Maybe String
- dynLibLoader :: DynLibLoader
- dumpPrefix :: Maybe FilePath
- dumpPrefixForce :: Maybe FilePath
- ldInputs :: [Option]
- includePaths :: IncludeSpecs
- libraryPaths :: [String]
- frameworkPaths :: [String]
- cmdlineFrameworks :: [String]
- rtsOpts :: Maybe String
- rtsOptsEnabled :: RtsOptsEnabled
- rtsOptsSuggestions :: Bool
- hpcDir :: String
- pluginModNames :: [ModuleName]
- pluginModNameOpts :: [(ModuleName, String)]
- frontendPluginOpts :: [String]
- plugins :: [LoadedPlugin]
- hooks :: Hooks
- depMakefile :: FilePath
- depIncludePkgDeps :: Bool
- depExcludeMods :: [ModuleName]
- depSuffixes :: [String]
- packageDBFlags :: [PackageDBFlag]
- ignorePackageFlags :: [IgnorePackageFlag]
- packageFlags :: [PackageFlag]
- pluginPackageFlags :: [PackageFlag]
- trustFlags :: [TrustFlag]
- packageEnv :: Maybe FilePath
- pkgDatabase :: Maybe [(FilePath, [PackageConfig])]
- pkgState :: PackageState
- filesToClean :: IORef FilesToClean
- dirsToClean :: IORef (Map FilePath FilePath)
- nextTempSuffix :: IORef Int
- generatedDumps :: IORef (Set FilePath)
- dumpFlags :: EnumSet DumpFlag
- generalFlags :: EnumSet GeneralFlag
- warningFlags :: EnumSet WarningFlag
- fatalWarningFlags :: EnumSet WarningFlag
- language :: Maybe Language
- safeHaskell :: SafeHaskellMode
- safeInfer :: Bool
- safeInferred :: Bool
- thOnLoc :: SrcSpan
- newDerivOnLoc :: SrcSpan
- overlapInstLoc :: SrcSpan
- incoherentOnLoc :: SrcSpan
- pkgTrustOnLoc :: SrcSpan
- warnSafeOnLoc :: SrcSpan
- warnUnsafeOnLoc :: SrcSpan
- trustworthyOnLoc :: SrcSpan
- extensions :: [OnOff Extension]
- extensionFlags :: EnumSet Extension
- ufCreationThreshold :: Int
- ufUseThreshold :: Int
- ufFunAppDiscount :: Int
- ufDictDiscount :: Int
- ufKeenessFactor :: Float
- ufDearOp :: Int
- ufVeryAggressive :: Bool
- maxWorkerArgs :: Int
- ghciHistSize :: Int
- log_action :: LogAction
- flushOut :: FlushOut
- flushErr :: FlushErr
- ghcVersionFile :: Maybe FilePath
- haddockOptions :: Maybe String
- ghciScripts :: [String]
- pprUserLength :: Int
- pprCols :: Int
- useUnicode :: Bool
- useColor :: OverridingBool
- canUseColor :: Bool
- colScheme :: Scheme
- profAuto :: ProfAuto
- interactivePrint :: Maybe String
- nextWrapperNum :: IORef (ModuleEnv Int)
- sseVersion :: Maybe SseVersion
- bmiVersion :: Maybe BmiVersion
- avx :: Bool
- avx2 :: Bool
- avx512cd :: Bool
- avx512er :: Bool
- avx512f :: Bool
- avx512pf :: Bool
- rtldInfo :: IORef (Maybe LinkerInfo)
- rtccInfo :: IORef (Maybe CompilerInfo)
- maxInlineAllocSize :: Int
- maxInlineMemcpyInsns :: Int
- maxInlineMemsetInsns :: Int
- reverseErrors :: Bool
- maxErrors :: Maybe Int
- initialUnique :: Int
- uniqueIncrement :: Int
- data GeneralFlag
- = Opt_DumpToFile
- | Opt_D_faststring_stats
- | Opt_D_dump_minimal_imports
- | Opt_DoCoreLinting
- | Opt_DoStgLinting
- | Opt_DoCmmLinting
- | Opt_DoAsmLinting
- | Opt_DoAnnotationLinting
- | Opt_NoLlvmMangler
- | Opt_FastLlvm
- | Opt_WarnIsError
- | Opt_ShowWarnGroups
- | Opt_HideSourcePaths
- | Opt_PrintExplicitForalls
- | Opt_PrintExplicitKinds
- | Opt_PrintExplicitCoercions
- | Opt_PrintExplicitRuntimeReps
- | Opt_PrintEqualityRelations
- | 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_StaticArgumentTransformation
- | Opt_CSE
- | Opt_StgCSE
- | 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_RegsGraph
- | Opt_RegsIterative
- | Opt_PedanticBottoms
- | Opt_LlvmTBAA
- | Opt_LlvmPassVectorsInRegisters
- | Opt_LlvmFillUndefWithGarbage
- | Opt_IrrefutableTuples
- | Opt_CmmSink
- | Opt_CmmElimCommonBlocks
- | Opt_AsmShortcutting
- | Opt_OmitYields
- | Opt_FunToThunk
- | Opt_DictsStrict
- | Opt_DmdTxDictSel
- | Opt_Loopification
- | Opt_CprAnal
- | Opt_WorkerWrapper
- | Opt_SolveConstantDicts
- | Opt_AlignmentSanitisation
- | Opt_CatchBottoms
- | Opt_NumConstantFolding
- | Opt_SimplPreInlining
- | Opt_IgnoreInterfacePragmas
- | Opt_OmitInterfacePragmas
- | Opt_ExposeAllUnfoldings
- | Opt_WriteInterface
- | Opt_AutoSccsOnIndividualCafs
- | Opt_ProfCountEntries
- | Opt_Pp
- | Opt_ForceRecomp
- | Opt_IgnoreOptimChanges
- | Opt_IgnoreHpcChanges
- | Opt_ExcessPrecision
- | Opt_EagerBlackHoling
- | Opt_NoHsMain
- | Opt_SplitObjs
- | 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_LocalGhciHistory
- | Opt_NoIt
- | Opt_HelpfulErrors
- | Opt_DeferTypeErrors
- | Opt_DeferTypedHoles
- | Opt_DeferOutOfScopeVariables
- | Opt_PIC
- | Opt_PIE
- | Opt_PICExecutable
- | Opt_ExternalDynamicRefs
- | Opt_SccProfilingOn
- | Opt_Ticky
- | Opt_Ticky_Allocd
- | Opt_Ticky_LNE
- | Opt_Ticky_Dyn_Thunk
- | Opt_RPath
- | Opt_RelativeDynlibPaths
- | Opt_Hpc
- | Opt_FlatCache
- | Opt_ExternalInterpreter
- | Opt_OptimalApplicativeDo
- | Opt_VersionMacros
- | Opt_WholeArchiveHsLibs
- | Opt_SingleLibFolder
- | Opt_ErrorSpans
- | 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_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_SuppressStgFreeVars
- | Opt_SuppressTicks
- | Opt_SuppressTimestamps
- | Opt_AutoLinkPackages
- | Opt_ImplicitImportQualified
- | Opt_KeepHiDiffs
- | Opt_KeepHcFiles
- | Opt_KeepSFiles
- | Opt_KeepTmpFiles
- | Opt_KeepRawTokenStream
- | Opt_KeepLlvmFiles
- | Opt_KeepHiFiles
- | Opt_KeepOFiles
- | Opt_BuildDynamicToo
- | Opt_DistrustAllPackages
- | Opt_PackageTrust
- | Opt_G_NoStateHack
- | Opt_G_NoOptCoercion
- withSignalHandlers :: (ExceptionMonad m, MonadIO m) => m a -> m a
- showGhcException :: GhcException -> ShowS
- data GhcException
- data Name
- gcatch :: (ExceptionMonad m, Exception e) => m a -> (e -> m a) -> m a
- gbracket :: ExceptionMonad m => m a -> (a -> m b) -> (a -> m c) -> m c
- gfinally :: ExceptionMonad m => m a -> m b -> m a
- type ForeignHValue = ForeignRef HValue
- data HValue
- coreModule :: DesugaredMod m => m -> ModGuts
- type Span = RealSrcSpan
- hieVersion :: Integer
- data HieFile = HieFile {}
- type TypeIndex = Int
- data HieType a
- = HTyVarTy Name
- | HAppTy a a
- | HTyConApp IfaceTyCon (HieArgs a)
- | HForAllTy ((Name, a), ArgFlag) a
- | HFunTy a a
- | HQualTy a a
- | HLitTy IfaceTyLit
- | HCastTy a
- | HCoercionTy
- type HieTypeFlat = HieType TypeIndex
- newtype HieTypeFix = Roll (HieType HieTypeFix)
- newtype HieArgs a = HieArgs [(Bool, a)]
- newtype HieASTs a = HieASTs {
- getAsts :: Map FastString (HieAST a)
- data HieAST a = Node {}
- data NodeInfo a = NodeInfo {
- nodeAnnotations :: Set (FastString, FastString)
- nodeType :: [a]
- nodeIdentifiers :: NodeIdentifiers a
- type Identifier = Either ModuleName Name
- type NodeIdentifiers a = Map Identifier (IdentifierDetails a)
- data IdentifierDetails a = IdentifierDetails {
- identType :: Maybe a
- identInfo :: Set ContextInfo
- data ContextInfo
- data IEType
- = Import
- | ImportAs
- | ImportHiding
- | Export
- data RecFieldContext
- data BindType
- data DeclType
- data Scope
- data TyVarScope
- = ResolvedScopes [Scope]
- | UnresolvedScope [Name] (Maybe Span)
- generateReferencesMap :: Foldable f => f (HieAST a) -> Map Identifier [(Span, IdentifierDetails a)]
- renderHieType :: DynFlags -> HieTypeFix -> String
- resolveVisibility :: Type -> [Type] -> [(Bool, Type)]
- foldType :: (HieType a -> a) -> HieTypeFix -> a
- hieTypeToIface :: HieTypeFix -> IfaceType
- data HieTypeState = HTS {
- tyMap :: !(TypeMap TypeIndex)
- htyTable :: !(IntMap HieTypeFlat)
- freshIndex :: !TypeIndex
- initialHTS :: HieTypeState
- freshTypeIndex :: State HieTypeState TypeIndex
- compressTypes :: HieASTs Type -> (HieASTs TypeIndex, Array TypeIndex HieTypeFlat)
- recoverFullType :: TypeIndex -> Array TypeIndex HieTypeFlat -> HieTypeFix
- getTypeIndex :: Type -> State HieTypeState TypeIndex
- resolveTyVarScopes :: Map FastString (HieAST a) -> Map FastString (HieAST a)
- resolveTyVarScopeLocal :: HieAST a -> Map FastString (HieAST a) -> HieAST a
- getNameBinding :: Name -> Map FastString (HieAST a) -> Maybe Span
- getNameScope :: Name -> Map FastString (HieAST a) -> Maybe [Scope]
- getNameBindingInClass :: Name -> Span -> Map FastString (HieAST a) -> Maybe Span
- getNameScopeAndBinding :: Name -> Map FastString (HieAST a) -> Maybe ([Scope], Maybe Span)
- getScopeFromContext :: ContextInfo -> Maybe [Scope]
- getBindSiteFromContext :: ContextInfo -> Maybe Span
- flattenAst :: HieAST a -> [HieAST a]
- smallestContainingSatisfying :: Span -> (HieAST a -> Bool) -> HieAST a -> Maybe (HieAST a)
- selectLargestContainedBy :: Span -> HieAST a -> Maybe (HieAST a)
- selectSmallestContaining :: Span -> HieAST a -> Maybe (HieAST a)
- definedInAsts :: Map FastString (HieAST a) -> Name -> Bool
- isOccurrence :: ContextInfo -> Bool
- scopeContainsSpan :: Scope -> Span -> Bool
- combineAst :: HieAST Type -> HieAST Type -> HieAST Type
- insertAst :: HieAST Type -> [HieAST Type] -> [HieAST Type]
- combineNodeInfo :: NodeInfo Type -> NodeInfo Type -> NodeInfo Type
- mergeAsts :: [HieAST Type] -> [HieAST Type] -> [HieAST Type]
- rightOf :: Span -> Span -> Bool
- leftOf :: Span -> Span -> Bool
- startsRightOf :: Span -> Span -> Bool
- mergeSortAsts :: [HieAST Type] -> [HieAST Type]
- simpleNodeInfo :: FastString -> FastString -> NodeInfo a
- locOnly :: SrcSpan -> [HieAST a]
- mkScope :: SrcSpan -> Scope
- mkLScope :: Located a -> Scope
- combineScopes :: Scope -> Scope -> Scope
- makeNode :: (Applicative m, Data a) => a -> SrcSpan -> m [HieAST b]
- makeTypeNode :: (Applicative m, Data a) => a -> SrcSpan -> Type -> m [HieAST Type]
Documentation
getHeaderImports :: DynFlags -> StringBuffer -> FilePath -> FilePath -> IO (Either ErrorMessages ([(Maybe FastString, Located ModuleName)], [(Maybe FastString, Located ModuleName)], Located ModuleName)) Source #
data HieFileResult Source #
GHC builds up a wealth of information about Haskell source as it compiles it.
.hie
files are a way of persisting some of this information to disk so that
external tools that need to work with haskell source don't need to parse,
typecheck, and rename all over again. These files contain:
a simplified AST
- nodes are annotated with source positions and types
- identifiers are annotated with scope information
- the raw bytes of the initial Haskell source
Besides saving compilation cycles, .hie
files also offer a more stable
interface than the GHC API.
HieFile | |
|
newtype NameCacheUpdater #
A function that atomically updates the name cache given a modifier function. The second result of the modifier function will be the result of the IO action.
NCU | |
|
mkHieFile :: ModSummary -> TcGblEnv -> RenamedSource -> ByteString -> Hsc HieFile Source #
Construct an HieFile
from the outputs of the typechecker.
writeHieFile :: FilePath -> HieFile -> IO () Source #
Write a HieFile
to the given FilePath
, with a proper header and
symbol tables for Name
s and FastString
s
readHieFile :: NameCacheUpdater -> FilePath -> IO HieFileResult Source #
dontWriteHieFiles :: DynFlags -> DynFlags Source #
ml_hie_file :: ModLocation -> FilePath Source #
hPutStringBuffer :: Handle -> StringBuffer -> IO () Source #
includePathsGlobal :: IncludeSpecs -> [String] #
includePathsQuote :: IncludeSpecs -> [String] #
getModuleHash :: ModIface -> Fingerprint Source #
getPackageName :: DynFlags -> InstalledUnitId -> Maybe PackageName Source #
pattern ForD :: ForeignDecl p -> HsDecl p Source #
pattern ClassOpSig :: Bool -> [Located (IdP pass)] -> LHsSigType pass -> Sig pass Source #
pattern IEThingAll :: LIEWrappedName (IdP pass) -> IE pass Source #
pattern IEThingWith :: LIEWrappedName (IdP pass) -> IEWildcard -> [LIEWrappedName (IdP pass)] -> [Located (FieldLbl (IdP pass))] -> IE pass Source #
pattern PatSynBind :: PatSynBind p p -> HsBind p Source #
data ModLocation #
Module Location
Where a module lives on the file system: the actual locations of the .hs, .hi and .o files, if we have them
Instances
Show ModLocation | |
Defined in Module showsPrec :: Int -> ModLocation -> ShowS # show :: ModLocation -> String # showList :: [ModLocation] -> ShowS # | |
Outputable ModLocation | |
Defined in Module ppr :: ModLocation -> SDoc # pprPrec :: Rational -> ModLocation -> SDoc # |
addBootSuffix :: FilePath -> FilePath #
Add the -boot
suffix to .hs, .hi and .o files
pattern ModLocation :: Maybe FilePath -> FilePath -> FilePath -> ModLocation Source #
getConArgs :: ConDecl pass -> HsConDeclDetails pass Source #
class HasSrcSpan a Source #
Instances
HasSrcSpan Name Source # | |
HasSrcSpan (GenLocated SrcSpan a) Source # | |
Defined in Development.IDE.GHC.Compat |
getLoc :: HasSrcSpan a => a -> SrcSpan Source #
:: String | Haskell module source text (full Unicode is supported) |
-> DynFlags | the flags |
-> FilePath | the filename (for source locations) |
-> (WarningMessages, Either ErrorMessages (Located (HsModule GhcPs))) |
A pure interface to the module parser.
getHistorySpan :: GhcMonad m => History -> m SrcSpan #
getGHCiMonad :: GhcMonad m => m Name #
Get the monad GHCi lifts user statements into.
setGHCiMonad :: GhcMonad m => String -> m () #
Set the monad GHCi lifts user statements into.
Checks that a type (in string form) is an instance of the
GHC.GHCi.GHCiSandboxIO
type class. Sets it to be the GHCi monad if it is,
throws an error otherwise.
moduleTrustReqs :: GhcMonad m => Module -> m (Bool, Set InstalledUnitId) #
Return if a module is trusted and the pkgs it depends on to be trusted.
isModuleTrusted :: GhcMonad m => Module -> m Bool #
Check that a module is safe to import (according to Safe Haskell).
We return True to indicate the import is safe and False otherwise although in the False case an error may be thrown first.
lookupModule :: GhcMonad m => ModuleName -> Maybe FastString -> m Module #
Like findModule
, but differs slightly when the module refers to
a source file, and the file has not been loaded via load
. In
this case, findModule
will throw an error (module not loaded),
but lookupModule
will check to see whether the module can also be
found in a package, and if so, that package Module
will be
returned. If not, the usual module-not-found error will be thrown.
findModule :: GhcMonad m => ModuleName -> Maybe FastString -> m Module #
Takes a ModuleName
and possibly a UnitId
, and consults the
filesystem and package database to find the corresponding Module
,
using the algorithm that is used for an import
declaration.
showRichTokenStream :: [(Located Token, String)] -> String #
Take a rich token stream such as produced from getRichTokenStream
and
return source code almost identical to the original code (except for
insignificant whitespace.)
addSourceToTokens :: RealSrcLoc -> StringBuffer -> [Located Token] -> [(Located Token, String)] #
Given a source location and a StringBuffer corresponding to this location, return a rich token stream with the source associated to the tokens.
getRichTokenStream :: GhcMonad m => Module -> m [(Located Token, String)] #
Give even more information on the source than getTokenStream
This function allows reconstructing the source completely with
showRichTokenStream
.
getTokenStream :: GhcMonad m => Module -> m [Located Token] #
Return module source as token stream, including comments.
The module must be in the module graph and its source must be available.
Throws a SourceError
on parse error.
pprParenSymName :: NamedThing a => a -> SDoc #
print a NamedThing
, adding parentheses if the name is an operator.
dataConType :: DataCon -> Type #
:: GhcMonad m | |
=> [Module] | visible modules. An orphan instance will be returned if it is visible from at least one module in the list. |
-> Maybe [Module] | modules to load. If this is not specified, we load modules for everything that is in scope unqualified. |
-> m (Messages, Maybe (NameEnv ([ClsInst], [FamInst]))) |
Retrieve all type and family instances in the environment, indexed
by Name
. Each name's lists will contain every instance in which that name
is mentioned in the instance head.
getGRE :: GhcMonad m => m GlobalRdrEnv #
get the GlobalRdrEnv for a session
lookupGlobalName :: GhcMonad m => Name -> m (Maybe TyThing) #
Looks up a global name: that is, any top-level name in any
visible module. Unlike lookupName
, lookupGlobalName does not use
the interactive context, and therefore does not require a preceding
setContext
.
isDictonaryId :: Id -> Bool #
modInfoModBreaks :: ModuleInfo -> ModBreaks #
modInfoSafe :: ModuleInfo -> SafeHaskellMode #
Retrieve module safe haskell mode
modInfoIface :: ModuleInfo -> Maybe ModIface #
modInfoLookupName :: GhcMonad m => ModuleInfo -> Name -> m (Maybe TyThing) #
mkPrintUnqualifiedForModule :: GhcMonad m => ModuleInfo -> m (Maybe PrintUnqualified) #
modInfoIsExportedName :: ModuleInfo -> Name -> Bool #
modInfoInstances :: ModuleInfo -> [ClsInst] #
Returns the instances defined by the specified module. Warning: currently unimplemented for package modules.
modInfoExportsWithSelectors :: ModuleInfo -> [Name] #
modInfoExports :: ModuleInfo -> [Name] #
modInfoTopLevelScope :: ModuleInfo -> Maybe [Name] #
modInfoTyThings :: ModuleInfo -> [TyThing] #
The list of top-level entities defined in a module
getModuleInfo :: GhcMonad m => Module -> m (Maybe ModuleInfo) #
Request information about a loaded Module
getPrintUnqual :: GhcMonad m => m PrintUnqualified #
getInsts :: GhcMonad m => m ([ClsInst], [FamInst]) #
Return the instances for the current interactive session.
getBindings :: GhcMonad m => m [TyThing] #
Return the bindings for the current interactive session.
getModuleGraph :: GhcMonad m => m ModuleGraph #
Get the module dependency graph.
compileToCoreSimplified :: GhcMonad m => FilePath -> m CoreModule #
Like compileToCoreModule, but invokes the simplifier, so as to return simplified and tidied Core.
compileToCoreModule :: GhcMonad m => FilePath -> m CoreModule #
This is the way to get access to the Core bindings corresponding
to a module. compileToCore
parses, typechecks, and
desugars the module, then returns the resulting Core module (consisting of
the module name, type declarations, and function declarations) if
successful.
loadModule :: (TypecheckedMod mod, GhcMonad m) => mod -> m mod #
Load a module. Input doesn't need to be desugared.
A module must be loaded before dependent modules can be typechecked. This
always includes generating a ModIface
and, depending on the
hscTarget
, may also include code generation.
This function will always cause recompilation and will always overwrite previous compilation results (potentially files on disk).
desugarModule :: GhcMonad m => TypecheckedModule -> m DesugaredModule #
Desugar a typechecked module.
typecheckModule :: GhcMonad m => ParsedModule -> m TypecheckedModule #
Typecheck and rename a parsed module.
Throws a SourceError
if either fails.
parseModule :: GhcMonad m => ModSummary -> m ParsedModule #
Parse a module.
Throws a SourceError
on parse error.
getModSummary :: GhcMonad m => ModuleName -> m ModSummary #
Return the ModSummary
of a module with the given name.
The module must be part of the module graph (see hsc_mod_graph
and
ModuleGraph
). If this is not the case, this function will throw a
GhcApiError
.
This function ignores boot modules and requires that there is only one non-boot module with the given name.
workingDirectoryChanged :: GhcMonad m => m () #
Inform GHC that the working directory has changed. GHC will flush its cache of module locations, since it may no longer be valid.
Note: Before changing the working directory make sure all threads running in the same session have stopped. If you change the working directory, you should also unload the current program (set targets to empty, followed by load).
guessTarget :: GhcMonad m => String -> Maybe Phase -> m Target #
Attempts to guess what Target a string refers to. This function
implements the --make
/GHCi command-line syntax for filenames:
- if the string looks like a Haskell source filename, then interpret it as such
- if adding a .hs or .lhs suffix yields the name of an existing file, then use that
- otherwise interpret the string as a module name
removeTarget :: GhcMonad m => TargetId -> m () #
Remove a target
getTargets :: GhcMonad m => m [Target] #
Returns the current set of targets
setTargets :: GhcMonad m => [Target] -> m () #
Sets the targets for this session. Each target may be a module name
or a filename. The targets correspond to the set of root modules for
the program/library. Unloading the current program is achieved by
setting the current set of targets to be empty, followed by load
.
parseDynamicFlags :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn]) #
getInteractiveDynFlags :: GhcMonad m => m DynFlags #
Get the DynFlags
used to evaluate interactive expressions.
setInteractiveDynFlags :: GhcMonad m => DynFlags -> m () #
Set the DynFlags
used to evaluate interactive expressions.
Note: this cannot be used for changes to packages. Use
setSessionDynFlags
, or setProgramDynFlags
and then copy the
pkgState
into the interactive DynFlags
.
getProgramDynFlags :: GhcMonad m => m DynFlags #
Returns the program DynFlags
.
setLogAction :: GhcMonad m => LogAction -> m () #
Set the action taken when the compiler produces a message. This
can also be accomplished using setProgramDynFlags
, but using
setLogAction
avoids invalidating the cached module graph.
setProgramDynFlags :: GhcMonad m => DynFlags -> m [InstalledUnitId] #
setSessionDynFlags :: GhcMonad m => DynFlags -> m [InstalledUnitId] #
Updates both the interactive and program DynFlags in a Session. This also reads the package database (unless it has already been read), and prepares the compilers knowledge about packages. It can be called again to load new packages: just add new package flags to (packageFlags dflags).
Returns a list of new packages that may need to be linked in using
the dynamic linker (see linkPackages
) as a result of new package
flags. If you are not doing linking or doing static linking, you
can ignore the list of packages returned.
initGhcMonad :: GhcMonad m => Maybe FilePath -> m () #
Initialise a GHC session.
If you implement a custom GhcMonad
you must call this function in the
monad run function. It will initialise the session variable and clear all
warnings.
The first argument should point to the directory where GHC's library files
reside. More precisely, this should be the output of ghc --print-libdir
of the version of GHC the module using this API is compiled with. For
portability, you should use the ghc-paths
package, available at
http://hackage.haskell.org/package/ghc-paths.
withCleanupSession :: GhcMonad m => m a -> m a #
:: ExceptionMonad m | |
=> Maybe FilePath | See argument to |
-> GhcT m a | The action to perform. |
-> m a |
Run function for GhcT
monad transformer.
It initialises the GHC session and warnings via initGhcMonad
. Each call
to this function will create a new session which should not be shared among
several threads.
:: Maybe FilePath | See argument to |
-> Ghc a | The action to perform. |
-> IO a |
Run function for the Ghc
monad.
It initialises the GHC session and warnings via initGhcMonad
. Each call
to this function will create a new session which should not be shared among
several threads.
Any errors not handled inside the Ghc
action are propagated as IO
exceptions.
defaultCleanupHandler :: ExceptionMonad m => DynFlags -> m a -> m a #
This function is no longer necessary, cleanup is now done by runGhc/runGhcT.
defaultErrorHandler :: ExceptionMonad m => FatalMessager -> FlushOut -> m a -> m a #
Install some default exception handlers and run the inner computation. Unless you want to handle exceptions yourself, you should wrap this around the top level of your program. The default handlers output the error message(s) to stderr and exit cleanly.
modSummary, parsedSource
parsedSource :: m -> ParsedSource #
Instances
ParsedMod ParsedModule | |
Defined in GHC | |
ParsedMod TypecheckedModule | |
Defined in GHC | |
ParsedMod DesugaredModule | |
Defined in GHC |
class ParsedMod m => TypecheckedMod m where #
renamedSource, typecheckedSource, moduleInfo, tm_internals
renamedSource :: m -> Maybe RenamedSource #
typecheckedSource :: m -> TypecheckedSource #
moduleInfo :: m -> ModuleInfo #
Instances
TypecheckedMod TypecheckedModule | |
Defined in GHC | |
TypecheckedMod DesugaredModule | |
Defined in GHC |
data ParsedModule #
The result of successful parsing.
Instances
Show ParsedModule Source # | |
Defined in Development.IDE.GHC.Orphans showsPrec :: Int -> ParsedModule -> ShowS # show :: ParsedModule -> String # showList :: [ParsedModule] -> ShowS # | |
NFData ParsedModule Source # | |
Defined in Development.IDE.GHC.Orphans rnf :: ParsedModule -> () # | |
ParsedMod ParsedModule | |
Defined in GHC |
data TypecheckedModule #
The result of successful typechecking. It also contains the parser result.
Instances
ParsedMod TypecheckedModule | |
Defined in GHC | |
TypecheckedMod TypecheckedModule | |
Defined in GHC |
data DesugaredModule #
The result of successful desugaring (i.e., translation to core). Also contains all the information of a typechecked module.
Instances
ParsedMod DesugaredModule | |
Defined in GHC | |
TypecheckedMod DesugaredModule | |
Defined in GHC | |
DesugaredMod DesugaredModule | |
Defined in GHC coreModule :: DesugaredModule -> ModGuts # |
type ParsedSource = Located (HsModule GhcPs) #
type RenamedSource = (HsGroup GhcRn, [LImportDecl GhcRn], Maybe [(LIE GhcRn, Avails)], Maybe LHsDocString) #
type TypecheckedSource = LHsBinds GhcTc #
data CoreModule #
A CoreModule consists of just the fields of a ModGuts
that are needed for
the compileToCoreModule
interface.
CoreModule | |
|
Instances
Show CoreModule Source # | |
Defined in Development.IDE.GHC.Orphans showsPrec :: Int -> CoreModule -> ShowS # show :: CoreModule -> String # showList :: [CoreModule] -> ShowS # | |
NFData CoreModule Source # | |
Defined in Development.IDE.GHC.Orphans rnf :: CoreModule -> () # | |
Outputable CoreModule | |
Defined in GHC ppr :: CoreModule -> SDoc # pprPrec :: Rational -> CoreModule -> SDoc # |
data ModuleInfo #
Container for information about a Module
.
cyclicModuleErr :: [ModSummary] -> SDoc #
:: Bool | Drop hi-boot nodes? (see below) |
-> ModuleGraph | |
-> Maybe ModuleName | Root module name. If |
-> [SCC ModSummary] |
Topological sort of the module graph
Calculate SCCs of the module graph, possibly dropping the hi-boot nodes The resulting list of strongly-connected-components is in topologically sorted order, starting with the module(s) at the bottom of the dependency graph (ie compile them first) and ending with the ones at the top.
Drop hi-boot nodes (first boolean arg)?
False
: treat the hi-boot summaries as nodes of the graph, so the graph must be acyclicTrue
: eliminate the hi-boot nodes, and instead pretend the a source-import of Foo is an import of Foo The resulting graph has no hi-boot nodes, but can be cyclic
load :: GhcMonad m => LoadHowMuch -> m SuccessFlag #
Try to load the program. See LoadHowMuch
for the different modes.
This function implements the core of GHC's --make
mode. It preprocesses,
compiles and loads the specified modules, avoiding re-compilation wherever
possible. Depending on the target (see hscTarget
) compiling
and loading may result in files being created on disk.
Calls the defaultWarnErrLogger
after each compiling each module, whether
successful or not.
Throw a SourceError
if errors are encountered before the actual
compilation starts (e.g., during dependency analysis). All other errors
are reported using the defaultWarnErrLogger
.
:: GhcMonad m | |
=> [ModuleName] | excluded modules |
-> Bool | allow duplicate roots |
-> m ModuleGraph |
Perform a dependency analysis starting from the current targets and update the session with the new module graph.
Dependency analysis entails parsing the import
directives and may
therefore require running certain preprocessors.
Note that each ModSummary
in the module graph caches its DynFlags
.
These DynFlags
are determined by the current session DynFlags
and the
OPTIONS
and LANGUAGE
pragmas of the parsed module. Thus if you want
changes to the DynFlags
to take effect you need to call this function
again.
data LoadHowMuch #
Describes which modules of the module graph need to be loaded.
LoadAllTargets | Load all targets and its dependencies. |
LoadUpTo ModuleName | Load only the given module and its dependencies. |
LoadDependenciesOf ModuleName | Load only the dependencies of the given module, but not the module itself. |
moduleIsBootOrNotObjectLinkable :: GhcMonad m => ModSummary -> m Bool #
showModule :: GhcMonad m => ModSummary -> m String #
dynCompileExpr :: GhcMonad m => String -> m Dynamic #
Compile an expression, run it and return the result as a Dynamic.
compileParsedExprRemote :: GhcMonad m => LHsExpr GhcPs -> m ForeignHValue #
Compile a parsed expression (before renaming), run it, and deliver the resulting HValue.
compileExprRemote :: GhcMonad m => String -> m ForeignHValue #
Compile an expression, run it, and deliver the resulting HValue.
compileExpr :: GhcMonad m => String -> m HValue #
Compile an expression, run it, and deliver the resulting HValue.
parseExpr :: GhcMonad m => String -> m (LHsExpr GhcPs) #
Parse an expression, the parsed expression can be further processed and passed to compileParsedExpr.
exprType :: GhcMonad m => TcRnExprMode -> String -> m Type #
Get the type of an expression
Returns the type as described by TcRnExprMode
getDocs :: GhcMonad m => Name -> m (Either GetDocsFailure (Maybe HsDocString, Map Int HsDocString)) #
isDecl :: DynFlags -> String -> Bool #
Returns True
if passed string is a declaration but not a splice.
parseName :: GhcMonad m => String -> m [Name] #
Parses a string as an identifier, and returns the list of Name
s that
the identifier can refer to in the current interactive context.
getRdrNamesInScope :: GhcMonad m => m [RdrName] #
Returns all RdrName
s in scope in the current interactive
context, excluding any that are internally-generated.
getNamesInScope :: GhcMonad m => m [Name] #
Returns all names in scope in the current interactive context
getInfo :: GhcMonad m => Bool -> Name -> m (Maybe (TyThing, Fixity, [ClsInst], [FamInst], SDoc)) #
Looks up an identifier in the current interactive context (for :info) Filter the instances by the ones whose tycons (or clases resp) are in scope (qualified or otherwise). Otherwise we list a whole lot too many! The exact choice of which ones to show, and which to hide, is a judgement call. (see Trac #1581)
moduleIsInterpreted :: GhcMonad m => Module -> m Bool #
Returns True
if the specified module is interpreted, and hence has
its full top-level scope available.
getContext :: GhcMonad m => m [InteractiveImport] #
Get the interactive evaluation context, consisting of a pair of the set of modules from which we take the full top-level scope, and the set of modules from which we take just the exports respectively.
setContext :: GhcMonad m => [InteractiveImport] -> m () #
Set the interactive evaluation context.
(setContext imports) sets the ic_imports field (which in turn
determines what is in scope at the prompt) to imports
, and
constructs the ic_rn_glb_env environment to reflect it.
We retain in scope all the things defined at the prompt, and kept in ic_tythings. (Indeed, they shadow stuff from ic_imports.)
abandonAll :: GhcMonad m => m Bool #
resumeExec :: GhcMonad m => (SrcSpan -> Bool) -> SingleStep -> m ExecResult #
parseImportDecl :: GhcMonad m => String -> m (ImportDecl GhcPs) #
runDeclsWithLocation :: GhcMonad m => String -> Int -> String -> m [Name] #
Run some declarations and return any user-visible names that were brought into scope.
:: GhcMonad m | |
=> String | a statement (bind or expression) |
-> ExecOptions | |
-> m ExecResult |
Run a statement in the current interactive context.
default ExecOptions
getHistoryModule :: History -> Module #
getResumeContext :: GhcMonad m => m [Resume] #
data GetDocsFailure #
Failure modes for getDocs
.
NameHasNoModule Name |
|
NoDocsInIface Module Bool |
|
InteractiveName | The |
Instances
Outputable GetDocsFailure | |
Defined in InteractiveEval ppr :: GetDocsFailure -> SDoc # pprPrec :: Rational -> GetDocsFailure -> SDoc # |
data TcRnExprMode #
How should we infer a type? See Note [TcRnExprMode]
TM_Inst | Instantiate the type fully (:type) |
TM_NoInst | Do not instantiate the type (:type +v) |
TM_Default | Default the type eagerly (:type +d) |
pprFamInst :: FamInst -> SDoc #
Pretty-prints a FamInst
(type/data family instance) with its defining location.
printException :: GhcMonad m => SourceError -> m () #
Print the error message and all warnings. Useful inside exception handlers. Clears warnings after printing.
getSessionDynFlags :: GhcMonad m => m DynFlags #
Grabs the DynFlags from the Session
class (Functor m, MonadIO m, ExceptionMonad m, HasDynFlags m) => GhcMonad (m :: Type -> Type) where #
A monad that has all the features needed by GHC API calls.
In short, a GHC monad
- allows embedding of IO actions,
- can log warnings,
- allows handling of (extensible) exceptions, and
- maintains a current session.
If you do not use Ghc
or GhcT
, make sure to call initGhcMonad
before any call to the GHC API functions can occur.
getSession :: m HscEnv #
setSession :: HscEnv -> m () #
Instances
GhcMonad Ghc | |
Defined in GhcMonad getSession :: Ghc HscEnv # setSession :: HscEnv -> Ghc () # | |
ExceptionMonad m => GhcMonad (GhcT m) | |
Defined in GhcMonad getSession :: GhcT m HscEnv # setSession :: HscEnv -> GhcT m () # |
A minimal implementation of a GhcMonad
. If you need a custom monad,
e.g., to maintain additional state consider wrapping this monad or using
GhcT
.
Instances
Monad Ghc | |
Functor Ghc | |
MonadFix Ghc | |
Applicative Ghc | |
MonadIO Ghc | |
GhcMonad Ghc | |
Defined in GhcMonad getSession :: Ghc HscEnv # setSession :: HscEnv -> Ghc () # | |
HasDynFlags Ghc | |
Defined in GhcMonad getDynFlags :: Ghc DynFlags # | |
ExceptionMonad Ghc | |
data GhcT (m :: Type -> Type) a #
A monad transformer to add GHC specific features to another monad.
Note that the wrapped monad must support IO and handling of exceptions.
Instances
Monad m => Monad (GhcT m) | |
Functor m => Functor (GhcT m) | |
Applicative m => Applicative (GhcT m) | |
MonadIO m => MonadIO (GhcT m) | |
ExceptionMonad m => GhcMonad (GhcT m) | |
Defined in GhcMonad getSession :: GhcT m HscEnv # setSession :: HscEnv -> GhcT m () # | |
MonadIO m => HasDynFlags (GhcT m) | |
Defined in GhcMonad getDynFlags :: GhcT m DynFlags # | |
ExceptionMonad m => ExceptionMonad (GhcT m) | |
type WarnErrLogger = forall (m :: Type -> Type). GhcMonad m => Maybe SourceError -> m () #
A function called to log warnings and errors.
ms_mod_name :: ModSummary -> ModuleName #
mkModuleGraph :: [ModSummary] -> ModuleGraph #
emptyMG :: ModuleGraph #
mgLookupModule :: ModuleGraph -> Module -> Maybe ModSummary #
Look up a ModSummary in the ModuleGraph
mgModSummaries :: ModuleGraph -> [ModSummary] #
mapMG :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph #
Map a function f
over all the ModSummaries
.
To preserve invariants f
can't change the isBoot status.
needsTemplateHaskellOrQQ :: ModuleGraph -> Bool #
Determines whether a set of modules requires Template Haskell or Quasi Quotes
Note that if the session's DynFlags
enabled Template Haskell when
depanal
was called, then each module in the returned module graph will
have Template Haskell enabled whether it is actually needed or not.
:: ExceptionMonad m | |
=> (SourceError -> m a) | exception handler |
-> m a | action to perform |
-> m a |
Perform the given action and call the exception handler if the action
throws a SourceError
. See SourceError
for more information.
HscEnv is like Session
, except that some of the fields are immutable.
An HscEnv is used to compile a single module from plain Haskell source
code (after preprocessing) to either C, assembly or C--. Things like
the module graph don't change during a single compilation.
Historical note: "hsc" used to be the name of the compiler binary, when there was a separate driver and compiler. To compile a single module, the driver would invoke hsc on the source code... so nowadays we think of hsc as the layer of the compiler that deals with compiling a single module.
A compilation target.
A target may be supplied with the actual text of the module. If so, use this instead of the file contents (this is for use in an IDE where the file hasn't been saved by the user yet).
Target | |
|
TargetModule ModuleName | A module name: search for the file |
TargetFile FilePath (Maybe Phase) | A filename: preprocess & parse it to find the module name. If specified, the Phase indicates how to compile this file (which phase to start from). Nothing indicates the starting phase should be determined from the suffix of the filename. |
A ModIface
plus a ModDetails
summarises everything we know
about a compiled module. The ModIface
is the stuff *before* linking,
and can be written out to an interface file. The 'ModDetails is after
linking and can be completely recovered from just the ModIface
.
When we read an interface file, we also construct a ModIface
from it,
except that we explicitly make the mi_decls
and a few other fields empty;
as when reading we consolidate the declarations etc. into a number of indexed
maps and environments in the ExternalPackageState
.
ModIface | |
|
data InteractiveImport #
IIDecl (ImportDecl GhcPs) | Bring the exports of a particular module (filtered by an import decl) into scope |
IIModule ModuleName | Bring into scope the entire top-level envt of of this module, including the things imported into it. |
Instances
Outputable InteractiveImport | |
Defined in HscTypes ppr :: InteractiveImport -> SDoc # pprPrec :: Rational -> InteractiveImport -> SDoc # |
data ModuleGraph #
A ModuleGraph contains all the nodes from the home package (only). There will be a node for each source module, plus a node for each hi-boot module.
The graph is not necessarily stored in topologically-sorted order. Use
topSortModuleGraph
and flattenSCC
to achieve this.
data ModSummary #
A single node in a ModuleGraph
. The nodes of the module graph
are one of:
- A regular Haskell source module
- A hi-boot source module
ModSummary | |
|
Instances
Show ModSummary Source # | |
Defined in Development.IDE.GHC.Orphans showsPrec :: Int -> ModSummary -> ShowS # show :: ModSummary -> String # showList :: [ModSummary] -> ShowS # | |
NFData ModSummary Source # | |
Defined in Development.IDE.GHC.Orphans rnf :: ModSummary -> () # | |
Outputable ModSummary | |
Defined in HscTypes ppr :: ModSummary -> SDoc # pprPrec :: Rational -> ModSummary -> SDoc # |
Haskell Module
All we actually declare here is the top-level structure for a module.
HsModule | |
|
Instances
Data (HsModule GhcPs) | |
Defined in HsSyn gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsModule GhcPs -> c (HsModule GhcPs) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsModule GhcPs) # toConstr :: HsModule GhcPs -> Constr # dataTypeOf :: HsModule GhcPs -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsModule GhcPs)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsModule GhcPs)) # gmapT :: (forall b. Data b => b -> b) -> HsModule GhcPs -> HsModule GhcPs # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcPs -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcPs -> r # gmapQ :: (forall d. Data d => d -> u) -> HsModule GhcPs -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsModule GhcPs -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsModule GhcPs -> m (HsModule GhcPs) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcPs -> m (HsModule GhcPs) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcPs -> m (HsModule GhcPs) # | |
Data (HsModule GhcRn) | |
Defined in HsSyn gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsModule GhcRn -> c (HsModule GhcRn) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsModule GhcRn) # toConstr :: HsModule GhcRn -> Constr # dataTypeOf :: HsModule GhcRn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsModule GhcRn)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsModule GhcRn)) # gmapT :: (forall b. Data b => b -> b) -> HsModule GhcRn -> HsModule GhcRn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcRn -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcRn -> r # gmapQ :: (forall d. Data d => d -> u) -> HsModule GhcRn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsModule GhcRn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsModule GhcRn -> m (HsModule GhcRn) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcRn -> m (HsModule GhcRn) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcRn -> m (HsModule GhcRn) # | |
Data (HsModule GhcTc) | |
Defined in HsSyn gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsModule GhcTc -> c (HsModule GhcTc) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsModule GhcTc) # toConstr :: HsModule GhcTc -> Constr # dataTypeOf :: HsModule GhcTc -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsModule GhcTc)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsModule GhcTc)) # gmapT :: (forall b. Data b => b -> b) -> HsModule GhcTc -> HsModule GhcTc # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcTc -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcTc -> r # gmapQ :: (forall d. Data d => d -> u) -> HsModule GhcTc -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsModule GhcTc -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsModule GhcTc -> m (HsModule GhcTc) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcTc -> m (HsModule GhcTc) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcTc -> m (HsModule GhcTc) # | |
(p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsModule p) | |
lPatImplicits :: LPat GhcRn -> NameSet #
hsValBindsImplicits :: HsValBindsLR GhcRn (GhcPass idR) -> NameSet #
hsDataFamInstBinders :: DataFamInstDecl pass -> ([Located (IdP pass)], [LFieldOcc pass]) #
getPatSynBinds :: [(RecFlag, LHsBinds id)] -> [PatSynBind id id] #
hsPatSynSelectors :: HsValBinds (GhcPass p) -> [IdP (GhcPass p)] #
hsForeignDeclsBinders :: [LForeignDecl pass] -> [Located (IdP pass)] #
hsLTyClDeclBinders :: Located (TyClDecl pass) -> ([Located (IdP pass)], [LFieldOcc pass]) #
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]
hsTyClForeignBinders :: [TyClGroup GhcRn] -> [LForeignDecl GhcRn] -> [Name] #
hsGroupBinders :: HsGroup GhcRn -> [Name] #
collectPatsBinders :: [LPat a] -> [IdP a] #
collectPatBinders :: LPat a -> [IdP a] #
collectMethodBinders :: LHsBindsLR idL idR -> [Located (IdP idL)] #
collectHsBindListBinders :: [LHsBindLR idL idR] -> [IdP idL] #
collectHsBindsBinders :: LHsBindsLR idL idR -> [IdP idL] #
collectHsBindBinders :: HsBindLR idL idR -> [IdP idL] #
collectHsValBinders :: HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)] #
collectHsIdBinders :: HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)] #
collectLocalBinders :: HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)] #
isBangedHsBind :: HsBind GhcTc -> Bool #
Is a binding a strict variable or pattern bind (e.g. !x = ...
)?
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 check] is DsBinds.
mkMatch :: HsMatchContext (NameOrRdrName (IdP (GhcPass p))) -> [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> Located (HsLocalBinds (GhcPass p)) -> LMatch (GhcPass p) (LHsExpr (GhcPass p)) #
mkPrefixFunRhs :: Located id -> HsMatchContext id #
Make a prefix, non-strict function HsMatchContext
isInfixFunBind :: HsBindLR id1 id2 -> Bool #
mkPatSynBind :: Located RdrName -> HsPatSynDetails (Located RdrName) -> LPat GhcPs -> HsPatSynDir GhcPs -> HsBind GhcPs #
mkHsWrapPatCo :: TcCoercionN -> Pat (GhcPass id) -> Type -> Pat (GhcPass id) #
mkLHsWrapCo :: TcCoercionN -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #
mkHsWrapCoR :: TcCoercionR -> HsExpr (GhcPass id) -> HsExpr (GhcPass id) #
mkHsWrapCo :: TcCoercionN -> HsExpr (GhcPass id) -> HsExpr (GhcPass id) #
typeToLHsType :: Type -> LHsType GhcPs #
Converting a Type to an HsType RdrName This is needed to implement GeneralizedNewtypeDeriving.
Note that we use getRdrName
extensively, which
generates Exact RdrNames rather than strings.
mkLHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs #
mkLHsSigType :: LHsType GhcPs -> LHsSigType GhcPs #
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
:: ([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 decompositon
nlHsIf :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #
nlWildPatName :: LPat GhcRn #
nlWildConPat :: DataCon -> LPat GhcPs #
nlNullaryConPat :: IdP id -> LPat id #
nlHsSyntaxApps :: SyntaxExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id) #
nlHsIntLit :: Integer -> LHsExpr (GhcPass p) #
nlHsDataCon :: DataCon -> LHsExpr GhcTc #
userHsTyVarBndrs :: SrcSpan -> [IdP (GhcPass p)] -> [LHsTyVarBndr (GhcPass p)] #
userHsLTyVarBndrs :: SrcSpan -> [Located (IdP (GhcPass p))] -> [LHsTyVarBndr (GhcPass p)] #
mkHsStringPrimLit :: FastString -> HsLit (GhcPass p) #
mkHsString :: String -> HsLit (GhcPass p) #
mkHsQuasiQuote :: RdrName -> SrcSpan -> FastString -> HsSplice GhcPs #
mkHsSpliceTy :: SpliceDecoration -> LHsExpr GhcPs -> HsType GhcPs #
mkHsSpliceTE :: SpliceDecoration -> LHsExpr GhcPs -> HsExpr GhcPs #
mkHsSpliceE :: SpliceDecoration -> LHsExpr GhcPs -> HsExpr GhcPs #
mkUntypedSplice :: SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs #
emptyRecStmtId :: StmtLR GhcTc GhcTc bodyR #
emptyRecStmtName :: StmtLR GhcRn GhcRn bodyR #
emptyRecStmt :: StmtLR (GhcPass idL) GhcPs bodyR #
mkBindStmt :: XBindStmt (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR))) ~ NoExt => LPat (GhcPass idL) -> Located (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR))) #
mkLastStmt :: Located (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR))) #
mkGroupByUsingStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs) #
mkTransformByStmt :: [Ex