summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/TyCl.hs
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2020-09-27 22:03:07 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-09-29 00:32:05 -0400
commitb31a3360e2ef12f3ec7eaf66b3600247c1eb36c3 (patch)
tree28f202a8dd91e6353ada2073b1a8417370c9313b /compiler/GHC/Tc/TyCl.hs
parent583a2070f1ad9162a365b034b27c3b80daafb8df (diff)
downloadhaskell-b31a3360e2ef12f3ec7eaf66b3600247c1eb36c3.tar.gz
Linear types: fix kind inference when checking datacons
Diffstat (limited to 'compiler/GHC/Tc/TyCl.hs')
-rw-r--r--compiler/GHC/Tc/TyCl.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/TyCl.hs b/compiler/GHC/Tc/TyCl.hs
index 9cd0b2a66c..d182ba5903 100644
--- a/compiler/GHC/Tc/TyCl.hs
+++ b/compiler/GHC/Tc/TyCl.hs
@@ -1569,7 +1569,9 @@ kcTyClDecl (FamDecl _ (FamilyDecl { fdInfo = fd_info })) fam_tc
kcConArgTys :: NewOrData -> Kind -> [HsScaled GhcRn (LHsType GhcRn)] -> TcM ()
kcConArgTys new_or_data res_kind arg_tys = do
{ let exp_kind = getArgExpKind new_or_data res_kind
- ; mapM_ (flip tcCheckLHsType exp_kind . getBangType . hsScaledThing) arg_tys
+ ; forM_ arg_tys (\(HsScaled mult ty) -> do _ <- tcCheckLHsType (getBangType ty) exp_kind
+ tcMult mult)
+
-- See Note [Implementation of UnliftedNewtypes], STEP 2
}