summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2017-02-24 18:06:58 -0800
committerEdward Z. Yang <ezyang@cs.stanford.edu>2017-02-24 18:06:58 -0800
commit7c060e4d688047b5e2a9c85878796e6e5cd86ccb (patch)
tree71bf7fbc13ccbea3e67c0a80c9992dcd04de3f9d
parent9d17028fbcecb53480598c4fcc7bd9e71b2ac7cf (diff)
downloadhaskell-7c060e4d688047b5e2a9c85878796e6e5cd86ccb.tar.gz
Fix validate.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
-rw-r--r--compiler/iface/MkIface.hs16
1 files changed, 6 insertions, 10 deletions
diff --git a/compiler/iface/MkIface.hs b/compiler/iface/MkIface.hs
index dcb55ef2af..0473ed1076 100644
--- a/compiler/iface/MkIface.hs
+++ b/compiler/iface/MkIface.hs
@@ -1574,7 +1574,7 @@ tyConToIfaceDecl env tycon
ifCType = tyConCType tycon,
ifRoles = tyConRoles tycon,
ifCtxt = tidyToIfaceContext tc_env1 (tyConStupidTheta tycon),
- ifCons = ifaceConDecls (algTyConRhs tycon) (algTcFields tycon),
+ ifCons = ifaceConDecls (algTyConRhs tycon),
ifGadtSyntax = isGadtSyntaxTyCon tycon,
ifParent = parent })
@@ -1623,11 +1623,11 @@ tyConToIfaceDecl env tycon
- ifaceConDecls (NewTyCon { data_con = con }) flds = IfNewTyCon (ifaceConDecl con)
- ifaceConDecls (DataTyCon { data_cons = cons }) flds = IfDataTyCon (map ifaceConDecl cons)
- ifaceConDecls (TupleTyCon { data_con = con }) _ = IfDataTyCon [ifaceConDecl con]
- ifaceConDecls (SumTyCon { data_cons = cons }) flds = IfDataTyCon (map ifaceConDecl cons)
- ifaceConDecls (AbstractTyCon distinct) _ = IfAbstractTyCon distinct
+ ifaceConDecls (NewTyCon { data_con = con }) = IfNewTyCon (ifaceConDecl con)
+ ifaceConDecls (DataTyCon { data_cons = cons }) = IfDataTyCon (map ifaceConDecl cons)
+ ifaceConDecls (TupleTyCon { data_con = con }) = IfDataTyCon [ifaceConDecl con]
+ ifaceConDecls (SumTyCon { data_cons = cons }) = IfDataTyCon (map ifaceConDecl cons)
+ ifaceConDecls (AbstractTyCon distinct) = IfAbstractTyCon distinct
-- The AbstractTyCon case happens when a TyCon has been trimmed
-- during tidying.
-- Furthermore, tyThingToIfaceDecl is also used in TcRnDriver
@@ -1666,10 +1666,6 @@ tyConToIfaceDecl env tycon
(con_env2, ex_bndrs') = tidyTyVarBinders con_env1 ex_bndrs
to_eq_spec (tv,ty) = (tidyTyVar con_env2 tv, tidyToIfaceType con_env2 ty)
- ifaceOverloaded flds = case dFsEnvElts flds of
- fl:_ -> flIsOverloaded fl
- [] -> False
-
classToIfaceDecl :: TidyEnv -> Class -> (TidyEnv, IfaceDecl)
classToIfaceDecl env clas
= ( env1