summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Lint.hs
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2022-06-06 15:07:16 +0200
committersheaf <sam.derbyshire@gmail.com>2022-06-06 18:13:08 +0200
commit432d56a4e2df8d969c248fb128a2e42b2584fa0b (patch)
tree0cba4b9936597fb0dbd8fc8b8f2e6e6f892492ed /compiler/GHC/Core/Lint.hs
parent04209f2a6a49f6cdc116b5cb73ccd1749c90f88b (diff)
downloadhaskell-wip/tcRemainingValArgs.tar.gz
Typecheck remaining ValArgs in rebuildHsAppswip/tcRemainingValArgs
This patch refactors hasFixedRuntimeRep_remainingValArgs, renaming it to tcRemainingValArgs. The logic is moved to rebuildHsApps, which ensures consistent behaviour across tcApp and quickLookArg1/tcEValArg. This patch also refactors the treatment of stupid theta for data constructors, changing the place we drop stupid theta arguments from dsConLike to mkDataConRep (now the datacon wrapper drops these arguments). We decided not to implement PHASE 2 of the FixedRuntimeRep plan for these remaining ValArgs. Future directions are outlined on the wiki: https://gitlab.haskell.org/ghc/ghc/-/wikis/Remaining-ValArgs Fixes #21544 and #21650
Diffstat (limited to 'compiler/GHC/Core/Lint.hs')
-rw-r--r--compiler/GHC/Core/Lint.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Lint.hs b/compiler/GHC/Core/Lint.hs
index 0511a4004d..a378f48e98 100644
--- a/compiler/GHC/Core/Lint.hs
+++ b/compiler/GHC/Core/Lint.hs
@@ -1216,7 +1216,7 @@ checkCanEtaExpand (Var fun_id) args app_ty
= ty : go (i+1) bndrs
bad_arg_tys :: [Type]
- bad_arg_tys = check_args . map fst $ getRuntimeArgTys app_ty
+ bad_arg_tys = check_args . map (scaledThing . fst) $ getRuntimeArgTys app_ty
-- We use 'getRuntimeArgTys' to find all the argument types,
-- including those hidden under newtypes. For example,
-- if `FunNT a b` is a newtype around `a -> b`, then