[Git][ghc/ghc][wip/sjakobi/nondetfolds] Use non-deterministic fold to insert wanted evidence bindings

Simon Jakobi gitlab at gitlab.haskell.org
Tue Mar 31 01:50:13 UTC 2020



Simon Jakobi pushed to branch wip/sjakobi/nondetfolds at Glasgow Haskell Compiler / GHC


Commits:
edda58b7 by Simon Jakobi at 2020-03-31T03:49:21+02:00
Use non-deterministic fold to insert wanted evidence bindings

- - - - -


1 changed file:

- compiler/typecheck/TcSimplify.hs


Changes:

=====================================
compiler/typecheck/TcSimplify.hs
=====================================
@@ -1862,7 +1862,7 @@ neededEvVars implic@(Implic { ic_given = givens
       ; tcvs     <- TcS.getTcEvTyCoVars ev_binds_var
 
       ; let seeds1        = foldr add_implic_seeds old_needs implics
-            seeds2        = foldEvBindMap add_wanted seeds1 ev_binds -- TODO
+            seeds2        = nonDetStrictFoldEvBindMap (flip add_wanted) seeds1 ev_binds
             seeds3        = seeds2 `unionVarSet` tcvs
             need_inner    = findNeededEvVars ev_binds seeds3
             live_ev_binds = filterEvBindMap (needed_ev_bind need_inner) ev_binds



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/edda58b700ee5b0583cc37f3d2b8bfd0b8a48163
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/20200330/9af4b23d/attachment.html>


More information about the ghc-commits mailing list