X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypes%2FOptCoercion.lhs;h=26f3295b289b0f01f0b26b8ac77323688313dfb0;hb=c7cb47fc0e98e660621bfe7368464c4c93c9dbf1;hp=0fff7abc5919910402010143b9494e43300a07ff;hpb=463e89085872d0cde8c3c1610860a3013ad07900;p=ghc-hetmet.git diff --git a/compiler/types/OptCoercion.lhs b/compiler/types/OptCoercion.lhs index 0fff7ab..26f3295 100644 --- a/compiler/types/OptCoercion.lhs +++ b/compiler/types/OptCoercion.lhs @@ -19,6 +19,7 @@ import Var import VarSet import VarEnv import PrelNames +import StaticFlags ( opt_NoOptCoercion ) import Util import Outputable \end{code} @@ -50,7 +51,9 @@ mkCoPredTy in the ForAll case, where this note appears. optCoercion :: TvSubst -> Coercion -> NormalCo -- ^ optCoercion applies a substitution to a coercion, -- *and* optimises it to reduce its size -optCoercion env co = opt_co env False co +optCoercion env co + | opt_NoOptCoercion = substTy env co + | otherwise = opt_co env False co type NormalCo = Coercion -- Invariants: