Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
daac527a
Commit
daac527a
authored
Jun 19, 2005
by
krasimir
Browse files
[project @ 2005-06-19 08:41:40 by krasimir]
Add pprTyThingHdr function.
parent
a2de6fb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/main/PprTyThing.hs
View file @
daac527a
...
...
@@ -11,6 +11,7 @@ module PprTyThing (
pprTyThingInContext
,
pprTyThingLoc
,
pprTyThingInContextLoc
,
pprTyThingHdr
)
where
#
include
"HsVersions.h"
...
...
@@ -53,6 +54,15 @@ pprTyThingInContext exts (AnId id) = pprIdInContext exts id
pprTyThingInContext
exts
(
ADataCon
dataCon
)
=
pprDataCon
exts
dataCon
pprTyThingInContext
exts
(
ATyCon
tyCon
)
=
pprTyCon
exts
tyCon
pprTyThingInContext
exts
(
AClass
cls
)
=
pprClass
exts
cls
-- | Pretty-prints the 'TyThing' header. For functions and data constructors
-- the function is equivalent to 'pprTyThing' but for type constructors
-- and classes it prints only the header part of the declaration.
pprTyThingHdr
::
Bool
->
TyThing
->
SDoc
pprTyThingHdr
exts
(
AnId
id
)
=
pprId
exts
id
pprTyThingHdr
exts
(
ADataCon
dataCon
)
=
pprDataConSig
exts
dataCon
pprTyThingHdr
exts
(
ATyCon
tyCon
)
=
pprTyConHdr
exts
tyCon
pprTyThingHdr
exts
(
AClass
cls
)
=
pprClassHdr
exts
cls
pprTyConHdr
exts
tyCon
=
ptext
keyword
<+>
ppr_bndr
tyCon
<+>
hsep
(
map
ppr
vars
)
...
...
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