diff options
author | Torsten Schmits <git@tryp.io> | 2022-09-21 13:38:55 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-09-21 14:31:24 -0400 |
commit | 2463df2fe21b5b37ecada3df8c6726c534d24590 (patch) | |
tree | 824454d1e2d543da906c2b645365f051b04f3ddc /compiler/GHC/Core | |
parent | c0ba775dda6ddec1251363d1b73f4f3e35931dd9 (diff) | |
download | haskell-2463df2fe21b5b37ecada3df8c6726c534d24590.tar.gz |
Rename Solo[constructor] to MkSolo
Part of proposal 475 (https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0475-tuple-syntax.rst)
Moves all tuples to GHC.Tuple.Prim
Updates ghc-prim version (and bumps bounds in dependents)
updates haddock submodule
updates deepseq submodule
updates text submodule
Diffstat (limited to 'compiler/GHC/Core')
-rw-r--r-- | compiler/GHC/Core/Opt/SpecConstr.hs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/compiler/GHC/Core/Opt/SpecConstr.hs b/compiler/GHC/Core/Opt/SpecConstr.hs index 05c7b00116..9119671f95 100644 --- a/compiler/GHC/Core/Opt/SpecConstr.hs +++ b/compiler/GHC/Core/Opt/SpecConstr.hs @@ -1,4 +1,7 @@ {-# LANGUAGE CPP #-} +#if __GLASGOW_HASKELL__ < 905 +{-# LANGUAGE PatternSynonyms #-} +#endif {- ToDo [Oct 2013] ~~~~~~~~~~~~~~~ @@ -978,9 +981,13 @@ 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 Solo constructor was renamed to MkSolo in ghc 9.5 +#if __GLASGOW_HASKELL__ < 905 +pattern MkSolo :: a -> Solo a +pattern MkSolo a = Solo a #endif -- The !subst ensures that we force the selection `(sc_subst env)`, which avoids @@ -994,7 +1001,7 @@ data Solo a = Solo a scSubstTy :: ScEnv -> InType -> Solo OutType scSubstTy env ty = let !subst = sc_subst env - in Solo (substTyUnchecked subst ty) + in MkSolo (substTyUnchecked subst ty) scSubstCo :: ScEnv -> Coercion -> Coercion scSubstCo env co = substCo (sc_subst env) co @@ -1446,7 +1453,7 @@ scExpr' env (Var v) = case scSubstId env v of e' -> scExpr (zapScSubst env) e' scExpr' env (Type t) = - let !(Solo ty') = scSubstTy env t + let !(MkSolo ty') = scSubstTy env t in return (nullUsage, Type ty') scExpr' env (Coercion c) = return (nullUsage, Coercion (scSubstCo env c)) scExpr' _ e@(Lit {}) = return (nullUsage, e) @@ -1490,7 +1497,7 @@ scExpr' env (Case scrut b ty alts) -- The combined usage of the scrutinee is given -- by scrut_occ, which is passed to setScrutOcc, which -- in turn treats a bare-variable scrutinee specially - ; let !(Solo ty') = scSubstTy env ty + ; let !(MkSolo ty') = scSubstTy env ty ; return (foldr combineUsage scrut_usg' alt_usgs, Case scrut' b' ty' alts') } |