diff options
author | Andreas Klebinger <klebinger.andreas@gmx.at> | 2021-02-21 16:04:20 +0100 |
---|---|---|
committer | Andreas Klebinger <klebinger.andreas@gmx.at> | 2021-02-22 15:37:11 +0100 |
commit | 3f3923a11246f8a211019fd95bfac831eefec4a3 (patch) | |
tree | 930e6e311483791a801eb4f1065acccfbea2ae08 /compiler/GHC/Core/Make.hs | |
parent | ddbdec4128f0e6760c8c7a19344f2f2a7a3314bf (diff) | |
download | haskell-wip/andreask/move_absentError.tar.gz |
Move absentError into ghc-prim.wip/andreask/move_absentError
When using -fdicts-strict we generate references to absentError while
compiling ghc-prim. However we always load ghc-prim before base so this
caused linker errors.
We simply solve this by moving absentError into ghc-prim. This does mean
it's now a panic instead of an exception which can no longer be caught.
But given that it should only be thrown if there is a compiler error
that seems acceptable, and in fact we already do this for
absentSumFieldError which has similar constraints.
Diffstat (limited to 'compiler/GHC/Core/Make.hs')
-rw-r--r-- | compiler/GHC/Core/Make.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Make.hs b/compiler/GHC/Core/Make.hs index 35428156b9..42a1b78c0c 100644 --- a/compiler/GHC/Core/Make.hs +++ b/compiler/GHC/Core/Make.hs @@ -769,7 +769,6 @@ absentSumFieldErrorName :: Name raiseOverflowName, raiseUnderflowName, raiseDivZeroName :: Name recSelErrorName = err_nm "recSelError" recSelErrorIdKey rEC_SEL_ERROR_ID -absentErrorName = err_nm "absentError" absentErrorIdKey aBSENT_ERROR_ID runtimeErrorName = err_nm "runtimeError" runtimeErrorIdKey rUNTIME_ERROR_ID recConErrorName = err_nm "recConError" recConErrorIdKey rEC_CON_ERROR_ID patErrorName = err_nm "patError" patErrorIdKey pAT_ERROR_ID @@ -860,6 +859,13 @@ absentSumFieldErrorName absentSumFieldErrorIdKey aBSENT_SUM_FIELD_ERROR_ID +absentErrorName + = mkWiredInIdName + gHC_PRIM_PANIC + (fsLit "absentError") + absentErrorIdKey + aBSENT_ERROR_ID + raiseOverflowName = mkWiredInIdName gHC_PRIM_EXCEPTION |