[Git][ghc/ghc][wip/T24359] Fix build

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Mon Nov 25 23:45:53 UTC 2024



Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC


Commits:
b785e255 by Simon Peyton Jones at 2024-11-25T23:45:20+00:00
Fix build

- - - - -


2 changed files:

- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/HsToCore/Binds.hs


Changes:

=====================================
compiler/GHC/Core/SimpleOpt.hs
=====================================
@@ -147,14 +147,13 @@ simpleOptExpr opts expr
         -- three passes instead of two (occ-anal, and go)
 
 simpleOptExprNoOccAnal :: HasDebugCallStack => SimpleOpts -> CoreExpr -> CoreExpr
--- Same as simpleOptExpr but without occurrence analysis
+-- A variant of simpleOptExpr but without occurrence analysis
 -- Result: we don't inline evidence bindings, which is useful for the specialiser
 simpleOptExprNoOccAnal opts expr
-  = simpl_opt_expr init_env expr
+  = simple_opt_expr init_env expr
   where
     init_env   = (emptyEnv opts) { soe_subst = init_subst }
     init_subst = mkEmptySubst (mkInScopeSet (exprFreeVars expr))
-        -- It's potentially important to make a proper in-scope set
 
 simpleOptExprWith :: HasDebugCallStack => SimpleOpts -> Subst -> InExpr -> OutExpr
 -- See Note [The simple optimiser]


=====================================
compiler/GHC/HsToCore/Binds.hs
=====================================
@@ -42,7 +42,7 @@ import GHC.HsToCore.Pmc ( addTyCs, pmcGRHSs )
 
 import GHC.Hs             -- lots of things
 import GHC.Core           -- lots of things
-import GHC.Core.SimpleOpt    ( simpleOptExpr )
+import GHC.Core.SimpleOpt
 import GHC.Core.Opt.OccurAnal ( occurAnalyseExpr )
 import GHC.Core.InstEnv ( CanonicalEvidence(..) )
 import GHC.Core.Make
@@ -917,7 +917,7 @@ dsSpec poly_rhs (SpecPragE { spe_poly_id      = poly_id
                   -- to this specialisation, not global
 
              rule_bndrs = scopedSort (exprsSomeFreeVarsList quantify_me lhs_args)
-             quantify_me v = isTyVar v || v `elemVarSet` id_bndrs
+             quantify_me v = isTyVar v || v `elemVarSet` lhs_id_bndrs
                   -- Quantify over all tyvars; but only over Ids bound explicitly
                   -- this is a terrible hack.  What about local SPECIALISE pragmas
                   -- that mention some in-scope TyVar?
@@ -942,15 +942,15 @@ dsSpec poly_rhs (SpecPragE { spe_poly_id      = poly_id
                         rule_bndrs poly_id lhs_args
                         spec_bndrs mk_spec_body inl } } }
 
-prepareSpecLHS :: [EvVar] -> CoreExpr -> Maybe ([CoreBind], Id, [CoreExpr])
+prepareSpecLHS :: [EvVar] -> CoreExpr -> Maybe (VarSet, [CoreBind], Id, [CoreExpr])
 prepareSpecLHS evs the_call
   = go (mkVarSet evs) [] the_call
   where
-    go :: IdSet
+    go :: VarSet
        -> [CoreBind]    -- Reversed list of constant evidence bindings
        -> CoreExpr
        -> Maybe (IdSet, [CoreBind], Id, [CoreExpr])
-    go qevs acc (Cast e co)
+    go qevs acc (Cast e _)
       = go qevs acc e
     go qevs acc (Let bind e)
       | not (all isDictId bndrs)   -- A normal 'let' is too complicated



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b785e255a2c7994ba6f7baa25815024967e89912

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b785e255a2c7994ba6f7baa25815024967e89912
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/20241125/9740282b/attachment-0001.html>


More information about the ghc-commits mailing list