Skip to content

Commit ded795b

Browse files
authored
Merge pull request #516 from IntersectMBO/td/cabal-gild
Use cabal-gild to format cabal files
2 parents 2b9c943 + d39ec56 commit ded795b

File tree

16 files changed

+652
-569
lines changed

16 files changed

+652
-569
lines changed

.github/workflows/haskell.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,21 @@ jobs:
215215
216216
- name: Run fourmolu
217217
run: ./scripts/fourmolize.sh
218+
219+
cabal-format:
220+
runs-on: ubuntu-latest
221+
222+
defaults:
223+
run:
224+
shell: bash
225+
226+
strategy:
227+
fail-fast: false
228+
229+
steps:
230+
- uses: actions/checkout@v4
231+
- uses: tfausak/cabal-gild-setup-action@v2
232+
with:
233+
version: 1.5.0.1
234+
- name: Format all cabal files
235+
run: ./scripts/cabal-format.sh check
Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
cabal-version: >=1.10
2-
3-
name: base-deriving-via
4-
version: 0.1.0.2
5-
synopsis: A general hook newtype for use with deriving via
6-
license: Apache-2.0
1+
cabal-version: >=1.10
2+
name: base-deriving-via
3+
version: 0.1.0.2
4+
synopsis: A general hook newtype for use with deriving via
5+
license: Apache-2.0
76
license-files:
87
LICENSE
98
NOTICE
10-
author: IOHK
11-
maintainer: [email protected]
12-
copyright: IOHK
13-
build-type: Simple
14-
extra-source-files: CHANGELOG.md
159

16-
library
17-
default-language: Haskell2010
18-
hs-source-dirs: src
10+
author: IOHK
11+
maintainer: [email protected]
12+
copyright: IOHK
13+
build-type: Simple
14+
extra-source-files: CHANGELOG.md
1915

16+
library
17+
default-language: Haskell2010
18+
hs-source-dirs: src
2019
ghc-options:
2120
-Wall
2221
-Wcompat
@@ -28,8 +27,8 @@ library
2827
-Wmissing-export-lists
2928

3029
exposed-modules:
31-
Data.DerivingVia
32-
Data.DerivingVia.GHC.Generics.Monoid
33-
Data.DerivingVia.GHC.Generics.Semigroup
30+
Data.DerivingVia
31+
Data.DerivingVia.GHC.Generics.Monoid
32+
Data.DerivingVia.GHC.Generics.Semigroup
3433

35-
build-depends: base
34+
build-depends: base

cabal.project

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ repository cardano-haskell-packages
1313
index-state: 2024-12-10T00:00:00Z
1414
-- The CHaP index-state
1515
index-state: cardano-haskell-packages 2024-10-10T04:22:19Z
16-
1716
packages:
1817
base-deriving-via
1918
cardano-binary
@@ -30,7 +29,6 @@ packages:
3029

3130
-- Ensures colourized output from test runners
3231
test-show-details: direct
33-
3432
tests: true
3533
benchmarks: true
3634

cardano-binary/cardano-binary.cabal

Lines changed: 90 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,106 @@
11
cabal-version: 3.0
2-
3-
name: cardano-binary
4-
version: 1.7.1.0
5-
synopsis: Binary serialization for Cardano
6-
description: This package includes the binary serialization format for Cardano
7-
license: Apache-2.0
2+
name: cardano-binary
3+
version: 1.7.1.0
4+
synopsis: Binary serialization for Cardano
5+
description: This package includes the binary serialization format for Cardano
6+
license: Apache-2.0
87
license-files:
98
LICENSE
109
NOTICE
11-
author: IOHK
12-
maintainer: [email protected]
13-
copyright: 2019-2021 IOHK
14-
category: Currency
15-
build-type: Simple
16-
extra-source-files: README.md
17-
CHANGELOG.md
1810

19-
common base { build-depends: base >= 4.14 && < 5 }
11+
author: IOHK
12+
maintainer: [email protected]
13+
copyright: 2019-2021 IOHK
14+
category: Currency
15+
build-type: Simple
16+
extra-source-files:
17+
CHANGELOG.md
18+
README.md
2019

21-
common project-config
22-
default-language: Haskell2010
20+
common base
21+
build-depends: base >=4.14 && <5
2322

24-
ghc-options: -Wall
25-
-Wcompat
26-
-Wincomplete-record-updates
27-
-Wincomplete-uni-patterns
28-
-Wpartial-fields
29-
-Wredundant-constraints
30-
-Wunused-packages
23+
common project-config
24+
default-language: Haskell2010
25+
ghc-options:
26+
-Wall
27+
-Wcompat
28+
-Wincomplete-record-updates
29+
-Wincomplete-uni-patterns
30+
-Wpartial-fields
31+
-Wredundant-constraints
32+
-Wunused-packages
3133

3234
library
33-
import: base, project-config
34-
hs-source-dirs: src
35-
exposed-modules: Cardano.Binary
36-
other-modules: Cardano.Binary.ToCBOR
37-
Cardano.Binary.FromCBOR
35+
import: base, project-config
36+
hs-source-dirs: src
37+
exposed-modules: Cardano.Binary
38+
other-modules:
39+
Cardano.Binary.Deserialize
40+
Cardano.Binary.FromCBOR
41+
Cardano.Binary.Serialize
42+
Cardano.Binary.ToCBOR
3843

39-
Cardano.Binary.Serialize
40-
Cardano.Binary.Deserialize
41-
42-
build-depends: base
43-
, bytestring
44-
, cborg >= 0.2.9 && < 0.3
45-
, containers
46-
, data-fix
47-
, formatting
48-
, primitive
49-
, recursion-schemes >= 5.1 && < 5.3
50-
, safe-exceptions
51-
, tagged
52-
, text
53-
, time
54-
, vector
44+
build-depends:
45+
base,
46+
bytestring,
47+
cborg >=0.2.9 && <0.3,
48+
containers,
49+
data-fix,
50+
formatting,
51+
primitive,
52+
recursion-schemes >=5.1 && <5.3,
53+
safe-exceptions,
54+
tagged,
55+
text,
56+
time,
57+
vector,
5558

5659
library testlib
57-
import: base, project-config
58-
visibility: public
59-
hs-source-dirs: testlib
60-
exposed-modules: Test.Cardano.Binary.TreeDiff
61-
build-depends: base
62-
, bytestring
63-
, base16-bytestring
64-
, cardano-binary
65-
, cborg
66-
, formatting
67-
, tree-diff
68-
60+
import: base, project-config
61+
visibility: public
62+
hs-source-dirs: testlib
63+
exposed-modules: Test.Cardano.Binary.TreeDiff
64+
build-depends:
65+
base,
66+
base16-bytestring,
67+
bytestring,
68+
cardano-binary,
69+
cborg,
70+
formatting,
71+
tree-diff,
6972

7073
test-suite test
71-
import: base, project-config
72-
hs-source-dirs: test
73-
main-is: test.hs
74-
type: exitcode-stdio-1.0
75-
76-
other-modules: Test.Cardano.Binary.SizeBounds
77-
Test.Cardano.Binary.Helpers
78-
Test.Cardano.Binary.Helpers.GoldenRoundTrip
79-
Test.Cardano.Binary.RoundTrip
80-
Test.Cardano.Binary.Serialization
81-
Test.Cardano.Binary.Failure
74+
import: base, project-config
75+
hs-source-dirs: test
76+
main-is: test.hs
77+
type: exitcode-stdio-1.0
78+
other-modules:
79+
Test.Cardano.Binary.Failure
80+
Test.Cardano.Binary.Helpers
81+
Test.Cardano.Binary.Helpers.GoldenRoundTrip
82+
Test.Cardano.Binary.RoundTrip
83+
Test.Cardano.Binary.Serialization
84+
Test.Cardano.Binary.SizeBounds
8285

83-
build-depends: base
84-
, bytestring
85-
, cardano-binary
86-
, cardano-prelude-test
87-
, cborg
88-
, containers
89-
, formatting
90-
, hedgehog
91-
, hspec
92-
, pretty-show
93-
, QuickCheck
94-
, quickcheck-instances
95-
, tagged
96-
, text
97-
, time
98-
, vector
86+
build-depends:
87+
QuickCheck,
88+
base,
89+
bytestring,
90+
cardano-binary,
91+
cardano-prelude-test,
92+
cborg,
93+
containers,
94+
formatting,
95+
hedgehog,
96+
hspec,
97+
pretty-show,
98+
quickcheck-instances,
99+
tagged,
100+
text,
101+
time,
102+
vector,
99103

100-
ghc-options: -threaded
101-
-rtsopts
104+
ghc-options:
105+
-threaded
106+
-rtsopts
Lines changed: 45 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,52 @@
11
cabal-version: 2.2
2+
name: cardano-binary-test
3+
version: 1.4.0.2
4+
synopsis: Test helpers from cardano-binary exposed to other packages
5+
description: Test helpers from cardano-binary exposed to other packages
6+
license: MIT
7+
license-file: LICENSE
8+
author: IOHK
9+
maintainer: [email protected]
10+
copyright: 2019-2021 IOHK
11+
category: Currency
12+
build-type: Simple
13+
extra-source-files: CHANGELOG.md
214

3-
name: cardano-binary-test
4-
version: 1.4.0.2
5-
synopsis: Test helpers from cardano-binary exposed to other packages
6-
description: Test helpers from cardano-binary exposed to other packages
7-
license: MIT
8-
license-file: LICENSE
9-
author: IOHK
10-
maintainer: [email protected]
11-
copyright: 2019-2021 IOHK
12-
category: Currency
13-
build-type: Simple
14-
extra-source-files: CHANGELOG.md
15-
16-
common base { build-depends: base >= 4.14 && < 5 }
15+
common base
16+
build-depends: base >=4.14 && <5
1717

1818
common project-config
19-
default-language: Haskell2010
20-
21-
ghc-options: -Wall
22-
-Wcompat
23-
-Wincomplete-record-updates
24-
-Wincomplete-uni-patterns
25-
-Wpartial-fields
26-
-Wredundant-constraints
27-
-Wunused-packages
19+
default-language: Haskell2010
20+
ghc-options:
21+
-Wall
22+
-Wcompat
23+
-Wincomplete-record-updates
24+
-Wincomplete-uni-patterns
25+
-Wpartial-fields
26+
-Wredundant-constraints
27+
-Wunused-packages
2828

2929
library
30-
import: base, project-config
31-
exposed-modules: Test.Cardano.Binary.Helpers
32-
Test.Cardano.Binary.Helpers.GoldenRoundTrip
33-
Test.Cardano.Binary.Serialization
34-
Test.Cardano.Binary.Failure
30+
import: base, project-config
31+
exposed-modules:
32+
Test.Cardano.Binary.Failure
33+
Test.Cardano.Binary.Helpers
34+
Test.Cardano.Binary.Helpers.GoldenRoundTrip
35+
Test.Cardano.Binary.Serialization
3536

36-
build-depends: base
37-
, bytestring
38-
, cardano-binary >= 1.6
39-
, cardano-prelude-test
40-
, cborg
41-
, containers
42-
, formatting
43-
, hedgehog
44-
, hspec
45-
, pretty-show
46-
, QuickCheck
47-
, quickcheck-instances
48-
, text
49-
, time
50-
, vector
37+
build-depends:
38+
QuickCheck,
39+
base,
40+
bytestring,
41+
cardano-binary >=1.6,
42+
cardano-prelude-test,
43+
cborg,
44+
containers,
45+
formatting,
46+
hedgehog,
47+
hspec,
48+
pretty-show,
49+
quickcheck-instances,
50+
text,
51+
time,
52+
vector,

0 commit comments

Comments
 (0)