summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2013-10-04 18:45:55 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2013-10-04 18:45:55 +0100
commit875575805a99d73deebb2d0b9bf36cc296009dda (patch)
treea2b7e08fa3999035578b78ae5930c432a829d33b
parentacccbf36ea1617b988f45799dffedba0bd7a281b (diff)
downloadhaskell-875575805a99d73deebb2d0b9bf36cc296009dda.tar.gz
Simplify printing of boot-file mis-matches, by using PprTyThing.pprTyThing
-rw-r--r--compiler/typecheck/TcRnDriver.lhs19
1 files changed, 4 insertions, 15 deletions
diff --git a/compiler/typecheck/TcRnDriver.lhs b/compiler/typecheck/TcRnDriver.lhs
index de45b50871..1ab1bc727b 100644
--- a/compiler/typecheck/TcRnDriver.lhs
+++ b/compiler/typecheck/TcRnDriver.lhs
@@ -34,7 +34,8 @@ import TcHsSyn
import TcExpr
import TcRnMonad
import TcEvidence
-import Coercion( pprCoAxiom, pprCoAxBranch )
+import PprTyThing( pprTyThing )
+import Coercion( pprCoAxiom )
import FamInst
import InstEnv
import FamInstEnv
@@ -850,20 +851,8 @@ bootMisMatch real_thing boot_thing
= vcat [ppr real_thing <+>
ptext (sLit "has conflicting definitions in the module"),
ptext (sLit "and its hs-boot file"),
- ptext (sLit "Main module:") <+> ppr_mismatch real_thing,
- ptext (sLit "Boot file: ") <+> ppr_mismatch boot_thing]
- where
- -- closed type families need special treatment, because they might differ
- -- in their equations, which are not stored in the corresponding IfaceDecl
- ppr_mismatch thing
- | ATyCon tc <- thing
- , Just (ClosedSynFamilyTyCon ax) <- synTyConRhs_maybe tc
- = hang (ppr iface_decl <+> ptext (sLit "where"))
- 2 (vcat $ brListMap (pprCoAxBranch tc) (coAxiomBranches ax))
-
- | otherwise
- = ppr iface_decl
- where iface_decl = tyThingToIfaceDecl thing
+ ptext (sLit "Main module:") <+> PprTyThing.pprTyThing real_thing,
+ ptext (sLit "Boot file: ") <+> PprTyThing.pprTyThing boot_thing]
instMisMatch :: ClsInst -> SDoc
instMisMatch inst