Commit 75ef8b3b authored by Iavor S. Diatchki's avatar Iavor S. Diatchki

Remove unused parameter to `EvTypeableTyCon`

parent a07ff3b0
......@@ -894,7 +894,7 @@ dsEvTypeable ev =
(ty, rep) <-
case ev of
EvTypeableTyCon tc ks ts ->
EvTypeableTyCon tc ks ->
do ctr <- dsLookupGlobalId mkPolyTyConAppName
mkTyCon <- dsLookupGlobalId mkTyConName
dflags <- getDynFlags
......@@ -913,10 +913,9 @@ dsEvTypeable ev =
tcRep <- tyConRep dflags mkTyCon tc
kReps <- mapM kindRep ks
tReps <- mapM (getRep tyCl) ts
return ( mkTyConApp tc (ks ++ map snd ts)
, mkRep tcRep kReps tReps
return ( mkTyConApp tc ks
, mkRep tcRep kReps []
)
EvTypeableTyApp t1 t2 ->
......
......@@ -735,7 +735,7 @@ data EvTerm
-- | Instructions on how to make a 'Typeable' dictionary.
data EvTypeable
= EvTypeableTyCon TyCon [Kind] [(EvTerm, Type)]
= EvTypeableTyCon TyCon [Kind]
-- ^ Dicitionary for concrete type constructors.
| EvTypeableTyApp (EvTerm,Type) (EvTerm,Type)
......@@ -1015,7 +1015,7 @@ evVarsOfCallStack cs = case cs of
evVarsOfTypeable :: EvTypeable -> VarSet
evVarsOfTypeable ev =
case ev of
EvTypeableTyCon _ _ es -> evVarsOfTerms (map fst es)
EvTypeableTyCon _ _ -> emptyVarSet
EvTypeableTyApp e1 e2 -> evVarsOfTerms (map fst [e1,e2])
EvTypeableTyLit _ -> emptyVarSet
......@@ -1102,8 +1102,7 @@ instance Outputable EvCallStack where
instance Outputable EvTypeable where
ppr ev =
case ev of
EvTypeableTyCon tc ks ts -> parens (ppr tc <+> sep (map ppr ks) <+>
sep (map (ppr . fst) ts))
EvTypeableTyCon tc ks -> parens (ppr tc <+> sep (map ppr ks))
EvTypeableTyApp t1 t2 -> parens (ppr (fst t1) <+> ppr (fst t2))
EvTypeableTyLit x -> ppr x
......
......@@ -1256,7 +1256,7 @@ zonkEvTerm _ (EvLit l) = return (EvLit l)
zonkEvTerm env (EvTypeable ev) =
fmap EvTypeable $
case ev of
EvTypeableTyCon tc ks ts -> EvTypeableTyCon tc ks `fmap` mapM zonk ts
EvTypeableTyCon tc ks -> return (EvTypeableTyCon tc ks)
EvTypeableTyApp t1 t2 -> do e1 <- zonk t1
e2 <- zonk t2
return (EvTypeableTyApp e1 e2)
......
......@@ -1857,7 +1857,7 @@ matchTypeableClass clas k t loc
doTyCon tc ks =
case mapM kindRep ks of
Nothing -> return NoInstance
Just kReps -> mkSimpEv (EvTypeableTyCon tc kReps [])
Just kReps -> mkSimpEv (EvTypeableTyCon tc kReps)
{- Representation for an application of a type to a type-or-kind.
This may happen when the type expression starts with a type variable.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment