Skip to content

Commit

Permalink
Add support for GHC 9.10. (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles authored May 20, 2024
2 parents 7529d5e + 4527f06 commit 5a42857
Show file tree
Hide file tree
Showing 9 changed files with 274 additions and 156 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- '9.4'
- '9.6'
- '9.8'
- '9.10'
exclude:
# TODO: https://github.com/IntersectMBO/bech32/issues/72
# To work around the above issue, we exclude the following versions:
Expand Down Expand Up @@ -115,7 +116,7 @@ jobs:
if: |
github.ref == 'refs/heads/main'
&& matrix.os == 'ubuntu-latest'
&& matrix.ghc == '9.8'
&& matrix.ghc == '9.10'
run: >
mv ${{ env.cabal-build-dir }}/build/*/*/*/doc/html/* gh-pages
Expand All @@ -125,7 +126,7 @@ jobs:
if: |
github.ref == 'refs/heads/main'
&& matrix.os == 'ubuntu-latest'
&& matrix.ghc == '9.8'
&& matrix.ghc == '9.10'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
Expand Down
4 changes: 4 additions & 0 deletions bech32-th/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ChangeLog for `bech32-th`

## [1.1.7] - 2024-05-20

- Added support for GHC 9.10 series.

## [1.1.6] - 2024-04-24

### Changed
Expand Down
8 changes: 4 additions & 4 deletions bech32-th/bech32-th.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 3.0
name: bech32-th
version: 1.1.6
version: 1.1.7
synopsis: Template Haskell extensions to the Bech32 library.
description: Template Haskell extensions to the Bech32 library, including
quasi-quoters for compile-time checking of Bech32 string
Expand Down Expand Up @@ -28,13 +28,13 @@ flag release
manual: True

common dependency-base
build-depends:base >= 4.14.3.0 && < 4.20
build-depends:base >= 4.14.3.0 && < 4.21
common dependency-bech32
build-depends:bech32 >= 1.1.5 && < 1.2
build-depends:bech32 >= 1.1.7 && < 1.2
common dependency-hspec
build-depends:hspec >= 2.11.7 && < 2.12
common dependency-template-haskell
build-depends:template-haskell >= 2.16.0.0 && < 2.22
build-depends:template-haskell >= 2.16.0.0 && < 2.23
common dependency-text
build-depends:text >= 1.2.4.1 && < 2.2

Expand Down
4 changes: 4 additions & 0 deletions bech32/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

<!-- This ChangeLog follows a format specified by: https://keepachangelog.com/en/1.0.0/ -->

## [1.1.7] - 2024-05-20

- Added support for GHC 9.10 series.

## [1.1.6] - 2024-04-24

### Changed
Expand Down
4 changes: 2 additions & 2 deletions bech32/bech32.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 3.0
name: bech32
version: 1.1.6
version: 1.1.7
synopsis: Implementation of the Bech32 cryptocurrency address format (BIP 0173).
description: Implementation of the Bech32 cryptocurrency address format documented in the
BIP (Bitcoin Improvement Proposal) 0173.
Expand Down Expand Up @@ -34,7 +34,7 @@ flag static
common dependency-array
build-depends:array >= 0.5.4.0 && < 0.6
common dependency-base
build-depends:base >= 4.14.3.0 && < 4.20
build-depends:base >= 4.14.3.0 && < 4.21
common dependency-base58-bytestring
build-depends:base58-bytestring >= 0.1.0 && < 0.2
common dependency-bytestring
Expand Down
49 changes: 41 additions & 8 deletions bech32/src/Codec/Binary/Bech32/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,40 +72,73 @@ module Codec.Binary.Bech32.Internal

) where

import Prelude

import Control.Applicative
( Applicative (pure) )
import Control.Exception
( Exception )
import Control.Monad
( guard, join )
( guard, join, mapM, return, (=<<) )
import Data.Array
( Array )
import Data.Bifunctor
( first )
import Data.Bits
( Bits, testBit, unsafeShiftL, unsafeShiftR, xor, (.&.), (.|.) )
import Data.Bool
( Bool, not, otherwise, (&&), (||) )
import Data.ByteString
( ByteString )
import Data.Char
( chr, ord, toLower, toUpper )
( Char, chr, ord, toLower, toUpper )
import Data.Either
( Either (Left, Right) )
import Data.Either.Extra
( maybeToEither )
import Data.Eq
( Eq ((/=), (==)) )
import Data.Foldable
( foldl' )
( Foldable (length, null), foldl' )
import Data.Function
( ($), (.) )
import Data.Functor
( Functor (fmap), (<$>) )
import Data.Functor.Identity
( Identity, runIdentity )
import Data.Int
( Int )
import Data.Ix
( Ix (..) )
import Data.List
( sort )
( concat, filter, map, reverse, sort, take, zip, (++) )
import Data.Map.Strict
( Map )
import Data.Maybe
( isNothing, mapMaybe )
( Maybe (Just, Nothing), isNothing, mapMaybe )
import Data.Monoid
( Monoid )
import Data.Ord
( Ord (..) )
import Data.Semigroup
( Semigroup ((<>)) )
import Data.String
( String )
import Data.Text
( Text )
import Data.Traversable
( Traversable (traverse) )
import Data.Tuple
( fst, snd )
import Data.Word
( Word8 )
( Word, Word8 )
import Prelude
( Bounded (maxBound, minBound)
, Enum (fromEnum, toEnum)
, Integral (mod, rem)
, Num (..)
, fromIntegral
)
import Text.Show
( Show )

import qualified Data.Array as Arr
import qualified Data.ByteString as BS
Expand Down
Loading

0 comments on commit 5a42857

Please sign in to comment.