diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2021-06-19 21:09:47 +0100 |
---|---|---|
committer | Zubin <zubin.duggal@gmail.com> | 2021-06-28 13:00:57 +0000 |
commit | d9ba4c762808e0ae4d173ae56a0211fc0b69faf0 (patch) | |
tree | 0e4dc12412510036b0b0d52e664b72222b992eb8 /compiler/GHC/Core | |
parent | 469126b3cef2936d9831283a77d54330d0ff1ba8 (diff) | |
download | haskell-wip/T20008.tar.gz |
One-shot changes (#20008)wip/T20008
I discovered that GHC.Core.Unify.bindTv was getting arity 2,
rather than 3, in one of my builds. In HEAD it does get the right
arity, but only because CallArity (just) manages to spot it. In my
situation it (just) failed to discover this.
Best to make it robust, which this patch does. See
Note [INLINE pragmas and (>>)] in GHC.Utils.Monad.
There a bunch of other modules that probably should have the same
treatment:
GHC.CmmToAsm.Reg.Linear.State
GHC.Tc.Solver.Monad
GHC.Tc.Solver.Rewrite
GHC.Utils.Monad.State.Lazy
GHC.Utils.Monad.State.Strict
but doing so is not part of this patch
Diffstat (limited to 'compiler/GHC/Core')
-rw-r--r-- | compiler/GHC/Core/Unify.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/GHC/Core/Unify.hs b/compiler/GHC/Core/Unify.hs index fdf4d05068..bd54ecee39 100644 --- a/compiler/GHC/Core/Unify.hs +++ b/compiler/GHC/Core/Unify.hs @@ -1393,6 +1393,8 @@ instance Applicative UM where (<*>) = ap instance Monad UM where + {-# INLINE (>>=) #-} + -- See Note [INLINE pragmas and (>>)] in GHC.Utils.Monad m >>= k = UM (\state -> do { (state', v) <- unUM m state ; unUM (k v) state' }) |