X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Futils%2FPanic.lhs;h=baf1bf3e28f2f0b5d7f12f49132818be6fbd08b2;hb=412e6ede94afaa638cd4d918278fcf2a27222993;hp=300e7fcbccc3cc6f4a69716aef71bdf721de4801;hpb=b1ab4b8a607addc4d097588db5761313c996a41f;p=ghc-hetmet.git diff --git a/compiler/utils/Panic.lhs b/compiler/utils/Panic.lhs index 300e7fc..baf1bf3 100644 --- a/compiler/utils/Panic.lhs +++ b/compiler/utils/Panic.lhs @@ -9,6 +9,13 @@ It's hard to put these functions anywhere else without causing some unnecessary loops in the module dependency graph. \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module Panic ( GhcException(..), showGhcException, ghcError, progName, @@ -28,11 +35,7 @@ import Config import FastTypes #ifndef mingw32_HOST_OS -# if __GLASGOW_HASKELL__ > 504 import System.Posix.Signals -# else -import Posix ( Handler(Catch), installHandler, sigINT, sigQUIT ) -# endif /* GHC > 504 */ #endif /* mingw32_HOST_OS */ #if defined(mingw32_HOST_OS) && __GLASGOW_HASKELL__ >= 603 @@ -171,11 +174,7 @@ tryMost action = do r <- try action; filter r tryUser :: IO a -> IO (Either Exception.Exception a) tryUser action = tryJust tc_errors action where -#if __GLASGOW_HASKELL__ > 504 tc_errors e@(Exception.IOException ioe) | isUserError ioe = Just e -#else - tc_errors e@(Exception.IOException ioe) | isUserError e = Just e -#endif tc_errors _other = Nothing \end{code}