Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
12d8935e
Commit
12d8935e
authored
Nov 28, 2007
by
simonpj@microsoft.com
Browse files
Improve pretty-printing for Insts
parent
06f6f35d
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/typecheck/Inst.lhs
View file @
12d8935e
...
...
@@ -94,6 +94,7 @@ import DynFlags
import Bag
import Maybes
import Util
import Unique
import Outputable
import Data.List
import TypeRep
...
...
@@ -602,10 +603,11 @@ pprInst i@(EqInst {tci_left = ty1, tci_right = ty2, tci_co = co})
= eitherEqInst i
(\covar -> text "Wanted" <+> ppr (TyVarTy covar) <+> dcolon <+> ppr (EqPred ty1 ty2))
(\co -> text "Given" <+> ppr co <+> dcolon <+> ppr (EqPred ty1 ty2))
pprInst inst = ppr
(instName inst
) <+> dcolon
pprInst inst = ppr
name <> braces (pprUnique (getUnique name)
) <+> dcolon
<+> (braces (ppr (instType inst) <> implicWantedEqs) $$
ifPprDebug implic_stuff)
where
name = instName inst
(implic_stuff, implicWantedEqs)
| isImplicInst inst = (ppr (tci_reft inst),
text " &" <+>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment