Skip to content
Snippets Groups Projects
Commit e3496ef6 authored by Cheng Shao's avatar Cheng Shao :beach: Committed by Marge Bot
Browse files

compiler: remove unused hscDecls/hscDeclsWithLocation

This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions
from the compiler, to reduce maintenance burden when doing
refactorings related to ghci.
parent e08b8370
No related branches found
No related tags found
No related merge requests found
......@@ -81,7 +81,7 @@ module GHC.Driver.Main
, hscRnImportDecls
, hscTcRnLookupRdrName
, hscStmt, hscParseStmtWithLocation, hscStmtWithLocation, hscParsedStmt
, hscDecls, hscParseDeclsWithLocation, hscDeclsWithLocation, hscParsedDecls
, hscParseDeclsWithLocation, hscParsedDecls
, hscParseModuleWithLocation
, hscTcExpr, TcRnExprMode(..), hscImport, hscKcType
, hscParseExpr
......@@ -2461,12 +2461,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 <-
......@@ -2479,18 +2473,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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment