summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-12-02 11:25:02 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2021-12-30 16:27:22 +0000
commitaca5f8fc5cb1310b3159ba097716429f228bece3 (patch)
tree5b10aaf35c4b437b828898a6b0aa88e600548f25
parentd6bdb903ac8e85a92e12950019e4aef940defaad (diff)
downloadhaskell-aca5f8fc5cb1310b3159ba097716429f228bece3.tar.gz
fixes
-rw-r--r--compiler/GHC/Tc/Errors.hs1
-rw-r--r--compiler/GHC/Tc/TyCl.hs6
2 files changed, 4 insertions, 3 deletions
diff --git a/compiler/GHC/Tc/Errors.hs b/compiler/GHC/Tc/Errors.hs
index 8d5433efa3..4652dc747f 100644
--- a/compiler/GHC/Tc/Errors.hs
+++ b/compiler/GHC/Tc/Errors.hs
@@ -90,6 +90,7 @@ import Data.List ( groupBy, partition, mapAccumL
import Data.Ord ( comparing )
-- import Data.Semigroup ( Semigroup )
import qualified Data.Semigroup as Semigroup
+import GHC.Utils.Trace
{-
diff --git a/compiler/GHC/Tc/TyCl.hs b/compiler/GHC/Tc/TyCl.hs
index c232aa55f5..cf21ada2b6 100644
--- a/compiler/GHC/Tc/TyCl.hs
+++ b/compiler/GHC/Tc/TyCl.hs
@@ -1577,7 +1577,7 @@ kcTyClDecl :: TyClDecl GhcRn -> TcTyCon -> TcM ()
-- result kind signature have already been dealt with
-- by inferInitialKind, so we can ignore them here.
-kcTyClDecl (DataDecl { tcdLName = (L _ name), tcdDataDefn = defn }) tycon
+kcTyClDecl (DataDecl { tcdLName = (L _ _name), tcdDataDefn = defn }) tycon
| HsDataDefn { dd_ctxt = ctxt, dd_cons = cons, dd_ND = new_or_data } <- defn
= --bindTyClTyVars (TyConSkol callStack DataTypeFlavour name) name $ \ _ binders _ ->
@@ -1591,14 +1591,14 @@ kcTyClDecl (DataDecl { tcdLName = (L _ name), tcdDataDefn = defn }) tycon
; kcConDecls new_or_data (tyConResKind tycon) cons
}
-kcTyClDecl (SynDecl { tcdLName = L _ name, tcdRhs = rhs }) tycon
+kcTyClDecl (SynDecl { tcdLName = L _ _name, tcdRhs = rhs }) tycon
= tcExtendNameTyVarEnv (tcTyConScopedTyVars tycon) $
let res_kind = tyConResKind tycon
in discardResult $ tcCheckLHsType rhs (TheKind res_kind)
-- NB: check against the result kind that we allocated
-- in inferInitialKinds.
-kcTyClDecl (ClassDecl { tcdLName = L _ name
+kcTyClDecl (ClassDecl { tcdLName = L _ _name
, tcdCtxt = ctxt, tcdSigs = sigs }) tycon
= tcExtendNameTyVarEnv (tcTyConScopedTyVars tycon) $
do { _ <- tcHsContext ctxt