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
b49dd184
Commit
b49dd184
authored
27 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-05-26 04:36:50 by sof]
Updated imports; improved ppr
parent
f129da12
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/hsSyn/HsPat.lhs
+11
-9
11 additions, 9 deletions
ghc/compiler/hsSyn/HsPat.lhs
with
11 additions
and
9 deletions
ghc/compiler/hsSyn/HsPat.lhs
+
11
−
9
View file @
b49dd184
...
...
@@ -20,19 +20,21 @@ module HsPat (
IMP_Ubiq()
-- friends:
import HsBasic ( HsLit, Fixity
)
IMPORT_DELOOPER(IdLoop
)
IMPORT_DELOOPER(HsLoop)
( HsExpr )
-- IMPORT_DELOOPER(IdLoop
)
import HsBasic ( HsLit
)
import HsExpr
( HsExpr )
import BasicTypes ( Fixity )
-- others:
import Id
--(
dataConTyCon, GenId )
import Id
( SYN_IE(Id),
dataConTyCon, GenId )
import Maybes ( maybeToBool )
import Outputable --( interppSP, interpp'SP, ifPprShowAll )
import PprStyle ( PprStyle(..), userStyle )
import Outputable ( PprStyle(..), userStyle, interppSP,
interpp'SP, ifPprShowAll, Outputable(..)
)
import Pretty
import TyCon ( maybeTyConSingleCon )
import PprType ( GenType )
import CmdLineOpts ( opt_PprUserLength )
#if __GLASGOW_HASKELL__ >= 202
import Name
#endif
...
...
@@ -173,7 +175,7 @@ pprInPat sty (NPlusKPatIn n k)
pprInPat sty (RecPatIn con rpats)
= hsep [ppr sty con, braces (hsep (punctuate comma (map (pp_rpat sty) rpats)))]
where
pp_rpat sty (v, _, True) | userStyle sty = ppr PprForUser v
pp_rpat sty (v, _, True) | userStyle sty = ppr
(
PprForUser
opt_PprUserLength)
v
pp_rpat sty (v, p, _) = hsep [ppr sty v, char '=', ppr sty p]
\end{code}
...
...
@@ -209,7 +211,7 @@ pprOutPat sty (TuplePat pats)
pprOutPat sty (RecPat con ty rpats)
= hcat [ppr sty con, braces (hsep (punctuate comma (map (pp_rpat sty) rpats)))]
where
pp_rpat sty (v, _, True) | userStyle sty = ppr PprForUser v
pp_rpat sty (v, _, True) | userStyle sty = ppr
(
PprForUser
opt_PprUserLength)
v
pp_rpat sty (v, p, _) = hsep [ppr sty v, char '=', ppr sty p]
pprOutPat sty (LitPat l ty) = ppr sty l -- ToDo: print more
...
...
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