Improve the situation with the stimes cycle
Currently the Semigroup
stimes
cycle is resolved in GHC.Base
by importing stimes
implementations from a hs-boot file.
Resolve the cycle using hs-boot files for required classes (Num
, Integral
) instead. Now stimes
can be defined directly in GHC.Base
, making inlining and specialization possible.
This MR is adapted from !6863 (closed) (thanks @treeowl!). See also a CLC dicussion at https://github.com/haskell/core-libraries-committee/issues/8.
Things that are related but not in this MR:
- Improving
stimes
forEndo
. This is in !6863 (closed) but not here, it can be done separately. -
Making(this already happens), and also those instimes
INLINABLE
. I would like to make it soSemigroup.Internal
, but this needs CLC approval according to #23074 (comment 485732) and can be done later.