don't show stack trace details in errors with GHC 8+

This commit is contained in:
Simon Michael 2016-11-22 14:28:39 -08:00
parent 2eb5736abb
commit 3a5091e9eb

View File

@ -1,4 +1,4 @@
-- {-# LANGUAGE CPP #-}
{-# LANGUAGE CPP #-}
{- |
UTF-8 aware string IO functions that will work across multiple platforms
@ -119,7 +119,13 @@ toSystemString = id
-- | A SystemString-aware version of error.
error' :: String -> a
error' = error . toSystemString
error' =
#if __GLASGOW_HASKELL__ < 800
-- (easier than if base < 4.9)
error . toSystemString
#else
errorWithoutStackTrace . toSystemString
#endif
-- | A SystemString-aware version of userError.
userError' :: String -> IOError