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
6be2543b
Commit
6be2543b
authored
27 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-05-26 04:39:45 by sof]
Updated imports;improved ppr
parent
e8e97426
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/HsExpr.lhs
+10
-6
10 additions, 6 deletions
ghc/compiler/hsSyn/HsExpr.lhs
with
10 additions
and
6 deletions
ghc/compiler/hsSyn/HsExpr.lhs
+
10
−
6
View file @
6be2543b
...
...
@@ -9,20 +9,20 @@
module HsExpr where
IMP_Ubiq(){-uitous-}
IMPORT_DELOOPER(HsLoop) -- for paranoia checking
-- friends:
IMPORT_DELOOPER(HsLoop) ( pprMatches, pprMatch, Match )
import HsBinds ( HsBinds )
import HsBasic ( HsLit
, Fixity(..), FixityDirection(..)
)
import
HsMatches ( pprMatches, pprMatch, Match
)
import HsBasic ( HsLit )
import
BasicTypes ( Fixity(..), FixityDirection(..)
)
import HsTypes ( HsType )
-- others:
import Id ( SYN_IE(DictVar), GenId, SYN_IE(Id) )
import Outputable --( interppSP, interpp'SP, ifnotPprForUser )
import Outputable ( pprQuote, interppSP, interpp'SP, ifnotPprForUser,
PprStyle(..), userStyle, Outputable(..) )
import PprType ( pprGenType, pprParendGenType, GenType{-instance-} )
import Pretty
import PprStyle ( PprStyle(..), userStyle )
import SrcLoc ( SrcLoc )
import Usage ( GenUsage{-instance-} )
--import Util ( panic{-ToDo:rm eventually-} )
...
...
@@ -199,6 +199,10 @@ instance (NamedThing id, Outputable id, Outputable pat,
\end{code}
\begin{code}
pprExpr :: (NamedThing id, Outputable id, Outputable pat,
Eq tyvar, Outputable tyvar, Eq uvar, Outputable uvar)
=> PprStyle -> HsExpr tyvar uvar id pat -> Doc
pprExpr sty (HsVar v) = ppr sty v
pprExpr sty (HsLit lit) = ppr sty lit
...
...
@@ -209,7 +213,7 @@ pprExpr sty (HsLam match)
pprExpr sty expr@(HsApp e1 e2)
= let (fun, args) = collect_args expr [] in
hang
(pprExpr sty fun)
4
(sep (map (pprExpr sty) args))
(pprExpr sty fun)
<+>
(sep (map (pprExpr sty) args))
where
collect_args (HsApp fun arg) args = collect_args fun (arg:args)
collect_args fun args = (fun, args)
...
...
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