summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
authorAdam Gundry <adam@well-typed.com>2015-10-16 13:58:52 +0100
committerAdam Gundry <adam@well-typed.com>2015-10-16 13:58:52 +0100
commit5a1b4f814f74ec1c48152d97523744518e212777 (patch)
tree7c2207ecacbd37f12c78dbcf9d4334827164e0fb /compiler/utils
parent6757950cdd8bb0af0355539987ee78401a6a8f6b (diff)
parent808bbdf08058785ae5bc59b5b4f2b04951d4cbbf (diff)
downloadhaskell-wip/orf-reboot.tar.gz
Merge remote-tracking branch 'origin/master' into wip/orf-rebootwip/orf-reboot
Conflicts: compiler/rename/RnNames.hs compiler/typecheck/TcRnMonad.hs utils/haddock
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/Outputable.hs6
-rw-r--r--compiler/utils/Panic.hs16
2 files changed, 4 insertions, 18 deletions
diff --git a/compiler/utils/Outputable.hs b/compiler/utils/Outputable.hs
index a730cdfdcf..23fa37d77a 100644
--- a/compiler/utils/Outputable.hs
+++ b/compiler/utils/Outputable.hs
@@ -82,7 +82,7 @@ import {-# SOURCE #-} DynFlags( DynFlags,
targetPlatform, pprUserLength, pprCols,
useUnicode, useUnicodeSyntax,
unsafeGlobalDynFlags )
-import {-# SOURCE #-} Module( PackageKey, Module, ModuleName, moduleName )
+import {-# SOURCE #-} Module( UnitId, Module, ModuleName, moduleName )
import {-# SOURCE #-} OccName( OccName )
import {-# SOURCE #-} StaticFlags( opt_PprStyle_Debug, opt_NoDebugOutput )
@@ -169,8 +169,8 @@ type QueryQualifyName = Module -> OccName -> QualifyName
type QueryQualifyModule = Module -> Bool
-- | For a given package, we need to know whether to print it with
--- the package key to disambiguate it.
-type QueryQualifyPackage = PackageKey -> Bool
+-- the unit id to disambiguate it.
+type QueryQualifyPackage = UnitId -> Bool
-- See Note [Printing original names] in HscTypes
data QualifyName -- Given P:M.T
diff --git a/compiler/utils/Panic.hs b/compiler/utils/Panic.hs
index e1c848d540..782333633a 100644
--- a/compiler/utils/Panic.hs
+++ b/compiler/utils/Panic.hs
@@ -36,7 +36,6 @@ import Control.Concurrent
import Data.Dynamic
import Debug.Trace ( trace )
import System.IO.Unsafe
-import System.Exit
import System.Environment
#ifndef mingw32_HOST_OS
@@ -63,11 +62,8 @@ import System.Mem.Weak ( Weak, deRefWeak )
-- assumed to contain a location already, so we don't print one).
data GhcException
- = PhaseFailed String -- name of phase
- ExitCode -- an external phase (eg. cpp) failed
-
-- | Some other fatal signal (SIGHUP,SIGTERM)
- | Signal Int
+ = Signal Int
-- | Prints the short usage msg after the error
| UsageError String
@@ -135,11 +131,6 @@ showGhcException exception
UsageError str
-> showString str . showChar '\n' . showString short_usage
- PhaseFailed phase code
- -> showString "phase `" . showString phase .
- showString "' failed (exitcode = " . shows (int_code code) .
- showString ")"
-
CmdLineError str -> showString str
PprProgramError str _ ->
showGhcException (ProgramError (str ++ "\n<<details unavailable>>"))
@@ -164,11 +155,6 @@ showGhcException exception
++ " (GHC version " ++ cProjectVersion ++ " for " ++ TargetPlatform_NAME ++ "):\n\t"
++ s ++ "\n"
- where int_code code =
- case code of
- ExitSuccess -> (0::Int)
- ExitFailure x -> x
-
throwGhcException :: GhcException -> a
throwGhcException = Exception.throw