Check family instance consistency of hs-boot families later, fixes #11062.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Fri, 16 Dec 2016 02:05:33 +0000 (18:05 -0800)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Sun, 18 Dec 2016 03:39:55 +0000 (19:39 -0800)
commit25b70a29f6236b591252bf5a361a1547f0ffee51
tree7c10b4c0239851c6f4e3e8709d966b534ae7ed3b
parent52ba9470a7e85d025dc84a6789aa809cdd68b566
Check family instance consistency of hs-boot families later, fixes #11062.

Summary:
With hs-boot files, some type families may be defined in the
module we are typechecking.  In this case, we are not allowed
to poke these families until after we typecheck our local
declarations.  So we first check everything involving non-recursive
families, and then check the recursive families as we finish
kind-checking them.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate

Reviewers: goldfire, austin, simonpj, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2859

GHC Trac Issues: #11062
compiler/typecheck/FamInst.hs
compiler/typecheck/TcRnDriver.hs
compiler/typecheck/TcRnMonad.hs
compiler/typecheck/TcRnTypes.hs
compiler/typecheck/TcTyClsDecls.hs
testsuite/driver/extra_files.py
testsuite/tests/typecheck/should_compile/T11062.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/T11062.hs-boot [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/T11062a.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T