summaryrefslogtreecommitdiff
path: root/compiler/GHC/Utils/Monad.hs
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@richarde.dev>2020-11-25 15:00:36 -0500
committerRichard Eisenberg <rae@richarde.dev>2020-11-30 11:42:41 -0500
commit973fb5098dfe197456bc1670f6ce62265ab6f6aa (patch)
tree2be5f2b6f85aae5e5dd4f37a4fe5858e282d3895 /compiler/GHC/Utils/Monad.hs
parent50b22545b7ae4cbb718fdf452e9fc71dbe04cd91 (diff)
downloadhaskell-wip/cfuneqcan-refactor.tar.gz
Rename the flattener to become the rewriter.wip/cfuneqcan-refactor
Now that flattening doesn't produce flattening variables, it's not really flattening anything: it's rewriting. This change also means that the rewriter can no longer be confused the core flattener (in GHC.Core.Unify), which is sometimes used during type-checking.
Diffstat (limited to 'compiler/GHC/Utils/Monad.hs')
-rw-r--r--compiler/GHC/Utils/Monad.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/GHC/Utils/Monad.hs b/compiler/GHC/Utils/Monad.hs
index 19b0667ceb..da415ba44c 100644
--- a/compiler/GHC/Utils/Monad.hs
+++ b/compiler/GHC/Utils/Monad.hs
@@ -88,9 +88,7 @@ zipWith4M f xs ys ws zs = sequenceA (zipWith4 f xs ys ws zs)
zipWithAndUnzipM :: Monad m
=> (a -> b -> m (c, d)) -> [a] -> [b] -> m ([c], [d])
-{-# INLINABLE zipWithAndUnzipM #-}
--- See Note [flatten_args performance] in GHC.Tc.Solver.Flatten for why this
--- pragma is essential.
+{-# INLINABLE zipWithAndUnzipM #-} -- this allows specialization to a given monad
zipWithAndUnzipM f (x:xs) (y:ys)
= do { (c, d) <- f x y
; (cs, ds) <- zipWithAndUnzipM f xs ys