Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
6267d836
Commit
6267d836
authored
Dec 19, 1996
by
simonpj
Browse files
[project @ 1996-12-19 09:39:49 by simonpj]
Tiny bug fix to printing of interfaces
parent
7a3bd641
Changes
2
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/basicTypes/Name.lhs
View file @
6267d836
...
...
@@ -401,7 +401,8 @@ instance NamedThing Name where
instance Outputable Name where
ppr sty (Local u n _) | codeStyle sty ||
ifaceStyle sty = pprUnique u
| otherwise = ppBesides [ppPStr (occNameString n), ppPStr SLIT("_"), pprUnique u]
ppr PprForUser (Local _ n _) = ppPStr (occNameString n)
ppr other_sty (Local u n _) = ppBesides [ppPStr (occNameString n), ppPStr SLIT("_"), pprUnique u]
ppr sty (Global u m n _ _) = ppBesides [pp_name, pp_uniq sty u]
where
...
...
ghc/compiler/hsSyn/HsTypes.lhs
View file @
6267d836
...
...
@@ -25,7 +25,9 @@ IMP_Ubiq()
import Outputable ( interppSP, ifnotPprForUser )
import Kind ( Kind {- instance Outputable -} )
import Name ( nameOccName )
import Pretty
import PprStyle ( PprStyle(..) )
import Util ( thenCmp, cmpList, isIn, panic# )
\end{code}
...
...
@@ -104,10 +106,14 @@ instance (Outputable name) => Outputable (HsType name) where
ppr = pprHsType
instance (Outputable name) => Outputable (HsTyVar name) where
ppr sty (UserTyVar name) = ppr sty name
ppr sty (IfaceTyVar name kind) = ppCat [ppr sty name, ppStr "::", ppr sty kind]
ppr sty (UserTyVar name) = ppr
_hs_tyvar
sty name
ppr sty (IfaceTyVar name kind) = ppCat [ppr
_hs_tyvar
sty name, ppStr "::", ppr sty kind]
-- Here
ppr_hs_tyvar PprInterface tv_name = ppr PprForUser tv_name
ppr_hs_tyvar other_sty tv_name = ppr other_sty tv_name
ppr_forall sty ctxt_prec [] [] ty
= ppr_mono_ty sty ctxt_prec ty
ppr_forall sty ctxt_prec tvs ctxt ty
...
...
@@ -142,7 +148,7 @@ pprParendHsType sty ty = ppr_mono_ty sty pREC_CON ty
ppr_mono_ty sty ctxt_prec (HsPreForAllTy ctxt ty) = ppr_forall sty ctxt_prec [] ctxt ty
ppr_mono_ty sty ctxt_prec (HsForAllTy tvs ctxt ty) = ppr_forall sty ctxt_prec tvs ctxt ty
ppr_mono_ty sty ctxt_prec (MonoTyVar name) = ppr sty name
ppr_mono_ty sty ctxt_prec (MonoTyVar name) = ppr
_hs_tyvar
sty name
ppr_mono_ty sty ctxt_prec (MonoFunTy ty1 ty2)
= let p1 = ppr_mono_ty sty pREC_FUN ty1
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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