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
3eecf94c
Commit
3eecf94c
authored
27 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-05-18 04:56:43 by sof]
Updated for new PP
parent
62a2c335
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/utils/FiniteMap.lhs
+10
-7
10 additions, 7 deletions
ghc/compiler/utils/FiniteMap.lhs
with
10 additions
and
7 deletions
ghc/compiler/utils/FiniteMap.lhs
+
10
−
7
View file @
3eecf94c
...
...
@@ -46,7 +46,7 @@ module FiniteMap (
addToFM_C,
addListToFM,
addListToFM_C,
IF_NOT_GHC(
delFromFM
COMMA)
delFromFM
,
delListFromFM,
plusFM,
...
...
@@ -70,6 +70,9 @@ module FiniteMap (
) where
IMPORT_DELOOPER(SpecLoop)
#if __GLASGOW_HASKELL__ >= 202
import GlaExts
#endif
#if defined(USE_FAST_STRINGS)
import FastString
#endif
...
...
@@ -77,7 +80,7 @@ import Maybes
import Bag ( Bag, foldrBag )
import Outputable ( Outputable(..) )
import PprStyle ( PprStyle )
import Pretty (
SYN_IE(Pretty), PrettyRep
)
import Pretty (
Doc
)
#ifdef COMPILING_GHC
...
...
@@ -436,7 +439,7 @@ mkBranch which key elt fm_l fm_r
= --ASSERT( left_ok && right_ok && balance_ok )
#if defined(COMPILING_GHC) && defined(DEBUG_FINITEMAPS)
if not ( left_ok && right_ok && balance_ok ) then
pprPanic ("mkBranch:"++show which) (
ppAboves
[ppr PprDebug [left_ok, right_ok, balance_ok],
pprPanic ("mkBranch:"++show which) (
vcat
[ppr PprDebug [left_ok, right_ok, balance_ok],
ppr PprDebug key,
ppr PprDebug fm_l,
ppr PprDebug fm_r])
...
...
@@ -701,11 +704,11 @@ deleteMax (Branch key elt _ fm_l fm_r) = mkBalBranch key elt fm_l (deleteMax
instance (Outputable key) => Outputable (FiniteMap key elt) where
ppr sty fm = pprX sty fm
pprX sty EmptyFM =
ppC
har '!'
pprX sty EmptyFM =
c
har '!'
pprX sty (Branch key elt sz fm_l fm_r)
= p
pBesides [ppLparen,
pprX sty fm_l,
ppSP
,
ppr sty key,
ppSP, ppI
nt (IF_GHC(I# sz, sz)),
ppSP
,
pprX sty fm_r
, ppRparen
]
= p
arens (hcat [
pprX sty fm_l,
space
,
ppr sty key,
space, i
nt (IF_GHC(I# sz, sz)),
space
,
pprX sty fm_r]
)
#endif
#ifndef COMPILING_GHC
...
...
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