X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypes%2FOptCoercion.lhs;h=a93df034da76c1729268af06ae6ca04012ebeff8;hb=cd54b707b0d77a3c62ee9f57b82dae98727f1c34;hp=559ea659e144b52cf0d8117c171f1fb2f52e8ba9;hpb=db4f42a8e38bfead11f5af78557e18b9f42b10b3;p=ghc-hetmet.git diff --git a/compiler/types/OptCoercion.lhs b/compiler/types/OptCoercion.lhs index 559ea65..a93df03 100644 --- a/compiler/types/OptCoercion.lhs +++ b/compiler/types/OptCoercion.lhs @@ -3,26 +3,18 @@ % \begin{code} -{-# OPTIONS_GHC -w #-} -module OptCoercion ( - optCoercion - ) where +module OptCoercion ( optCoercion ) where #include "HsVersions.h" -import Unify ( tcMatchTy ) import Coercion import Type hiding( substTyVarBndr, substTy, extendTvSubst ) -import TypeRep import TyCon import Var import VarSet import VarEnv -import PrelNames import StaticFlags ( opt_NoOptCoercion ) -import Util import Outputable -import Unify import Pair import Maybes( allMaybes ) import FastString @@ -100,8 +92,8 @@ opt_co env sym co opt_co' env _ (Refl ty) = Refl (substTy env ty) opt_co' env sym (SymCo co) = opt_co env (not sym) co - opt_co' env sym (TyConAppCo tc cos) = mkTyConAppCo tc (map (opt_co env sym) cos) +opt_co' env sym (PredCo cos) = mkPredCo (fmap (opt_co env sym) cos) opt_co' env sym (AppCo co1 co2) = mkAppCo (opt_co env sym co1) (opt_co env sym co2) opt_co' env sym (ForAllCo tv co) = case substTyVarBndr env tv of (env', tv') -> mkForAllCo tv' (opt_co env' sym co) @@ -341,8 +333,8 @@ opt_trans_pred (IParam n1 co1) (IParam n2 co2) opt_trans_pred _ _ = Nothing fireTransRule :: String -> Coercion -> Coercion -> Coercion -> Maybe Coercion -fireTransRule rule co1 co2 res - = -- pprTrace ("Trans rule fired: " ++ rule) (vcat [ppr co1, ppr co2, ppr res]) $ +fireTransRule _rule _co1 _co2 res + = -- pprTrace ("Trans rule fired: " ++ _rule) (vcat [ppr _co1, ppr _co2, ppr res]) $ Just res -----------