From eccb07f7266fb428cb8f1a840bdec2886ea83f47 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Mon, 17 Jul 2017 16:33:12 +0100 Subject: [PATCH] polymorphic return type for die --- protolude.cabal | 2 +- src/Protolude.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/protolude.cabal b/protolude.cabal index 172380b85..03018910f 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -35,10 +35,10 @@ Source-Repository head library exposed-modules: Protolude + Unsafe other-modules: Exceptions - Unsafe Base Applicative Bool diff --git a/src/Protolude.hs b/src/Protolude.hs index 3d2cc1a8f..81c581060 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -604,9 +604,9 @@ show x = toS (PBase.show x) {-# SPECIALIZE show :: Show a => a -> String #-} #if MIN_VERSION_base(4,8,0) -die :: Text -> IO () +die :: Text -> IO a die err = System.Exit.die (toS err) #else -die :: Text -> IO () +die :: Text -> IO a die err = hPutStrLn stderr err >> exitFailure #endif