[commit: ghc] ghc-generics1: Fix whitespace in utils/Panic.lhs (a8f7ce4)
José Pedro Magalhães
jpm at cs.uu.nl
Fri Jun 8 14:31:54 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : ghc-generics1
http://hackage.haskell.org/trac/ghc/changeset/a8f7ce46be18271d9508e0a87f585c9d2f74b482
>---------------------------------------------------------------
commit a8f7ce46be18271d9508e0a87f585c9d2f74b482
Author: Ian Lynagh <igloo at earth.li>
Date: Tue Jun 5 21:43:27 2012 +0100
Fix whitespace in utils/Panic.lhs
>---------------------------------------------------------------
compiler/utils/Panic.lhs | 75 +++++++++++++++++++++-------------------------
1 files changed, 34 insertions(+), 41 deletions(-)
diff --git a/compiler/utils/Panic.lhs b/compiler/utils/Panic.lhs
index 1716a26..42594c8 100644
--- a/compiler/utils/Panic.lhs
+++ b/compiler/utils/Panic.lhs
@@ -8,13 +8,6 @@ It's hard to put these functions anywhere else without causing
some unnecessary loops in the module dependency graph.
\begin{code}
-{-# OPTIONS -fno-warn-tabs #-}
--- The above warning supression flag is a temporary kludge.
--- While working on this module you are encouraged to remove it and
--- detab the module (please do the detabbing in a separate patch). See
--- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
-
module Panic (
GhcException(..), showGhcException, throwGhcException, handleGhcException,
ghcError, progName,
@@ -37,7 +30,7 @@ import Data.Dynamic
#if __GLASGOW_HASKELL__ < 705
import Data.Maybe
#endif
-import Debug.Trace ( trace )
+import Debug.Trace ( trace )
import System.IO.Unsafe
import System.Exit
import System.Environment
@@ -62,7 +55,7 @@ import System.Mem.Weak ( Weak, deRefWeak )
-- error messages all take the form:
--
-- @
--- <location>: <error>
+-- <location>: <error>
-- @
--
-- If the location is on the command line, or in GHC itself, then
@@ -71,8 +64,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
+ = PhaseFailed String -- name of phase
+ ExitCode -- an external phase (eg. cpp) failed
-- | Some other fatal signal (SIGHUP,SIGTERM)
| Signal Int
@@ -137,36 +130,36 @@ safeShowException e = do
showGhcException :: GhcException -> String -> String
showGhcException exception
= case exception of
- 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
- ProgramError str -> showString str
- InstallationError str -> showString str
- Signal n -> showString "signal: " . shows n
-
- Panic s
- -> showString $
- "panic! (the 'impossible' happened)\n"
- ++ " (GHC version " ++ cProjectVersion ++ " for " ++ TargetPlatform_NAME ++ "):\n\t"
- ++ s ++ "\n\n"
- ++ "Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug\n"
-
- Sorry s
- -> showString $
- "sorry! (unimplemented feature or known bug)\n"
- ++ " (GHC version " ++ cProjectVersion ++ " for " ++ TargetPlatform_NAME ++ "):\n\t"
- ++ s ++ "\n"
-
- where int_code code =
- case code of
- ExitSuccess -> (0::Int)
- ExitFailure x -> x
+ 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
+ ProgramError str -> showString str
+ InstallationError str -> showString str
+ Signal n -> showString "signal: " . shows n
+
+ Panic s
+ -> showString $
+ "panic! (the 'impossible' happened)\n"
+ ++ " (GHC version " ++ cProjectVersion ++ " for " ++ TargetPlatform_NAME ++ "):\n\t"
+ ++ s ++ "\n\n"
+ ++ "Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug\n"
+
+ Sorry s
+ -> showString $
+ "sorry! (unimplemented feature or known bug)\n"
+ ++ " (GHC version " ++ cProjectVersion ++ " for " ++ TargetPlatform_NAME ++ "):\n\t"
+ ++ s ++ "\n"
+
+ where int_code code =
+ case code of
+ ExitSuccess -> (0::Int)
+ ExitFailure x -> x
-- | Alias for `throwGhcException`
More information about the Cvs-ghc
mailing list