[Git][ghc/ghc][master] Fix bootstrap with ghc-9.0
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Thu Sep 1 16:02:09 UTC 2022
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
7f527f01 by Matthew Pickering at 2022-09-01T12:01:56-04:00
Fix bootstrap with ghc-9.0
It turns out Solo is a very recent addition to base, so for older GHC
versions we just defined it inline here the one place we use it in the
compiler.
- - - - -
1 changed file:
- compiler/GHC/Core/Opt/SpecConstr.hs
Changes:
=====================================
compiler/GHC/Core/Opt/SpecConstr.hs
=====================================
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-
ToDo [Oct 2013]
~~~~~~~~~~~~~~~
@@ -974,6 +975,14 @@ lookupHowBound env id = lookupVarEnv (sc_how_bound env) id
scSubstId :: ScEnv -> InId -> OutExpr
scSubstId env v = lookupIdSubst (sc_subst env) v
+
+-- Solo is only defined in base starting from ghc-9.2
+#if !(MIN_VERSION_base(4, 16, 0))
+
+data Solo a = Solo a
+
+#endif
+
-- The !subst ensures that we force the selection `(sc_subst env)`, which avoids
-- retaining all of `env` when we only need `subst`. The `Solo` means that the
-- substitution itself is lazy, because that type is often discarded.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7f527f01c8b4b61047fa87905750ee962f527e36
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7f527f01c8b4b61047fa87905750ee962f527e36
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20220901/86c4d20e/attachment-0001.html>
More information about the ghc-commits
mailing list