Move GHC generated exceptions into ghc-prim
GHC sometimes introduces references to exceptions defined in base:Control.Exception.Base
:
-
patError
: incomplete pattern match -
absentError
: used during worker-wrapper transformation (should be simplified out) -
absentSumFieldError
: used when converting unboxed sums into unboxed tuples
This is an issue when we compile libraries before base
(boot libraries) that are used by base
itself (see #17791 (closed)).
In !3135 (closed) we moved absentSumFieldError
into ghc-prim
to partially avoid this issue and in the discussion it was proposed to move other exceptions into ghc-prim
too (see !3135 (comment 270381)). This ticket tracks this task.