Commit 2b906af0 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

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
parent ad30c760
......@@ -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 ++ ")"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment