From e6d50e71f0b11377c3839eee52ca08345bce7e8a Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Fri, 12 Oct 2018 00:35:11 +0200 Subject: Fix Show instance for Panic --- src/CabalHelper/Shared/Common.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/CabalHelper') diff --git a/src/CabalHelper/Shared/Common.hs b/src/CabalHelper/Shared/Common.hs index 1f0c49e..8e8418b 100644 --- a/src/CabalHelper/Shared/Common.hs +++ b/src/CabalHelper/Shared/Common.hs @@ -61,8 +61,10 @@ import System.FilePath import Text.ParserCombinators.ReadP import Prelude -data Panic = Panic String deriving (Typeable, Show) +data Panic = Panic String deriving (Typeable) instance Exception Panic +instance Show Panic where + show (Panic msg) = "panic! " ++ msg panic :: String -> a panic msg = throw $ Panic msg -- cgit v1.2.3