Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 66 additions & 20 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.19.20250330
# version: 0.19.20260331
#
# REGENDATA ("0.19.20250330",["github","--config=cabal.haskell-ci","cabal.project"])
# REGENDATA ("0.19.20260331",["github","--config=cabal.haskell-ci","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -20,6 +20,11 @@ on:
pull_request:
branches:
- master
merge_group:
branches:
- master
workflow_dispatch:
{}
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand All @@ -32,14 +37,19 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.14.1
compilerKind: ghc
compilerVersion: 9.14.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.12.2
compilerKind: ghc
compilerVersion: 9.12.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.10.1
- compiler: ghc-9.10.3
compilerKind: ghc
compilerVersion: 9.10.1
compilerVersion: 9.10.3
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.8.4
Expand Down Expand Up @@ -95,8 +105,8 @@ jobs:
chmod a+x "$HOME/.ghcup/bin/ghcup"
- name: Install cabal-install
run: |
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.1-p1 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1-p1 -vnormal+nowrap" >> "$GITHUB_ENV"
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
- name: Install GHC (GHCup)
if: matrix.setup-method == 'ghcup'
run: |
Expand Down Expand Up @@ -174,14 +184,14 @@ jobs:
- name: install cabal-docspec
run: |
mkdir -p $HOME/.cabal/bin
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20240703/cabal-docspec-0.0.0.20240703-x86_64-linux.xz > cabal-docspec.xz
echo '48bf3b7fd2f7f0caa6162afee57a755be8523e7f467b694900eb420f5f9a7b76 cabal-docspec.xz' | sha256sum -c -
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20250606/cabal-docspec-0.0.0.20250606-x86_64-linux.xz > cabal-docspec.xz
echo 'cc20bb5c19501b42bde77556bc419c7c0a5c8d1eb65663024d8a4e4c868bef25 cabal-docspec.xz' | sha256sum -c -
xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec
rm -f cabal-docspec.xz
chmod a+x $HOME/.cabal/bin/cabal-docspec
cabal-docspec --version
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
path: source
- name: initial cabal.project for sdist
Expand Down Expand Up @@ -238,23 +248,59 @@ jobs:
echo "packages: ${PKGDIR_vec_optics}" >> cabal.project
echo "packages: ${PKGDIR_tests}" >> cabal.project
echo "package bin" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
echo "package fin" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
echo "package ral" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
echo "package vec" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
echo "package ral-lens" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
echo "package vec-lens" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
echo "package ral-optics" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
echo "package vec-optics" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
echo "package tests" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package bin" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package fin" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package ral" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package vec" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package ral-lens" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package vec-lens" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package ral-optics" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package vec-optics" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package tests" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package bin" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package fin" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package ral" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package vec" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package ral-lens" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package vec-lens" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package ral-optics" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package vec-optics" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package tests" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
cat >> cabal.project <<EOF
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(bin|fin|ral|ral-lens|ral-optics|tests|vec|vec-lens|vec-optics)$/; }' >> cabal.project.local
Expand Down Expand Up @@ -285,8 +331,8 @@ jobs:
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
- name: docspec
run: |
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all ; fi
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then cabal-docspec $ARG_COMPILER ; fi
if [ $((HCNUMVER >= 90600)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all ; fi
if [ $((HCNUMVER >= 90600)) -ne 0 ] ; then cabal-docspec $ARG_COMPILER ; fi
- name: cabal check
run: |
cd ${PKGDIR_bin} || false
Expand Down
13 changes: 6 additions & 7 deletions bin/bin.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cabal-version: 2.2
name: bin
version: 0.1.4
x-revision: 2
version: 0.1.4.1
synopsis: Bin: binary natural numbers.
category: Data, Dependent Types, Singletons, Math
description:
Expand Down Expand Up @@ -43,8 +42,9 @@ tested-with:
|| ==9.4.8
|| ==9.6.6
|| ==9.8.4
|| ==9.10.1
|| ==9.10.3
|| ==9.12.2
|| ==9.14.1

source-repository head
type: git
Expand All @@ -68,7 +68,7 @@ library

-- GHC boot libs
build-depends:
, base >=4.12.0.0 && <4.22
, base >=4.12.0.0 && <4.23
, deepseq >=1.4.4.0 && <1.6

-- siblings
Expand All @@ -77,10 +77,9 @@ library
-- other dependencies
build-depends:
, boring ^>=0.2.2
, dec ^>=0.0.6
, hashable ^>=1.4.4.0 || ^>=1.5.0.0
, QuickCheck ^>=2.14.2 || ^>=2.15
, some ^>=1.0.6
, QuickCheck ^>=2.14.2 || ^>=2.15 || ^>=2.18.0.0
, some ^>=1.0.6 || ^>=1.1

if impl(ghc >=9.0)
-- these flags may abort compilation with GHC-8.10
Expand Down
28 changes: 14 additions & 14 deletions bin/src/Data/Type/Bin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ type family ToGHC (b :: Bin) :: GHC.Nat where
--
-- >>> :kind! FromGHC 7
-- FromGHC 7 :: Bin
-- = 'BP ('B1 ('B1 'BE))
-- = BP (B1 (B1 BE))
--
type family FromGHC (n :: GHC.Nat) :: Bin where
FromGHC n = FromGHC' (GhcDivMod2 n)
Expand Down Expand Up @@ -251,7 +251,7 @@ type family GhcDivMod2' (p :: (GHC.Nat, Bool)) :: (GHC.Nat, Bool) where
--
-- >>> :kind! ToNat Bin5
-- ToNat Bin5 :: Nat
-- = 'S ('S ('S ('S ('S 'Z))))
-- = S (S (S (S (S Z))))
--
type family ToNat (b :: Bin) :: Nat where
ToNat 'BZ = 'Z
Expand All @@ -261,7 +261,7 @@ type family ToNat (b :: Bin) :: Nat where
--
-- >>> :kind! FromNat N.Nat5
-- FromNat N.Nat5 :: Bin
-- = 'BP ('B1 ('B0 'BE))
-- = BP (B1 (B0 BE))
--
type family FromNat (n :: Nat) :: Bin where
FromNat n = FromNat' (N.DivMod2 n)
Expand All @@ -280,11 +280,11 @@ type family FromNat' (p :: (Nat, Bool)) :: Bin where
--
-- >>> :kind! Mult2 Bin0 == Bin0
-- Mult2 Bin0 == Bin0 :: Bool
-- = 'True
-- = True
--
-- >>> :kind! Mult2 Bin3 == Bin6
-- Mult2 Bin3 == Bin6 :: Bool
-- = 'True
-- = True
--
type family Mult2 (b :: Bin) :: Bin where
Mult2 'BZ = 'BZ
Expand All @@ -294,11 +294,11 @@ type family Mult2 (b :: Bin) :: Bin where
--
-- >>> :kind! Mult2Plus1 Bin0
-- Mult2Plus1 Bin0 :: BinP
-- = 'BE
-- = BE
--
-- >>> :kind! Mult2Plus1 Bin4 == BinP9
-- Mult2Plus1 Bin4 == BinP9 :: Bool
-- = 'True
-- = True
--
type family Mult2Plus1 (b :: Bin) :: BinP where
Mult2Plus1 'BZ = 'BE
Expand All @@ -312,7 +312,7 @@ type family Mult2Plus1 (b :: Bin) :: BinP where
--
-- >>> :kind! Succ Bin5
-- Succ Bin5 :: Bin
-- = 'BP ('B0 ('B1 'BE))
-- = BP (B0 (B1 BE))
--
-- @
-- `Succ` :: 'Bin' -> 'Bin'
Expand Down Expand Up @@ -343,19 +343,19 @@ withSucc' _ k = BP.withSucc (Proxy :: Proxy b) k
--
-- >>> :kind! Pred BP.BinP1
-- Pred BP.BinP1 :: Bin
-- = 'BZ
-- = BZ
--
-- >>> :kind! Pred BP.BinP5 == Bin4
-- Pred BP.BinP5 == Bin4 :: Bool
-- = 'True
-- = True
--
-- >>> :kind! Pred BP.BinP8 == Bin7
-- Pred BP.BinP8 == Bin7 :: Bool
-- = 'True
-- = True
--
-- >>> :kind! Pred BP.BinP6 == Bin5
-- Pred BP.BinP6 == Bin5 :: Bool
-- = 'True
-- = True
--
type family Pred (b :: BinP) :: Bin where
Pred 'BE = 'BZ
Expand All @@ -375,11 +375,11 @@ type family Pred' (b :: BinP) :: BinP where
--
-- >>> :kind! Plus Bin3 Bin3 == Bin6
-- Plus Bin3 Bin3 == Bin6 :: Bool
-- = 'True
-- = True
--
-- >>> :kind! Mult2 Bin3 == Bin6
-- Mult2 Bin3 == Bin6 :: Bool
-- = 'True
-- = True
--
type family Plus (a :: Bin) (b :: Bin) :: Bin where
Plus 'BZ b = b
Expand Down
2 changes: 1 addition & 1 deletion cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
branches: master

-- GHC-9.6 doesn't print ticks
docspec: <9.6
docspec: >=9.6
haddock: True
haddock-components: libs

Expand Down
11 changes: 6 additions & 5 deletions fin/fin.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 2.2
name: fin
version: 0.3.2
x-revision: 1
x-revision: 2
synopsis: Nat and Fin: peano naturals and finite numbers
category: Data, Dependent Types, Singletons, Math
description:
Expand Down Expand Up @@ -65,8 +65,9 @@ tested-with:
|| ==9.4.8
|| ==9.6.6
|| ==9.8.4
|| ==9.10.1
|| ==9.10.3
|| ==9.12.2
|| ==9.14.1

source-repository head
type: git
Expand All @@ -89,16 +90,16 @@ library

-- GHC boot libs
build-depends:
, base >=4.12.0.0 && <4.22
, base >=4.12.0.0 && <4.23
, deepseq >=1.4.4.0 && <1.6

-- other dependencies
build-depends:
, boring ^>=0.2.2
, dec ^>=0.0.6
, hashable ^>=1.4.4.0 || ^>=1.5.0.0
, QuickCheck ^>=2.14.2 || ^>=2.15
, some ^>=1.0.6
, QuickCheck ^>=2.14.2 || ^>=2.15 || ^>=2.18.0.0
, some ^>=1.0.6 || ^>=1.1
, universe-base ^>=1.1.4

if impl(ghc >=9.0)
Expand Down
6 changes: 3 additions & 3 deletions fin/src/Data/Type/Nat.hs
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ type family ToGHC (n :: Nat) :: GHC.Nat where
--
-- >>> :kind! FromGHC 7
-- FromGHC 7 :: Nat
-- = 'S ('S ('S ('S ('S ('S ('S 'Z))))))
-- = S (S (S (S (S (S (S Z))))))
--
type family FromGHC (n :: GHC.Nat) :: Nat where
FromGHC 0 = 'Z
Expand Down Expand Up @@ -450,11 +450,11 @@ type family Mult2 (n :: Nat) :: Nat where
--
-- >>> :kind! DivMod2 Nat7 == '(Nat3, True)
-- DivMod2 Nat7 == '(Nat3, True) :: Bool
-- = 'True
-- = True
--
-- >>> :kind! DivMod2 Nat4 == '(Nat2, False)
-- DivMod2 Nat4 == '(Nat2, False) :: Bool
-- = 'True
-- = True
--
type family DivMod2 (n :: Nat) :: (Nat, Bool) where
DivMod2 'Z = '( 'Z, 'False)
Expand Down
Loading
Loading