diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2018-04-27 16:32:02 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2018-04-27 17:19:05 +0100 |
commit | 6da5b8772d512e2fb61730367f5258303e008ab4 (patch) | |
tree | 263377c4bd46d52f56feec78a7e53209383d57a3 /compiler/typecheck/FamInst.hs | |
parent | 08003e7f4abafb0c9fe084e4670122ce67cf45dd (diff) | |
download | haskell-6da5b8772d512e2fb61730367f5258303e008ab4.tar.gz |
Better linting for types
Trac #15057 described deficiencies in the linting for types
involving type synonyms. This patch fixes an earlier attempt.
The moving parts are desrcribed in
Note [Linting type synonym applications]
Not a big deal.
Diffstat (limited to 'compiler/typecheck/FamInst.hs')
-rw-r--r-- | compiler/typecheck/FamInst.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/typecheck/FamInst.hs b/compiler/typecheck/FamInst.hs index cda6404d11..5fceeff565 100644 --- a/compiler/typecheck/FamInst.hs +++ b/compiler/typecheck/FamInst.hs @@ -162,12 +162,12 @@ newFamInst flavor axiom@(CoAxiom { co_ax_tc = fam_tc }) ; dflags <- getDynFlags ; let lhs' = substTys subst lhs rhs' = substTy subst rhs - tcv_set' = mkVarSet (tvs' ++ cvs') + tcvs' = tvs' ++ cvs' ; when (gopt Opt_DoCoreLinting dflags) $ -- Check that the types involved in this instance are well formed. -- Do /not/ expand type synonyms, for the reasons discussed in -- Note [Linting type synonym applications]. - case lintTypes dflags False tcv_set' (rhs':lhs') of + case lintTypes dflags tcvs' (rhs':lhs') of Nothing -> pure () Just fail_msg -> pprPanic "Core Lint error" fail_msg ; return (FamInst { fi_fam = tyConName fam_tc |