summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Coercion.hs-boot
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2023-05-13 15:59:10 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-05-13 14:59:13 -0400
commita5451438bcf3a912910e7c2a5d40dfedfa7d1a4a (patch)
tree8d5a13a1a00bc50b31adadcf38b7f8e0970fdb4f /compiler/GHC/Core/Coercion.hs-boot
parent902f0730b4c50f39b7767a346be324c98bf7a8a6 (diff)
downloadhaskell-a5451438bcf3a912910e7c2a5d40dfedfa7d1a4a.tar.gz
Fix bad multiplicity role in tyConAppFunCo_maybe
The function tyConAppFunCo_maybe produces a multiplicity coercion for the multiplicity argument of the function arrow, except that it could be at the wrong role if asked to produce a representational coercion. We fix this by using the 'funRole' function, which computes the right roles for arguments to the function arrow TyCon. Fixes #23386
Diffstat (limited to 'compiler/GHC/Core/Coercion.hs-boot')
-rw-r--r--compiler/GHC/Core/Coercion.hs-boot2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/GHC/Core/Coercion.hs-boot b/compiler/GHC/Core/Coercion.hs-boot
index 3143414feb..276a48cf81 100644
--- a/compiler/GHC/Core/Coercion.hs-boot
+++ b/compiler/GHC/Core/Coercion.hs-boot
@@ -36,6 +36,8 @@ mkSubCo :: HasDebugCallStack => Coercion -> Coercion
mkProofIrrelCo :: Role -> Coercion -> Coercion -> Coercion -> Coercion
mkAxiomRuleCo :: CoAxiomRule -> [Coercion] -> Coercion
+funRole :: Role -> FunSel -> Role
+
isGReflCo :: Coercion -> Bool
isReflCo :: Coercion -> Bool
isReflexiveCo :: Coercion -> Bool