Skip to content

Commit 022636d

Browse files
authored
Merge pull request #830 from phadej/subsrc-dirs
Subsrc dirs
2 parents 167c0c0 + ce89e91 commit 022636d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+27
-26
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Move code into subdirectories
2+
6230e4ee376ce01ab05b8e48a3a7484f8d602b9e

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ script:
169169
# Testing...
170170
- ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all
171171
# HLint..
172-
- if [ $HCNUMVER -ge 80800 ] && [ $HCNUMVER -lt 81000 ] ; then (cd ${PKGDIR_aeson} && hlint -h ${TOP}/.hlint.yaml . attoparsec-iso8601/ pure ffi) ; fi
173-
- if [ $HCNUMVER -ge 80800 ] && [ $HCNUMVER -lt 81000 ] ; then (cd ${PKGDIR_attoparsec_iso8601} && hlint -h ${TOP}/.hlint.yaml .) ; fi
172+
- if [ $HCNUMVER -ge 80800 ] && [ $HCNUMVER -lt 81000 ] ; then (cd ${PKGDIR_aeson} && hlint -h ${TOP}/.hlint.yaml src attoparsec-iso8601/src src-pure src-ffi) ; fi
173+
- if [ $HCNUMVER -ge 80800 ] && [ $HCNUMVER -lt 81000 ] ; then (cd ${PKGDIR_attoparsec_iso8601} && hlint -h ${TOP}/.hlint.yaml src/) ; fi
174174
- if [ $HCNUMVER -ge 80800 ] && [ $HCNUMVER -lt 81000 ] ; then (cd ${PKGDIR_aeson_examples} && hlint -h ${TOP}/.hlint.yaml src/) ; fi
175175
# haddock...
176176
- if [ $HCNUMVER -ge 80600 ] ; then ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all ; fi

aeson.cabal

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,15 @@ description:
2626
extra-source-files:
2727
*.yaml
2828
README.markdown
29-
benchmarks/*.cabal
30-
benchmarks/*.hs
31-
benchmarks/*.py
32-
benchmarks/Compare/*.hs
33-
benchmarks/Makefile
34-
benchmarks/Typed/*.hs
35-
benchmarks/json-data/*.json
3629
cbits/*.c
3730
changelog.md
38-
ffi/Data/Aeson/Parser/*.hs
3931
include/*.h
4032
tests/JSONTestSuite/test_parsing/*.json
4133
tests/JSONTestSuite/test_transform/*.json
4234
tests/golden/*.expected
43-
pure/Data/Aeson/Parser/*.hs
35+
src-ffi/Data/Aeson/Parser/*.hs
36+
src-pure/Data/Aeson/Parser/*.hs
37+
benchmarks/json-data/*.json
4438

4539
flag developer
4640
description: operate in developer mode
@@ -64,7 +58,7 @@ flag cffi
6458

6559
library
6660
default-language: Haskell2010
67-
hs-source-dirs: . attoparsec-iso8601/
61+
hs-source-dirs: src attoparsec-iso8601/src
6862

6963
exposed-modules:
7064
Data.Aeson
@@ -162,18 +156,18 @@ library
162156

163157
include-dirs: include
164158
if impl(ghcjs) || !flag(cffi)
165-
hs-source-dirs: pure
159+
hs-source-dirs: src-pure
166160
other-modules: Data.Aeson.Parser.UnescapePure
167161
else
168162
c-sources: cbits/unescape_string.c
169163
cpp-options: -DCFFI
170-
hs-source-dirs: ffi
164+
hs-source-dirs: src-ffi
171165
other-modules: Data.Aeson.Parser.UnescapeFFI
172166

173167
test-suite aeson-tests
174168
default-language: Haskell2010
175169
type: exitcode-stdio-1.0
176-
hs-source-dirs: tests ffi pure
170+
hs-source-dirs: tests src-ffi src-pure
177171
main-is: Tests.hs
178172
c-sources: cbits/unescape_string.c
179173
ghc-options: -Wall -threaded -rtsopts

attoparsec-iso8601/attoparsec-iso8601.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ flag fast
2929
manual: True
3030

3131
library
32-
hs-source-dirs: .
32+
hs-source-dirs: src
3333
default-language: Haskell2010
3434
ghc-options: -Wall
3535
exposed-modules:

benchmarks/aeson-benchmarks.cabal

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-type: Simple
55

66
library
77
default-language: Haskell2010
8-
hs-source-dirs: .. ../ffi ../pure ../attoparsec-iso8601
8+
hs-source-dirs: ../src ../src-ffi ../src-pure ../attoparsec-iso8601/src
99
c-sources: ../cbits/unescape_string.c
1010
build-depends:
1111
attoparsec
@@ -83,7 +83,7 @@ library
8383
executable aeson-benchmark-suite
8484
default-language: Haskell2010
8585
main-is: Suite.hs
86-
hs-source-dirs: . ../examples/src
86+
hs-source-dirs: bench ../examples/src
8787
ghc-options: -Wall -O2 -rtsopts
8888
build-depends:
8989
aeson-benchmarks
@@ -108,7 +108,7 @@ executable aeson-benchmark-suite
108108
executable aeson-benchmark-auto-compare
109109
default-language: Haskell2010
110110
main-is: AutoCompare.hs
111-
hs-source-dirs: .
111+
hs-source-dirs: bench
112112
ghc-options: -Wall -O2 -rtsopts
113113
other-modules:
114114
Auto.G.BigProduct
@@ -131,7 +131,7 @@ executable aeson-benchmark-auto-compare
131131
executable aeson-benchmark-escape
132132
default-language: Haskell2010
133133
main-is: Escape.hs
134-
hs-source-dirs: ../examples/src .
134+
hs-source-dirs: bench ../examples/src
135135
ghc-options: -Wall -O2 -rtsopts
136136
build-depends:
137137
aeson-benchmarks
@@ -146,7 +146,7 @@ executable aeson-benchmark-escape
146146
executable aeson-benchmark-compare
147147
default-language: Haskell2010
148148
main-is: Compare.hs
149-
hs-source-dirs: ../examples/src .
149+
hs-source-dirs: bench ../examples/src
150150
ghc-options: -Wall -O2 -rtsopts
151151
other-modules:
152152
Compare.BufferBuilder
@@ -178,7 +178,7 @@ executable aeson-benchmark-compare
178178
executable aeson-benchmark-micro
179179
default-language: Haskell2010
180180
main-is: Micro.hs
181-
hs-source-dirs: ../examples/src .
181+
hs-source-dirs: bench ../examples/src
182182
ghc-options: -Wall -O2 -rtsopts
183183
build-depends:
184184
aeson-benchmarks
@@ -193,7 +193,7 @@ executable aeson-benchmark-micro
193193
executable aeson-benchmark-typed
194194
default-language: Haskell2010
195195
main-is: Typed.hs
196-
hs-source-dirs: ../examples/src .
196+
hs-source-dirs: bench ../examples/src
197197
ghc-options: -Wall -O2 -rtsopts
198198
other-modules:
199199
Twitter
@@ -223,6 +223,7 @@ executable aeson-benchmark-typed
223223
executable aeson-benchmark-compare-with-json
224224
default-language: Haskell2010
225225
main-is: CompareWithJSON.hs
226+
hs-source-dirs: bench
226227
ghc-options: -Wall -O2 -rtsopts
227228
build-depends:
228229
aeson-benchmarks
@@ -238,6 +239,7 @@ executable aeson-benchmark-compare-with-json
238239
executable aeson-benchmark-aeson-encode
239240
default-language: Haskell2010
240241
main-is: AesonEncode.hs
242+
hs-source-dirs: bench
241243
ghc-options: -Wall -O2 -rtsopts
242244
build-depends:
243245
aeson-benchmarks
@@ -251,6 +253,7 @@ executable aeson-benchmark-aeson-encode
251253
executable aeson-benchmark-aeson-parse
252254
default-language: Haskell2010
253255
main-is: AesonParse.hs
256+
hs-source-dirs: bench
254257
ghc-options: -Wall -O2 -rtsopts
255258
build-depends:
256259
aeson-benchmarks
@@ -268,6 +271,7 @@ executable aeson-benchmark-aeson-parse
268271
executable aeson-benchmark-json-parse
269272
default-language: Haskell2010
270273
main-is: JsonParse.hs
274+
hs-source-dirs: bench
271275
ghc-options: -Wall -O2 -rtsopts
272276
build-depends:
273277
base
@@ -279,6 +283,7 @@ executable aeson-benchmark-json-parse
279283
executable aeson-benchmark-dates
280284
default-language: Haskell2010
281285
main-is: Dates.hs
286+
hs-source-dirs: bench
282287
ghc-options: -Wall -O2 -rtsopts
283288
build-depends:
284289
aeson-benchmarks
@@ -296,6 +301,7 @@ executable aeson-benchmark-dates
296301
executable aeson-benchmark-map
297302
default-language: Haskell2010
298303
main-is: AesonMap.hs
304+
hs-source-dirs: bench
299305
ghc-options: -Wall -O2 -rtsopts
300306
build-depends:
301307
aeson-benchmarks
@@ -313,6 +319,7 @@ executable aeson-benchmark-map
313319
executable aeson-benchmark-foldable
314320
default-language: Haskell2010
315321
main-is: AesonFoldable.hs
322+
hs-source-dirs: bench
316323
ghc-options: -Wall -O2 -rtsopts
317324
build-depends:
318325
aeson-benchmarks
@@ -331,6 +338,7 @@ executable aeson-benchmark-foldable
331338
executable aeson-issue-673
332339
default-language: Haskell2010
333340
main-is: Issue673.hs
341+
hs-source-dirs: bench
334342
ghc-options: -Wall -O1 -rtsopts
335343
build-depends:
336344
aeson-benchmarks
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)