diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2020-09-27 22:03:07 +0200 |
---|---|---|
committer | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2020-09-27 22:03:45 +0200 |
commit | fc9fd48a8536d78eebcb5fd08c4c14ba7c1b413d (patch) | |
tree | fcb405eea4f62cfbf61e3ff165bcc59acda9f8c7 /compiler | |
parent | 8339bc4d413d47482ca3cf7308dc7ed2e78b0b83 (diff) | |
download | haskell-wip/fix-kind-inference.tar.gz |
Linear types: fix kind inference when checking dataconswip/fix-kind-inference
Fixes test MultConstructor.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Tc/TyCl.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/TyCl.hs b/compiler/GHC/Tc/TyCl.hs index 9cd0b2a66c..9335eb1d58 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 } |