diff options
author | Bartosz Nitka <niteria@gmail.com> | 2016-01-27 08:37:30 -0800 |
---|---|---|
committer | Bartosz Nitka <niteria@gmail.com> | 2016-01-30 08:41:21 -0800 |
commit | bb956eb8d8774613c1e311655f1359a91a84765b (patch) | |
tree | a50acf0ff74796455432a3f9c2469fbc8df8afb0 /compiler/types/OptCoercion.hs | |
parent | bc83c733e58939e1ff0d5eea9dca359615203ea4 (diff) | |
download | haskell-bb956eb8d8774613c1e311655f1359a91a84765b.tar.gz |
Add asserts to other substitution functions
This adds asserts to `substTys`, `substCo` and `substCos` in
the same spirit as already existing asserts on `substTy`, protecting
every possible entry point to `subst_ty` and `subst_co`.
I've replaced the violators with unchecked versions.
Test Plan: ./validate --slow
Reviewers: simonpj, goldfire, austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1862
GHC Trac Issues: #11371
Diffstat (limited to 'compiler/types/OptCoercion.hs')
-rw-r--r-- | compiler/types/OptCoercion.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/types/OptCoercion.hs b/compiler/types/OptCoercion.hs index c9db4b3e67..2af66f6391 100644 --- a/compiler/types/OptCoercion.hs +++ b/compiler/types/OptCoercion.hs @@ -570,7 +570,7 @@ opt_trans_rule is co1 co2 mkForAllCo tv1 (opt_trans is eta1 eta2) (opt_trans is' r1 r2') where is' = is `extendInScopeSet` tv1 - r2' = substCoWith [tv2] [TyVarTy tv1] r2 + r2' = substCoWithUnchecked [tv2] [TyVarTy tv1] r2 -- Push transitivity inside axioms opt_trans_rule is co1 co2 |