summaryrefslogtreecommitdiff
path: root/compiler/iface
diff options
context:
space:
mode:
authorMichael Sloan <mgsloan@gmail.com>2019-03-14 15:47:44 -0700
committerMatthew Pickering <matthewtpickering@gmail.com>2019-05-24 16:55:07 +0100
commitd9dfbde30aa11afc87f25b73dc2d154a46ca24d4 (patch)
tree6a8172d4cbbbeb1533e3ca8146a107938e9ae173 /compiler/iface
parentc931f2561207aa06f1750827afbb68fbee241c6f (diff)
downloadhaskell-d9dfbde30aa11afc87f25b73dc2d154a46ca24d4.tar.gz
Add PlainPanic for throwing exceptions without depending on pprint
This commit splits out a subset of GhcException which do not depend on pretty printing (SDoc), as a new datatype called PlainGhcException. These exceptions can be caught as GhcException, because 'fromException' will convert them. The motivation for this change is that that the Panic module transitively depends on many modules, primarily due to pretty printing code. It's on the order of about 130 modules. This large set of dependencies has a few implications: 1. To avoid cycles / use of boot files, these dependencies cannot throw GhcException. 2. There are some utility modules that use UnboxedTuples and also use `panic`. This means that when loading GHC into GHCi, about 130 additional modules would need to be compiled instead of interpreted. Splitting the non-pprint exception throwing into a new module resolves this issue. See #13101
Diffstat (limited to 'compiler/iface')
-rw-r--r--compiler/iface/BinFingerprint.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/iface/BinFingerprint.hs b/compiler/iface/BinFingerprint.hs
index 913ece0f27..1eef4d67b4 100644
--- a/compiler/iface/BinFingerprint.hs
+++ b/compiler/iface/BinFingerprint.hs
@@ -15,7 +15,7 @@ import GhcPrelude
import Fingerprint
import Binary
import Name
-import Panic
+import PlainPanic
import Util
fingerprintBinMem :: BinHandle -> IO Fingerprint