summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Lint.hs
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-07-28 15:20:44 +0200
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-08-02 19:19:38 +0200
commit808d0c1ecc6cdd247c5c39328540a3ae627aa309 (patch)
tree74f3428c9f1704865b64d2cd7809b3a3fcd3804e /compiler/GHC/Core/Lint.hs
parent34e352173dd1fc3cd86c49380fda5a4eb5dd7aef (diff)
downloadhaskell-wip/funtycon-args.tar.gz
Use a pattern synonym for arguments to FunTy (#18750)wip/funtycon-args
This makes it easier to add more arguments to FunTy in the future. Not done in Unify.hs, because of perf problems #20165.
Diffstat (limited to 'compiler/GHC/Core/Lint.hs')
-rw-r--r--compiler/GHC/Core/Lint.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Core/Lint.hs b/compiler/GHC/Core/Lint.hs
index f20dbcc62b..02e4791196 100644
--- a/compiler/GHC/Core/Lint.hs
+++ b/compiler/GHC/Core/Lint.hs
@@ -1632,7 +1632,7 @@ lintType ty@(TyConApp tc tys)
; lintTySynFamApp report_unsat ty tc tys }
| isFunTyCon tc
- , tys `lengthIs` 5
+ , FunTyConArgs _ _ _ _ _ <- tys
-- We should never see a saturated application of funTyCon; such
-- applications should be represented with the FunTy constructor.
-- See Note [Linting function types] and
@@ -2000,7 +2000,7 @@ lintCoercion (GRefl r ty (MCo co))
lintCoercion co@(TyConAppCo r tc cos)
| tc `hasKey` funTyConKey
- , [_w, _rep1,_rep2,_co1,_co2] <- cos
+ , FunTyConArgs _w _rep1 _rep2 _co1 _co2 <- cos
= failWithL (text "Saturated TyConAppCo (->):" <+> ppr co)
-- All saturated TyConAppCos should be FunCos