Skip to content

Commit 5f13592

Browse files
committed
final prerelease cleanup
1 parent c0441cf commit 5f13592

File tree

5 files changed

+86
-85
lines changed

5 files changed

+86
-85
lines changed

Makefile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# For internal testing only
2+
13
dev:
24
stack test :spec --file-watch --fast
35

@@ -25,6 +27,8 @@ tspeed:
2527
tst:
2628
/usr/bin/time -l stack test :spec
2729

30+
jtst:
31+
stack test :spec --fast
2832

2933
rspeed:
3034
stack bench :sbench
@@ -34,9 +38,16 @@ bench:
3438
stack bench :sbench --file-watch
3539

3640
jstest:
37-
stack test --fast --file-watch --stack-yaml=stack-ghcjs.yaml
41+
stack clean;stack test --fast --file-watch --stack-yaml=stack-ghcjs.yaml --ghc-options "-UENUM_LARGE -UTEST_DECBITS"
42+
43+
jsbench:
44+
stack bench :sbench --stack-yaml=stack-ghcjs.yaml
45+
46+
jsprof:
47+
node --prof /Users/titto/workspace/flat/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0_ghcjs/build/spec/spec
48+
node --prof-process isolate-0x102801c00-v8.log > processed.txt
3849

39-
docs:
50+
docs:
4051
stack haddock --no-haddock-deps --open
4152

4253
eta:

README.md

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -131,28 +131,19 @@ Should also work with (not recently tested):
131131
* [ghc](https://www.haskell.org/ghc/) 7.10.3/LLVM 3.5.2 (Arm7)
132132

133133
#### [GHCJS](https://github.com/ghcjs/ghcjs)
134-
135-
Tested with:
136-
137-
```
138-
compiler: ghcjs-0.2.1.9007019_ghc-8.0.1
139-
compiler-check: match-exact
140-
setup-info:
141-
ghcjs:
142-
source:
143-
ghcjs-0.2.1.9007019_ghc-8.0.1:
144-
url: http://ghcjs.tolysz.org/ghc-8.0-2017-02-05-lts-7.19-9007019.tar.gz
145-
sha1: d2cfc25f9cda32a25a87d9af68891b2186ee52f9
146-
```
147134

148135
Passes all tests in the `flat` testsuite, except for those relative to short bytestrings (Data.ByteString.Short) that are unsupported by `ghcjs`.
149136

150-
If you use a different version of `ghcjs`, you are advised to run the full test suite by setting your compiler in `stack-ghcjs.yaml` and then running:
137+
Check [stack-ghcjs.yaml](https://github.com/Quid2/flat/blob/master/stack-ghcjs.yaml) to see with what versions of `ghcjs` it has been tested.
138+
139+
If you use a different version of `ghcjs`, you might want to run the test suite by setting your compiler in [stack-ghcjs.yaml](https://github.com/Quid2/flat/blob/master/stack-ghcjs.yaml) and then running:
151140

152141
`stack test --stack-yaml=stack-ghcjs.yaml`
153142

154143
NOTE: Versions prior to 0.33 encode `Double` values incorrectly when they are not aligned with a byte boundary.
155144

145+
NOTE: A [native TypeScript/JavaScript version](https://github.com/Quid2/ts) of `flat` is under development.
146+
156147
#### [ETA](https://eta-lang.org/)
157148

158149
It builds (with etlas 1.5.0.0 and eta eta-0.8.6b2 under macOS Sierra) and seems to be working, though the full test suite could not be run due to Eta's issues compiling some of the test suite dependencies.

flat.cabal

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ name: flat
22
version: 0.3.3
33
synopsis: Principled and efficient bit-oriented binary serialization.
44
description: Principled and efficient bit-oriented binary serialization, check the <http://github.com/Quid2/flat online tutorial>.
5-
homepage: http://github.com/Quid2/flat
5+
homepage: http://quid2.org
66
category: Data,Parsing,Serialization
77
license: BSD3
88
license-file: LICENSE
99
author: Pasqualino `Titto` Assini
1010
maintainer: tittoassini@gmail.com
11-
copyright: Copyright: (c) 2016 Pasqualino `Titto` Assini
11+
copyright: Copyright: (c) 2016-2018 Pasqualino `Titto` Assini
1212
cabal-version: >=1.10
1313
build-type: Simple
1414
-- The library (but not its tests) compiles with ETA >= 0.7.2 (see https://eta-lang.org/)
@@ -98,7 +98,11 @@ test-suite spec
9898

9999
default-language: Haskell2010
100100
hs-source-dirs: test
101-
cpp-options: -DLIST_BIT -DENUM_LARGE -DTEST_DECBITS
101+
cpp-options: -DLIST_BIT
102+
-- Add large data types test
103+
-- cpp-options: -DENUM_LARGE
104+
-- Add low level decoding test
105+
-- cpp-options: -DTEST_DECBITS
102106
other-modules:
103107
Test.Data
104108
Test.Data2
@@ -110,27 +114,28 @@ test-suite spec
110114
Test.Data2.Flat
111115
Test.Data.Values
112116

113-
-- Tests embedded in haddock docs (won't compile with ghcjs)
117+
-- Tests embedded in code documentation (won't compile with ghcjs)
114118
-- test-suite docs
115119
-- default-language: Haskell2010
116120
-- type: exitcode-stdio-1.0
117121
-- main-is: DocSpec.hs
118122
-- build-depends: base, doctest>=0.11.2,filemanip>=0.3.6.3
119123
-- HS-Source-Dirs: test
120124

121-
benchmark sbench
122-
main-is: Mini.hs
123-
type: exitcode-stdio-1.0
124-
default-language: Haskell2010
125-
build-depends:
126-
base
127-
, deepseq
128-
,criterion
129-
,bytestring,text,containers,process,filepath,statistics,directory
130-
-- ,timeit
131-
,flat
132-
hs-source-dirs: benchmarks test
133-
ghc-options: -O2 -dumpdir /tmp/dump -ddump-to-file -dsuppress-all -ddump-simpl -fprint-potential-instances
134-
-- cpp-options: -DENUM_LARGE
135-
other-modules:
136-
Test.E,Test.Data,Test.Data.Flat,Test.Data.Values,Test.Data2,Test.Data2.Flat,Test.E.Flat,Report
125+
-- Simple benchmark (won't compile with ghcjs)
126+
-- benchmark sbench
127+
-- main-is: Mini.hs
128+
-- type: exitcode-stdio-1.0
129+
-- default-language: Haskell2010
130+
-- build-depends:
131+
-- base
132+
-- , deepseq
133+
-- ,criterion
134+
-- ,bytestring,text,containers,process,filepath,statistics,directory
135+
-- -- ,timeit
136+
-- ,flat
137+
-- hs-source-dirs: benchmarks test
138+
-- ghc-options: -O2 -dumpdir /tmp/dump -ddump-to-file -dsuppress-all -ddump-simpl -fprint-potential-instances
139+
-- -- cpp-options: -DENUM_LARGE
140+
-- other-modules:
141+
-- Test.E,Test.Data,Test.Data.Flat,Test.Data.Values,Test.Data2,Test.Data2.Flat,Test.E.Flat,Report

src/README.lhs

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,28 +101,19 @@ Should also work with (not recently tested):
101101
* [ghc](https://www.haskell.org/ghc/) 7.10.3/LLVM 3.5.2 (Arm7)
102102

103103
#### [GHCJS](https://github.com/ghcjs/ghcjs)
104-
105-
Tested with:
106-
107-
```
108-
compiler: ghcjs-0.2.1.9007019_ghc-8.0.1
109-
compiler-check: match-exact
110-
setup-info:
111-
ghcjs:
112-
source:
113-
ghcjs-0.2.1.9007019_ghc-8.0.1:
114-
url: http://ghcjs.tolysz.org/ghc-8.0-2017-02-05-lts-7.19-9007019.tar.gz
115-
sha1: d2cfc25f9cda32a25a87d9af68891b2186ee52f9
116-
```
117104

118105
Passes all tests in the `flat` testsuite, except for those relative to short bytestrings (Data.ByteString.Short) that are unsupported by `ghcjs`.
119106

120-
If you use a different version of `ghcjs`, you are advised to run the full test suite by setting your compiler in `stack-ghcjs.yaml` and then running:
107+
Check [stack-ghcjs.yaml](https://github.com/Quid2/flat/blob/master/stack-ghcjs.yaml) to see with what versions of `ghcjs` it has been tested.
108+
109+
If you use a different version of `ghcjs`, you might want to run the test suite by setting your compiler in [stack-ghcjs.yaml](https://github.com/Quid2/flat/blob/master/stack-ghcjs.yaml) and then running:
121110

122111
`stack test --stack-yaml=stack-ghcjs.yaml`
123112

124113
NOTE: Versions prior to 0.33 encode `Double` values incorrectly when they are not aligned with a byte boundary.
125114

115+
NOTE: A [native TypeScript/JavaScript version](https://github.com/Quid2/ts) of `flat` is under development.
116+
126117
#### [ETA](https://eta-lang.org/)
127118

128119
It builds (with etlas 1.5.0.0 and eta eta-0.8.6b2 under macOS Sierra) and seems to be working, though the full test suite could not be run due to Eta's issues compiling some of the test suite dependencies.

stack-ghcjs.yaml

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
# GHCJS version used for testing
2+
3+
# Requires cabal 1.24.2.0 to build correctly
4+
resolver: lts-7.19
5+
compiler: ghcjs-0.2.1.9007019_ghc-8.0.1
6+
compiler-check: match-exact
7+
setup-info:
8+
ghcjs:
9+
source:
10+
ghcjs-0.2.1.9007019_ghc-8.0.1:
11+
url: http://ghcjs.tolysz.org/ghc-8.0-2017-02-05-lts-7.19-9007019.tar.gz
12+
sha1: d2cfc25f9cda32a25a87d9af68891b2186ee52f9
13+
14+
15+
# Requires cabal 1.24.2.0 to build correctly
16+
# resolver: lts-8.11
17+
# compiler: ghcjs-0.2.1.9008011_ghc-8.0.2
18+
# compiler-check: match-exact
19+
# setup-info:
20+
# ghcjs:
21+
# source:
22+
# ghcjs-0.2.1.9008011_ghc-8.0.2:
23+
# url: https://github.com/matchwood/ghcjs-stack-dist/raw/master/ghcjs-0.2.1.9008011.tar.gz
24+
# sha1: a72a5181124baf64bcd0e68a8726e65914473b3b
25+
26+
27+
# Requires cabal-2.0.1.1 to build correctly
28+
# resolver: lts-9.21
29+
# compiler: ghcjs-0.2.1.9009021_ghc-8.0.2
30+
# compiler-check: match-exact
31+
# setup-info:
32+
# ghcjs:
33+
# source:
34+
# ghcjs-0.2.1.9009021_ghc-8.0.2:
35+
# url: https://github.com/matchwood/ghcjs-stack-dist/raw/master/ghcjs-0.2.1.9009021.tar.gz
36+
# sha1: b1740c3c99e5039ac306702894cd6e58283f4d31
37+
138
packages:
239
- '.'
340

@@ -11,7 +48,6 @@ packages:
1148

1249
extra-deps:
1350
- happy-1.19.5 # required to avoid a stack bug
14-
#- QuickCheck-2.12.6.1@sha256:95b4e3b01033bf7d2ad21d0085266dba378477ac88e3d11ff238fc9db2575e6d
1551
- QuickCheck-2.11.3@sha256:e4c56f52532c993fc4460aeac7a2543dc03a68fba36eff420f3294d4d2622416
1652
- tasty-1.1.0.4@sha256:1310ceed449b3227614b329a1672a2c5bb046cb49e281996523567b3b0ad9ecc
1753
- tasty-quickcheck-0.10@sha256:9ddbacf1504bbbc4b99ab447d26651ad8454b69ceced3486e4623dccb89fb3d9
@@ -20,37 +56,4 @@ extra-deps:
2056

2157
flags:
2258
tasty:
23-
clock: false
24-
25-
# Requires cabal 1.24.2.0 to build correctly
26-
# resolver: lts-7.19
27-
# compiler: ghcjs-0.2.1.9007019_ghc-8.0.1
28-
# compiler-check: match-exact
29-
# setup-info:
30-
# ghcjs:
31-
# source:
32-
# ghcjs-0.2.1.9007019_ghc-8.0.1:
33-
# url: http://ghcjs.tolysz.org/ghc-8.0-2017-02-05-lts-7.19-9007019.tar.gz
34-
# sha1: d2cfc25f9cda32a25a87d9af68891b2186ee52f9
35-
36-
37-
# Requires cabal 1.24.2.0 to build correctly
38-
# resolver: lts-8.11
39-
# compiler: ghcjs-0.2.1.9008011_ghc-8.0.2
40-
# compiler-check: match-exact
41-
# setup-info:
42-
# ghcjs:
43-
# source:
44-
# ghcjs-0.2.1.9008011_ghc-8.0.2:
45-
# url: https://github.com/matchwood/ghcjs-stack-dist/raw/master/ghcjs-0.2.1.9008011.tar.gz
46-
# sha1: a72a5181124baf64bcd0e68a8726e65914473b3b
47-
48-
resolver: lts-9.21
49-
compiler: ghcjs-0.2.1.9009021_ghc-8.0.2
50-
compiler-check: match-exact
51-
setup-info:
52-
ghcjs:
53-
source:
54-
ghcjs-0.2.1.9009021_ghc-8.0.2:
55-
url: https://github.com/matchwood/ghcjs-stack-dist/raw/master/ghcjs-0.2.1.9009021.tar.gz
56-
sha1: b1740c3c99e5039ac306702894cd6e58283f4d31
59+
clock: false

0 commit comments

Comments
 (0)