Commit 65bf7baa authored by Ben Gamari's avatar Ben Gamari 🐢

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.
parent c6bdf4fb
......@@ -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
......
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