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
0c6f25fe
Commit
0c6f25fe
authored
27 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-08-25 21:36:07 by sof]
cleaned up
parent
c06cba95
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/basicTypes/Demand.lhs
+14
-16
14 additions, 16 deletions
ghc/compiler/basicTypes/Demand.lhs
with
14 additions
and
16 deletions
ghc/compiler/basicTypes/Demand.lhs
+
14
−
16
View file @
0c6f25fe
...
...
@@ -102,7 +102,8 @@ showDemands wrap_args = show_demands wrap_args ""
instance Read Demand where
readList str = read_em [] str
instance Show Demand where
showList wrap_args rest = show_demands wrap_args rest
showsPrec prec wrap rest = show_demand wrap rest
showList wrap_args rest = show_demands wrap_args rest
#else
...
...
@@ -130,24 +131,21 @@ do_unpack new_or_data wrapper_unpacks acc xs
_ -> panic ("Demand.do_unpack:"++show acc++"::"++xs)
show_demands wrap_args rest
= foldr show
1
rest wrap_args
where
show
1
(WwLazy False) rest = 'L' : rest
show
1
(WwLazy True) rest = 'A' : rest
show
1
WwStrict rest = 'S' : rest
show
1
WwPrim rest = 'P' : rest
show
1
WwEnum rest = 'E' : rest
show
1
(WwUnpack nd wu args) rest = ch
++ "(" ++
showList args (')' : rest)
= foldr show
_demand
rest wrap_args
show
_demand
(WwLazy False)
rest = 'L' : rest
show
_demand
(WwLazy True)
rest = 'A' : rest
show
_demand
WwStrict
rest = 'S' : rest
show
_demand
WwPrim
rest = 'P' : rest
show
_demand
WwEnum
rest = 'E' : rest
show
_demand
(WwUnpack nd wu args) rest = ch
:'(':
showList args (')' : rest)
where
ch = case nd of
DataType | wu ->
"U"
| otherwise ->
"u"
NewType | wu ->
"N"
| otherwise ->
"n"
DataType | wu ->
'U'
| otherwise ->
'u'
NewType | wu ->
'N'
| otherwise ->
'n'
instance Outputable Demand where
ppr sty si = text (showList [si] "")
\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