Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
nofib
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
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
Abhiroop Sarkar
nofib
Commits
c3acdcc6
Commit
c3acdcc6
authored
Dec 31, 2018
by
Sebastian Graf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compare output of compress2 by hashing
This should fix the build in the same way as !2.
parent
e1869fd3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
12 deletions
+10
-12
.gitignore
.gitignore
+0
-1
real/compress2/Main.hs
real/compress2/Main.hs
+6
-2
real/compress2/Makefile
real/compress2/Makefile
+3
-9
real/compress2/compress2.faststdout
real/compress2/compress2.faststdout
+0
-0
real/compress2/compress2.stdout
real/compress2/compress2.stdout
+1
-0
No files found.
.gitignore
View file @
c3acdcc6
...
...
@@ -36,7 +36,6 @@ real/compress/compress
real/compress/compress.stdin
real/compress2/compress2
real/compress2/compress2.stdin
real/compress2/compress2.stdout
real/eff/CS/CS
real/eff/CSD/CSD
real/eff/FS/FS
...
...
real/compress2/Main.hs
View file @
c3acdcc6
...
...
@@ -8,12 +8,16 @@ where
import
Encode
import
WriteRoutines
import
System.IO
import
Data.Char
import
Data.List
(
foldl'
)
hash
::
String
->
Int
hash
=
foldl'
(
\
acc
c
->
ord
c
+
acc
*
31
)
0
main
=
do
hSetBinaryMode
stdin
True
hSetBinaryMode
stdout
True
i
<-
getContents
p
utStr
(
compress
i
)
p
rint
(
hash
(
compress
i
)
)
-- The output is given by a magic header consisting of two fixed numbers,
-- and a third representing the maximum number of bits used per code and
...
...
real/compress2/Makefile
View file @
c3acdcc6
TOP
=
../..
include
$(TOP)/mk/boilerplate.mk
SRC_RUNTEST_OPTS
+=
-stdout-binary
SRC_HC_OPTS
+=
-fglasgow-exts
SRC_RUNTEST_OPTS
+=
+RTS
-H100m
-RTS
CLEAN_FILES
+=
compress2.stdin
include
$(TOP)/mk/target.mk
boot
::
compress2.stdin
compress2.faststdin compress2.stdout
boot
::
compress2.stdin
CAT_FILES
=
compress2.faststdin
*
.hs compress2.faststdin
*
.hs
compress2.stdin
:
compress2.faststdin
cat
$(CAT_FILES)
$(CAT_FILES)
$(CAT_FILES)
$(CAT_FILES)
$(CAT_FILES)
>
compress2.stdin
compress2.stdout
:
compress2.stdin compress2
./compress2 < compress2.stdin
>
compress2.stdout
clean
::
rm
-f
compress2.stdin compress2.stdout
real/compress2/compress2.faststdout
View file @
c3acdcc6
No preview for this file type
real/compress2/compress2.stdout
0 → 100644
View file @
c3acdcc6
8522868473445645791
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