diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2020-09-26 01:02:28 +0200 |
---|---|---|
committer | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2020-09-26 01:02:28 +0200 |
commit | 8c9c02c55793313ca25c67fb8e3f4be772af459c (patch) | |
tree | 8ed339eb044f13b852172a29159055f1edaac83f /compiler | |
parent | 007940d2fa1ac4f8046989d4af1d088914612a78 (diff) | |
download | haskell-wip/T18747.tar.gz |
Fix handling of function coercions (#18747)wip/T18747
This was broken when we added multiplicity to the function type.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Core/Coercion.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Coercion.hs b/compiler/GHC/Core/Coercion.hs index 47e6d40173..6ba6c0f144 100644 --- a/compiler/GHC/Core/Coercion.hs +++ b/compiler/GHC/Core/Coercion.hs @@ -1486,7 +1486,7 @@ instCoercion (Pair lty rty) g w | isFunTy lty && isFunTy rty -- g :: (t1 -> t2) ~ (t3 -> t4) -- returns t2 ~ t4 - = Just $ mkNthCo Nominal 3 g -- extract result type, which is the 4th argument to (->) + = Just $ mkNthCo Nominal 4 g -- extract result type, which is the 5th argument to (->) | otherwise -- one forall, one funty... = Nothing |