summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorDavid Feuer <david.feuer@gmail.com>2017-01-10 13:40:51 -0500
committerBen Gamari <ben@smart-cactus.org>2017-01-10 13:41:03 -0500
commiteee819943a0ea05af369fe3c728b865094e8fe33 (patch)
treecd5833c5c122c4e3c6783ed69e7932021a060f61 /compiler
parent6de7613604216f65fae92d8066a078bf9cd3c088 (diff)
downloadhaskell-eee819943a0ea05af369fe3c728b865094e8fe33.tar.gz
Remove deprecated InteractiveEval API
Remove `RunResult(..)`, `runStmt`, and `runStmtWithLocation`. These were all deprecated and documented as slated for removal in GHC 7.14, which I figure means 8.2. See cf7573b8207bbb17c58612f3345e0b17d74cfb58 for an explanation of why this change was made. Reviewers: simonpj, hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2949 GHC Trac Issues: #13095
Diffstat (limited to 'compiler')
-rw-r--r--compiler/main/GHC.hs5
-rw-r--r--compiler/main/InteractiveEval.hs41
2 files changed, 1 insertions, 45 deletions
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs
index 59e42f9c75..031bd155fa 100644
--- a/compiler/main/GHC.hs
+++ b/compiler/main/GHC.hs
@@ -147,11 +147,6 @@ module GHC (
InteractiveEval.back,
InteractiveEval.forward,
- -- ** Deprecated API
- RunResult(..),
- runStmt, runStmtWithLocation,
- resume,
-
-- * Abstract syntax elements
-- ** Packages
diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs
index 3cb1856725..3c2973d23e 100644
--- a/compiler/main/InteractiveEval.hs
+++ b/compiler/main/InteractiveEval.hs
@@ -15,7 +15,6 @@ module InteractiveEval (
runDecls, runDeclsWithLocation,
isStmt, hasImport, isImport, isDecl,
parseImportDecl, SingleStep(..),
- resume,
abandon, abandonAll,
getResumeContext,
getHistorySpan,
@@ -36,9 +35,7 @@ module InteractiveEval (
parseExpr, compileParsedExpr,
compileExpr, dynCompileExpr,
compileExprRemote, compileParsedExprRemote,
- Term(..), obtainTermFromId, obtainTermFromVal, reconstructType,
- -- * Depcreated API (remove in GHC 7.14)
- RunResult(..), runStmt, runStmtWithLocation,
+ Term(..), obtainTermFromId, obtainTermFromVal, reconstructType
) where
#include "HsVersions.h"
@@ -97,7 +94,6 @@ import Control.Monad
import GHC.Exts
import Data.Array
import Exception
-import Control.Concurrent
-- -----------------------------------------------------------------------------
-- running a statement interactively
@@ -195,38 +191,6 @@ execStmt stmt ExecOptions{..} = do
handleRunStatus execSingleStep stmt bindings ids
status (emptyHistory size)
--- | The type returned by the deprecated 'runStmt' and
--- 'runStmtWithLocation' API
-data RunResult
- = RunOk [Name] -- ^ names bound by this evaluation
- | RunException SomeException -- ^ statement raised an exception
- | RunBreak ThreadId [Name] (Maybe BreakInfo)
-
--- | Conver the old result type to the new result type
-execResultToRunResult :: ExecResult -> RunResult
-execResultToRunResult r =
- case r of
- ExecComplete{ execResult = Left ex } -> RunException ex
- ExecComplete{ execResult = Right names } -> RunOk names
- ExecBreak{..} -> RunBreak (error "no breakThreadId") breakNames breakInfo
-
--- Remove in GHC 7.14
-{-# DEPRECATED runStmt "use execStmt" #-}
--- | Run a statement in the current interactive context. Statement
--- may bind multple values.
-runStmt :: GhcMonad m => String -> SingleStep -> m RunResult
-runStmt stmt step =
- execResultToRunResult <$> execStmt stmt execOptions { execSingleStep = step }
-
--- Remove in GHC 7.14
-{-# DEPRECATED runStmtWithLocation "use execStmtWithLocation" #-}
-runStmtWithLocation :: GhcMonad m => String -> Int ->
- String -> SingleStep -> m RunResult
-runStmtWithLocation source linenumber expr step = do
- execResultToRunResult <$>
- execStmt expr execOptions { execSingleStep = step
- , execSourceFile = source
- , execLineNumber = linenumber }
runDecls :: GhcMonad m => String -> m [Name]
runDecls = runDeclsWithLocation "<interactive>" 1
@@ -375,9 +339,6 @@ handleRunStatus step expr bindings final_ids status history
= panic "not_tracing" -- actually exhaustive, but GHC can't tell
-resume :: GhcMonad m => (SrcSpan->Bool) -> SingleStep -> m RunResult
-resume canLogSpan step = execResultToRunResult <$> resumeExec canLogSpan step
-
resumeExec :: GhcMonad m => (SrcSpan->Bool) -> SingleStep -> m ExecResult
resumeExec canLogSpan step
= do