diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2020-07-14 16:41:03 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2020-07-15 09:42:46 +0100 |
commit | 52bdb5bb05bd6c10b84c69e98587f4e1b65110e1 (patch) | |
tree | 7d08e45fd3336ae0a1bee22f9404d1b826c036fb /compiler/GHC/HsToCore | |
parent | 7e741433dc7c8e52121c85ad9e8e520da4d54bd8 (diff) | |
download | haskell-wip/T18412.tar.gz |
Improve typechecking of NPlusK patternswip/T18412
This patch (due to Richard Eisenberg) improves
documentation of the wrapper returned by tcSubMult
(see Note [Wrapper returned from tcSubMult] in
GHC.Tc.Utils.Unify).
And, more substantially, it cleans up the multiplicity
handling in the typechecking of NPlusKPat
Diffstat (limited to 'compiler/GHC/HsToCore')
-rw-r--r-- | compiler/GHC/HsToCore/Binds.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/GHC/HsToCore/Binds.hs b/compiler/GHC/HsToCore/Binds.hs index f904bc2616..03164c5b25 100644 --- a/compiler/GHC/HsToCore/Binds.hs +++ b/compiler/GHC/HsToCore/Binds.hs @@ -1141,6 +1141,7 @@ dsHsWrapper (WpCast co) = ASSERT(coercionRole co == Representational) return $ \e -> mkCastDs e co dsHsWrapper (WpEvApp tm) = do { core_tm <- dsEvTerm tm ; return (\e -> App e core_tm) } + -- See Note [Wrapper returned from tcSubMult] in GHC.Tc.Utils.Unify. dsHsWrapper (WpMultCoercion co) = do { when (not (isReflexiveCo co)) $ errDs (text "Multiplicity coercions are currently not supported") ; return $ \e -> e } |