Commit 803afa31 authored by Joachim Breitner's avatar Joachim Breitner

In toHsType, filter out kind variables

(This fixes #8563)
parent 51deeb0d
......@@ -415,7 +415,8 @@ toHsType ty
to_hs_type (TyVarTy tv) = nlHsTyVar (getRdrName tv)
to_hs_type (AppTy t1 t2) = nlHsAppTy (toHsType t1) (toHsType t2)
to_hs_type (TyConApp tc args) = nlHsTyConApp (getRdrName tc) (map toHsType args)
to_hs_type (TyConApp tc args) = nlHsTyConApp (getRdrName tc) (map toHsType args')
where args' = filter (not . isKind) args
to_hs_type (FunTy arg res) = ASSERT( not (isConstraintKind (typeKind arg)) )
nlHsFunTy (toHsType arg) (toHsType res)
to_hs_type t@(ForAllTy {}) = pprPanic "toHsType" (ppr t)
......
......@@ -1919,6 +1919,7 @@ genInst standalone_deriv oflag comauxs
, ds_name = name, ds_cls = clas, ds_loc = loc })
| is_newtype
= do { inst_spec <- mkInstance oflag theta spec
; traceTc "genInst/is_newtype" (vcat [ppr loc, ppr clas, ppr tvs, ppr tys, ppr rhs_ty])
; return ( InstInfo
{ iSpec = inst_spec
, iBinds = InstBindings
......
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