Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpc-bin
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Ian-Woo Kim
hpc-bin
Commits
86100751
Commit
86100751
authored
2 years ago
by
BinderDavid
Browse files
Options
Downloads
Patches
Plain Diff
Replace use of "Strict" typeclass by use of deepseq library
parent
063657a6
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
hpc-bin.cabal
+2
-1
2 additions, 1 deletion
hpc-bin.cabal
src/HpcCombine.hs
+3
-35
3 additions, 35 deletions
src/HpcCombine.hs
with
6 additions
and
37 deletions
.gitlab-ci.yml
+
1
−
1
View file @
86100751
...
...
@@ -3,4 +3,4 @@ build:
tags
:
-
"
x86_64-linux"
script
:
-
"
cabal
build
-w
$GHC"
-
"
cabal
update
&&
cabal
build
-w
$GHC"
This diff is collapsed.
Click to expand it.
hpc-bin.cabal
+
2
−
1
View file @
86100751
...
...
@@ -42,11 +42,12 @@ library
autogen-modules: Paths_hpc_bin
build-depends: base >= 4 && < 5,
deepseq >= 1.4.7 && < 1.5,
directory >= 1 && < 1.4,
filepath >= 1 && < 1.5,
containers >= 0.1 && < 0.7,
array >= 0.1 && < 0.6,
hpc >= 0.6.
1
&& < 0.7
hpc >= 0.6.
2
&& < 0.7
if flag(build-tool-depends)
build-tool-depends: happy:happy >= 1.20.0
...
...
This diff is collapsed.
Click to expand it.
src/HpcCombine.hs
+
3
−
35
View file @
86100751
...
...
@@ -10,7 +10,8 @@ import Trace.Hpc.Util
import
HpcFlags
import
Control.Monad
import
Control.DeepSeq
(
force
)
import
Control.Monad
(
foldM
)
import
qualified
Data.Set
as
Set
import
qualified
Data.Map
as
Map
...
...
@@ -125,7 +126,7 @@ map_main _ _ = hpcError map_plugin $ "to many .tix files specified"
mergeTixFile
::
Flags
->
(
Integer
->
Integer
->
Integer
)
->
Tix
->
String
->
IO
Tix
mergeTixFile
flags
fn
tix
file_name
=
do
Just
new_tix
<-
readTix
file_name
return
$!
strict
$
mergeTix
(
mergeModule
flags
)
fn
tix
(
filterTix
flags
new_tix
)
return
$!
force
$
mergeTix
(
mergeModule
flags
)
fn
tix
(
filterTix
flags
new_tix
)
-- could allow different numbering on the module info,
-- as long as the total is the same; will require normalization.
...
...
@@ -162,36 +163,3 @@ mergeTix modComb f
fm2
=
Map
.
fromList
[
(
tixModuleName
tix
,
tix
)
|
tix
<-
t2
]
-- What I would give for a hyperstrict :-)
-- This makes things about 100 times faster.
class
Strict
a
where
strict
::
a
->
a
instance
Strict
Integer
where
strict
i
=
i
instance
Strict
Int
where
strict
i
=
i
instance
Strict
Hash
where
-- should be fine, because Hash is a newtype round an Int
strict
i
=
i
instance
Strict
Char
where
strict
i
=
i
instance
Strict
a
=>
Strict
[
a
]
where
strict
(
a
:
as
)
=
(((
:
)
$!
strict
a
)
$!
strict
as
)
strict
[]
=
[]
instance
(
Strict
a
,
Strict
b
)
=>
Strict
(
a
,
b
)
where
strict
(
a
,
b
)
=
(((,)
$!
strict
a
)
$!
strict
b
)
instance
Strict
Tix
where
strict
(
Tix
t1
)
=
Tix
$!
strict
t1
instance
Strict
TixModule
where
strict
(
TixModule
m1
p1
i1
t1
)
=
((((
TixModule
$!
strict
m1
)
$!
strict
p1
)
$!
strict
i1
)
$!
strict
t1
)
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