X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Ftypes%2FOptCoercion.lhs;h=26f3295b289b0f01f0b26b8ac77323688313dfb0;hb=140fb024a9f585c4f1d75ca4bd6fe37a97bc2a4f;hp=0fff7abc5919910402010143b9494e43300a07ff;hpb=224b5e669cb545d6d49a1369c036dde516400081;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: