Skip to content

Commit a3f37a4

Browse files
authored
Merge pull request #21 from adetokunbo/remove-dep-ascii-superset
Drop the dependency used in the tests on ascii-superset
2 parents 609975e + 15ebdb5 commit a3f37a4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

redis-glob.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ test-suite test
5353
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -fwarn-tabs
5454
build-depends:
5555
, ascii-char
56-
, ascii-superset
5756
, base
5857
, bytestring
5958
, hspec >=2.1

test/Redis/GlobSpec.hs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ SPDX-License-Identifier: BSD3
1111
module Redis.GlobSpec (spec, genWithOkPatterns) where
1212

1313
import qualified ASCII.Char as A
14-
import qualified ASCII.Superset as A
1514
import qualified Data.ByteString.Lazy as BL
1615
import Data.Word (Word8)
1716
import Redis.Glob
@@ -164,7 +163,7 @@ genPrintable = chooseEnum (32, 127)
164163

165164

166165
genInnerChar :: Gen Word8
167-
genInnerChar = genPrintable `suchThat` (/= A.fromChar A.RightSquareBracket)
166+
genInnerChar = genPrintable `suchThat` (/= fromChar' A.RightSquareBracket)
168167

169168

170169
genSimpleChar :: Gen Word8
@@ -183,4 +182,8 @@ notSimpleChars =
183182

184183

185184
avoidElem :: [A.Char] -> Gen Word8 -> Gen Word8
186-
avoidElem xs = (`suchThat` (\x -> x `notElem` map A.fromChar xs))
185+
avoidElem xs = (`suchThat` (\x -> x `notElem` map fromChar' xs))
186+
187+
188+
fromChar' :: A.Char -> Word8
189+
fromChar' = fromIntegral . A.toInt

0 commit comments

Comments
 (0)