diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-02-16 22:45:57 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-02-16 22:46:06 +0100 |
commit | 2b906af0dab01c30c28792d39161e01449b85cb0 (patch) | |
tree | 3dc005200ecc4e3ec7c68bd27876854c8b331d73 | |
parent | ad30c760f55205174b3b3472bbcd85fc51fb65d0 (diff) | |
download | haskell-2b906af0dab01c30c28792d39161e01449b85cb0.tar.gz |
DynFlags: Don't panic on incompatible Safe Haskell flags
We just return an arbitrary value since we are destined to fail due to
the error anyways.
Fixes #11580.
Test Plan: Needs to be tested
Reviewers: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1925
GHC Trac Issues: #11580
-rw-r--r-- | compiler/main/DynFlags.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 6460b160bc..52da3005bf 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -1886,7 +1886,7 @@ combineSafeFlags :: SafeHaskellMode -> SafeHaskellMode -> DynP SafeHaskellMode combineSafeFlags a b | a == Sf_None = return b | b == Sf_None = return a | a == b = return a - | otherwise = addErr errm >> return (panic errm) + | otherwise = addErr errm >> pure a where errm = "Incompatible Safe Haskell flags! (" ++ show a ++ ", " ++ show b ++ ")" |