Skip to content

Commit f21dfef

Browse files
committed
chore: ignore cabal file
1 parent afbba06 commit f21dfef

File tree

7 files changed

+27
-89
lines changed

7 files changed

+27
-89
lines changed

.github/workflows/conventional-commits.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
---
2-
name: Conventional commits
3-
2+
name: conventional-commits
43
on:
54
pull_request:
6-
branches:
7-
- main
5+
branches: [main]
86

97
jobs:
108
build:

.github/workflows/semantic-release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
2-
name: Semantic release
2+
name: semantic-release
33
on:
4-
push:
5-
branches:
6-
- main
4+
workflow_run:
5+
workflows: [stack-build]
6+
types: [completed]
7+
branches: [main]
78

89
jobs:
910
build:

.github/workflows/cabal-build.yml renamed to .github/workflows/stack-build.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: cabal-build
2+
name: stack-build
33
on:
44
push:
55
branches: main
@@ -11,7 +11,7 @@ permissions:
1111

1212
jobs:
1313
build:
14-
name: ${{ matrix.os }} / ghc ${{ matrix.ghc-version }}
14+
name: ghc-${{ matrix.ghc-version }} / ${{ matrix.os }}
1515
runs-on: ${{ matrix.os }}-latest
1616
strategy:
1717
fail-fast: false
@@ -40,11 +40,14 @@ jobs:
4040
# Defaults, added for clarity:
4141
cabal-version: latest
4242
cabal-update: true
43+
enable-stack: true
44+
stack-setup-ghc: true
45+
stack-no-global: true
4346

4447
- name: Configure the build
4548
run: |
46-
cabal configure --enable-tests --enable-benchmarks --disable-documentation
47-
cabal build --dry-run
49+
stack config env
50+
stack build --dry-run
4851
# The last step generates dist-newstyle/cache/plan.json for the cache key.
4952
5053
- name: Restore cached dependencies
@@ -54,32 +57,32 @@ jobs:
5457
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}
5558

5659
with:
57-
path: ${{ steps.setup.outputs.cabal-store }}
60+
path: ${{ steps.setup.outputs.stack-root }}
5861
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}
5962
restore-keys: ${{ env.key }}-
6063

6164
- name: Install dependencies
62-
run: cabal build all --only-dependencies
65+
run: stack build --only-dependencies
6366

6467
# Cache dependencies already here, so that we do not have to rebuild them should the subsequent steps fail.
6568
- name: Save cached dependencies
6669
uses: actions/cache/save@v3
6770
# Caches are immutable, trying to save with the same key would error.
6871
if: ${{ steps.cache.outputs.cache-primary-key != steps.cache.outputs.cache-matched-key }}
6972
with:
70-
path: ${{ steps.setup.outputs.cabal-store }}
73+
path: ${{ steps.setup.outputs.stack-root }}
7174
key: ${{ steps.cache.outputs.cache-primary-key }}
7275

7376
- name: Build
74-
run: cabal build all
77+
run: stack build
7578

7679
- name: Run tests
77-
run: cabal test all
80+
run: stack test
7881

7982
- name: Check cabal file
80-
run: cabal check
83+
run: stack check
8184
continue-on-error: true
8285

8386
- name: Build documentation
84-
run: cabal haddock all
87+
run: stack haddock
8588
...

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
megaparsec-utils.cabal
12
.stack-work/
23
*~
34
dist-newstyle/

megaparsec-utils.cabal

Lines changed: 0 additions & 68 deletions
This file was deleted.

package.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: megaparsec-utils
23
version: 0.0.0.0-dev
34
license: GPL-3
@@ -51,7 +52,9 @@ tests:
5152
- -threaded
5253
- -rtsopts
5354
- -with-rtsopts=-N
55+
5456
dependencies:
5557
- megaparsec-utils
5658
- hspec
5759
- QuickCheck
60+
...

test/Text/Megaparsec/UtilsSpec.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ spec = do
158158

159159
context "posDecNumParser" $ do
160160
it "no decimals" . property $ \v ->
161-
parseMaybe' posDecNumParser (show (abs (v :: Int)))
162-
`shouldBe` Just (fromIntegral (abs v))
161+
parseMaybe' (posDecNumParser @Void @Int) (show (abs (v :: Int)))
162+
`shouldBe` Just (abs v)
163163

164164
it "decimals" . property $ \v ->
165165
parseMaybe' posDecNumParser (printf "%f" (abs (v :: Double)))

0 commit comments

Comments
 (0)