diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs index ffd51384bb3f25fbe2d66d2cbc223aeb5224a357..d21f8c4f0f59a899ea3c7cb8d4b110922b39b546 100644 --- a/compiler/GHC/Driver/Main.hs +++ b/compiler/GHC/Driver/Main.hs @@ -83,7 +83,7 @@ module GHC.Driver.Main , hscRnImportDecls , hscTcRnLookupRdrName , hscStmt, hscParseStmtWithLocation, hscStmtWithLocation, hscParsedStmt - , hscDecls, hscParseDeclsWithLocation, hscDeclsWithLocation, hscParsedDecls + , hscParseDeclsWithLocation, hscParsedDecls , hscParseModuleWithLocation , hscTcExpr, TcRnExprMode(..), hscImport, hscKcType , hscParseExpr @@ -2275,12 +2275,6 @@ hscParsedStmt hsc_env stmt = runInteractiveHsc hsc_env $ do return $ Just (ids, hval, fix_env) --- | Compile a decls -hscDecls :: HscEnv - -> String -- ^ The statement - -> IO ([TyThing], InteractiveContext) -hscDecls hsc_env str = hscDeclsWithLocation hsc_env str "<interactive>" 1 - hscParseModuleWithLocation :: HscEnv -> String -> Int -> String -> IO (HsModule GhcPs) hscParseModuleWithLocation hsc_env source line_num str = do L _ mod <- @@ -2293,18 +2287,6 @@ hscParseDeclsWithLocation hsc_env source line_num str = do HsModule { hsmodDecls = decls } <- hscParseModuleWithLocation hsc_env source line_num str return decls --- | Compile a decls -hscDeclsWithLocation :: HscEnv - -> String -- ^ The statement - -> String -- ^ The source - -> Int -- ^ Starting line - -> IO ([TyThing], InteractiveContext) -hscDeclsWithLocation hsc_env str source linenumber = do - L _ (HsModule{ hsmodDecls = decls }) <- - runInteractiveHsc hsc_env $ - hscParseThingWithLocation source linenumber parseModule str - hscParsedDecls hsc_env decls - hscParsedDecls :: HscEnv -> [LHsDecl GhcPs] -> IO ([TyThing], InteractiveContext) hscParsedDecls hsc_env decls = runInteractiveHsc hsc_env $ do hsc_env <- getHscEnv