Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,321
Issues
4,321
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
371
Merge Requests
371
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
1796a476
Commit
1796a476
authored
Mar 11, 2004
by
simonpj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[project @ 2004-03-11 14:31:56 by simonpj]
Better printing for LHsBinds
parent
3cc0dcd4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
ghc/compiler/hsSyn/HsBinds.lhs
ghc/compiler/hsSyn/HsBinds.lhs
+5
-2
ghc/compiler/hsSyn/HsDecls.lhs
ghc/compiler/hsSyn/HsDecls.lhs
+2
-2
No files found.
ghc/compiler/hsSyn/HsBinds.lhs
View file @
1796a476
...
...
@@ -50,7 +50,7 @@ instance OutputableBndr id => Outputable (HsBindGroup id) where
ppr (HsBindGroup binds sigs is_rec)
= vcat [ppr_isrec,
vcat (map ppr sigs),
vcat (map ppr (bagToList binds))
pprLHsBinds binds
]
where
ppr_isrec = getPprStyle $ \ sty ->
...
...
@@ -81,6 +81,9 @@ instance (OutputableBndr id) => Outputable (IPBind id) where
type LHsBinds id = Bag (LHsBind id)
type LHsBind id = Located (HsBind id)
pprLHsBinds :: OutputableBndr id => LHsBinds id -> SDoc
pprLHsBinds binds = lbrace <+> vcat (map ppr (bagToList binds)) <+> rbrace
data HsBind id
= FunBind (Located id)
-- Used for both functions f x = e
...
...
@@ -161,7 +164,7 @@ ppr_monobind (AbsBinds tyvars dictvars exports inlines val_binds)
nest 4 ( vcat [pprBndr LetBind x | (_,x,_) <- exports]
-- Print type signatures
$$
ppr val_binds )
ppr
LHsBinds
val_binds )
\end{code}
%************************************************************************
...
...
ghc/compiler/hsSyn/HsDecls.lhs
View file @
1796a476
...
...
@@ -32,7 +32,7 @@ import {-# SOURCE #-} HsExpr( HsExpr, pprExpr )
-- Because Expr imports Decls via HsBracket
import HsBinds ( HsBindGroup, HsBind, LHsBinds,
Sig(..), LSig, LFixitySig )
Sig(..), LSig, LFixitySig
, pprLHsBinds
)
import HsPat ( HsConDetails(..), hsConArgs )
import HsImpExp ( pprHsVar )
import HsTypes
...
...
@@ -541,7 +541,7 @@ instance (OutputableBndr name) => Outputable (InstDecl name) where
ppr (InstDecl inst_ty binds uprags)
= vcat [hsep [ptext SLIT("instance"), ppr inst_ty, ptext SLIT("where")],
nest 4 (ppr uprags),
nest 4 (ppr binds) ]
nest 4 (ppr
LHsBinds
binds) ]
\end{code}
%************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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