summaryrefslogtreecommitdiff
path: root/compiler/rename/RnSource.hs
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@cs.brynmawr.edu>2017-03-14 13:32:00 -0400
committerBen Gamari <ben@smart-cactus.org>2017-03-14 15:10:36 -0400
commite0c433c81182c934ee4c4cc5c6cf25a1b6fb8d83 (patch)
tree20514944552768e34cfb1c303c14beaa0c406afe /compiler/rename/RnSource.hs
parent4b673e804fb8598dac02596f107544c7f2ea263b (diff)
downloadhaskell-e0c433c81182c934ee4c4cc5c6cf25a1b6fb8d83.tar.gz
Fix #13337.
The big change is the introduction of solveSomeEqualities. This is just like solveEqualities, but it doesn't fail if there are unsolved equalities when it's all done. Anything unsolved is re-emitted. This is appropriate if we are not kind-generalizing, so this new form is used when decideKindGeneralizationPlan says not to. We initially thought that any use of solveEqualities would be tied to kind generalization, but this isn't true. For example, we need to solveEqualities a bunch in the "tc" pass in TcTyClsDecls (which is really desugaring). These equalities are all surely going to be soluble (if they weren't the "kc" pass would fail), but we still need to solve them again. Perhaps if the "kc" pass produced type- checked output that is then desugared, solveEqualities really would be tied only to kind generalization. Updates haddock submodule. Test Plan: ./validate, typecheck/should_compile/T13337 Reviewers: simonpj, bgamari, austin Reviewed By: simonpj Subscribers: RyanGlScott, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3315
Diffstat (limited to 'compiler/rename/RnSource.hs')
-rw-r--r--compiler/rename/RnSource.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rename/RnSource.hs b/compiler/rename/RnSource.hs
index 601d45b90e..30915d58b7 100644
--- a/compiler/rename/RnSource.hs
+++ b/compiler/rename/RnSource.hs
@@ -777,7 +777,8 @@ rnFamInstDecl doc mb_cls tycon (HsIB { hsib_body = pats }) payload rnPayload
; return (tycon',
HsIB { hsib_body = pats'
- , hsib_vars = all_ibs },
+ , hsib_vars = all_ibs
+ , hsib_closed = True },
payload',
all_fvs) }
-- type instance => use, hence addOneFV