summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2015-09-23 00:56:03 +0200
committerBen Gamari <ben@smart-cactus.org>2015-09-23 11:56:28 +0200
commit65bf7baa81772b7f07a4c74d3510dbd2ef03592d (patch)
treefc6b180c3632dc2e070e568eedc8719b5893abcb /compiler
parentc6bdf4fb0b06ac55a7bb200f0ef31ea9a7a830ec (diff)
downloadhaskell-65bf7baa81772b7f07a4c74d3510dbd2ef03592d.tar.gz
DsBinds: Avoid using String when desugaring CallStack construction
Previously CallStacks would be built using String, which would pull in GHC.Base while compiling GHC.Err. Use [Char] instead.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/deSugar/DsBinds.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/deSugar/DsBinds.hs b/compiler/deSugar/DsBinds.hs
index 65760931f6..28e866d8e9 100644
--- a/compiler/deSugar/DsBinds.hs
+++ b/compiler/deSugar/DsBinds.hs
@@ -47,7 +47,7 @@ import Type
import Kind (returnsConstraintKind)
import Coercion hiding (substCo)
import TysWiredIn ( eqBoxDataCon, coercibleDataCon, mkListTy
- , mkBoxedTupleTy, stringTy, typeNatKind, typeSymbolKind )
+ , mkBoxedTupleTy, charTy, typeNatKind, typeSymbolKind )
import Id
import MkId(proxyHashId)
import Class
@@ -1023,7 +1023,10 @@ dsEvCallStack cs = do
, return $ mkIntExprInt df (srcSpanEndCol l)
])
- let callSiteTy = mkBoxedTupleTy [stringTy, srcLocTy]
+ -- Be careful to use [Char] instead of String here to avoid
+ -- unnecessary dependencies on GHC.Base, particularly when
+ -- building GHC.Err.absentError
+ let callSiteTy = mkBoxedTupleTy [mkListTy charTy, srcLocTy]
matchId <- newSysLocalDs $ mkListTy callSiteTy