Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
GitLab is currently being migrated to new hosting.
You are on a read-only GitLab instance.
Show more breadcrumbs
Gesh
GHC
Commits
e8481f60
Commit
e8481f60
authored
25 years ago
by
sven.panne@aedion.de
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 2000-02-16 12:57:39 by panne]
Fixed pretty printing of DEPRECATED
parent
74651b6d
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ghc/compiler/hsSyn/HsBinds.lhs
+1
-1
1 addition, 1 deletion
ghc/compiler/hsSyn/HsBinds.lhs
ghc/compiler/hsSyn/HsSyn.lhs
+12
-5
12 additions, 5 deletions
ghc/compiler/hsSyn/HsSyn.lhs
with
13 additions
and
6 deletions
ghc/compiler/hsSyn/HsBinds.lhs
+
1
−
1
View file @
e8481f60
...
...
@@ -329,7 +329,7 @@ ppr_sig (SpecInstSig ty _)
ppr_sig (FixSig fix_sig) = ppr fix_sig
ppr_sig (DeprecSig n txt)
= hsep [text "{-# DEPRECATED", ppr n, ppr txt, text "#-}"]
= hsep [text "{-# DEPRECATED", ppr n,
doubleQuotes(
ppr txt
)
, text "#-}"]
ppr_phase Nothing = empty
ppr_phase (Just n) = int n
...
...
This diff is collapsed.
Click to expand it.
ghc/compiler/hsSyn/HsSyn.lhs
+
12
−
5
View file @
e8481f60
...
...
@@ -73,13 +73,10 @@ instance (Outputable name, Outputable pat)
ppr (HsModule name iface_version exports imports
decls deprec src_loc)
= vcat [
case deprec of
Nothing -> empty
Just dt -> hsep [ptext SLIT("{-# DEPRECATED"), ppr dt, ptext SLIT("#-}")],
case exports of
Nothing ->
hsep [ptext SLIT("module"), pprModuleName name,
ptext SLIT("where")
]
Nothing ->
pp_header (
ptext SLIT("where")
)
Just es -> vcat [
hsep [ptext SLIT("module"), pprModuleName name,
lparen
]
,
pp_header
lparen,
nest 8 (fsep (punctuate comma (map ppr es))),
nest 4 (ptext SLIT(") where"))
],
...
...
@@ -87,6 +84,16 @@ instance (Outputable name, Outputable pat)
pp_nonnull decls
]
where
pp_header rest = case deprec of
Nothing -> pp_modname <+> rest
Just dt -> vcat [
pp_modname,
hsep [ptext SLIT("{-# DEPRECATED"), doubleQuotes (ppr dt), ptext SLIT("#-}")],
rest
]
pp_modname = ptext SLIT("module") <+> pprModuleName name
pp_nonnull [] = empty
pp_nonnull xs = vcat (map ppr xs)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment