import VarSet\r
import VarEnv\r
import PrelNames\r
+import StaticFlags ( opt_NoOptCoercion )\r
import Util\r
import Outputable\r
\end{code}\r
optCoercion :: TvSubst -> Coercion -> NormalCo\r
-- ^ optCoercion applies a substitution to a coercion, \r
-- *and* optimises it to reduce its size\r
-optCoercion env co = opt_co env False co\r
+optCoercion env co \r
+ | opt_NoOptCoercion = substTy env co\r
+ | otherwise = opt_co env False co\r
\r
type NormalCo = Coercion\r
-- Invariants: \r