Commit d29f86b1 authored by's avatar
Browse files

Cosmetics and debug printing only

parent b462d827
......@@ -94,7 +94,7 @@ module Type (
substPred, substTyVar, substTyVarBndr, deShadowTy, lookupTyVar,
-- Pretty-printing
pprType, pprParendType, pprTyThingCategory,
pprType, pprParendType, pprTyThingCategory, pprForAll,
pprPred, pprTheta, pprThetaArrow, pprClassPred, pprKind, pprParendKind
) where
......@@ -1015,10 +1015,12 @@ cmpTypesX env ty [] = GT
cmpPredX :: RnEnv2 -> PredType -> PredType -> Ordering
cmpPredX env (IParam n1 ty1) (IParam n2 ty2) = (n1 `compare` n2) `thenCmp` cmpTypeX env ty1 ty2
-- Compare types as well as names for implicit parameters
-- This comparison is used exclusively (I think) for the
-- finite map built in TcSimplify
cmpPredX env (ClassP c1 tys1) (ClassP c2 tys2) = (c1 `compare` c2) `thenCmp` cmpTypesX env tys1 tys2
-- Compare names only for implicit parameters
-- This comparison is used exclusively (I believe)
-- for the Avails finite map built in TcSimplify
-- If the types differ we keep them distinct so that we see
-- a distinct pair to run improvement on
cmpPredX env (ClassP c1 tys1) (ClassP c2 tys2) = (c1 `compare` c2) `thenCmp` (cmpTypesX env tys1 tys2)
cmpPredX env (EqPred ty1 ty2) (EqPred ty1' ty2') = (cmpTypeX env ty1 ty1') `thenCmp` (cmpTypeX env ty2 ty2')
-- Constructor order: IParam < ClassP < EqPred
......@@ -16,7 +16,7 @@ module TypeRep (
-- Pretty-printing
pprType, pprParendType, pprTyThingCategory,
pprPred, pprTheta, pprThetaArrow, pprClassPred,
pprPred, pprTheta, pprForAll, pprThetaArrow, pprClassPred,
-- Kinds
liftedTypeKind, unliftedTypeKind, openTypeKind,
......@@ -468,7 +468,7 @@ pprParendKind = pprParendType
ppr_type :: Prec -> Type -> SDoc
ppr_type p (TyVarTy tv) = ppr tv
ppr_type p (PredTy pred) = braces (ppr pred)
ppr_type p (PredTy pred) = ifPprDebug (ptext SLIT("<pred>")) <> (ppr pred)
ppr_type p (NoteTy other ty2) = ppr_type p ty2
ppr_type p (TyConApp tc tys) = ppr_tc_app p tc tys
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