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
Show more breadcrumbs
Gesh
GHC
Commits
899fc3eb
Commit
899fc3eb
authored
27 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-05-26 04:57:53 by sof]
PprStyle interface folded into Outputable
parent
1e2db9e1
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/utils/PprStyle.lhs
+0
-60
0 additions, 60 deletions
ghc/compiler/utils/PprStyle.lhs
with
0 additions
and
60 deletions
ghc/compiler/utils/PprStyle.lhs
deleted
100644 → 0
+
0
−
60
View file @
1e2db9e1
%
% (c) The AQUA Project, Glasgow University, 1996
%
\section[PprStyle]{Pretty-printing `styles'}
\begin{code}
#include "HsVersions.h"
module PprStyle (
PprStyle(..),
codeStyle, ifaceStyle, userStyle
) where
CHK_Ubiq() -- debugging consistency check
import FastString
data PprStyle
= PprForUser -- Pretty-print in a way that will
-- make sense to the ordinary user;
-- must be very close to Haskell
-- syntax, etc.
| PprQuote -- Like PprForUser, but also quote the whole thing
| PprDebug -- Standard debugging output
| PprShowAll -- Debugging output which leaves
-- nothing to the imagination
| PprInterface -- Interface generation
| PprForC -- must print out C-acceptable names
| PprForAsm -- must print out assembler-acceptable names
Bool -- prefix CLabel with underscore?
(String -> String) -- format AsmTempLabel
\end{code}
Orthogonal to the above printing styles are (possibly) some
command-line flags that affect printing (often carried with the
style). The most likely ones are variations on how much type info is
shown.
The following test decides whether or not we are actually generating
code (either C or assembly), or generating interface files.
\begin{code}
codeStyle :: PprStyle -> Bool
codeStyle PprForC = True
codeStyle (PprForAsm _ _) = True
codeStyle _ = False
ifaceStyle :: PprStyle -> Bool
ifaceStyle PprInterface = True
ifaceStyle other = False
userStyle :: PprStyle -> Bool
userStyle PprQuote = True
userStyle PprForUser = True
userStyle other = False
\end{code}
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