File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ import Foreign.C.Types
3333--------------------------------------------------------------------------------
3434
3535newtype UnalignedSize a = UnalignedSize { getUnalignedSize :: Int } deriving (Show , Eq , Ord )
36+ deriving newtype Num
3637
3738-- | Primitive types which can be unaligned accessed
3839--
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ import Data.Word
88import Data.Int
99import GHC.Float
1010import Text.Printf (printf )
11- import Data.Word8 (toLower , toUpper )
11+ import Data.Char (toLower )
12+ import Z.Data.ASCII (w2c , c2w )
1213import qualified Z.Data.Parser.Base as P
1314import qualified Z.Data.Text as T
1415import qualified Z.Data.Vector.Base as V
@@ -98,7 +99,7 @@ spec = describe "parsers" . modifyMaxSuccess (*10) . modifyMaxSize (*10) $ do
9899 parse'' (P. bytesCI . V. pack $ t) (t ++ s) === Just (V. pack s, () )
99100
100101 prop " bytesCI" $ \ s t ->
101- parse'' (P. bytesCI . V. pack $ t) (L. map toLower t ++ s) === Just (V. pack s, () )
102+ parse'' (P. bytesCI . V. pack $ t) (L. map (c2w . toLower . w2c) t ++ s) === Just (V. pack s, () )
102103
103104 prop " atEnd" $ \ s ->
104105 parse' P. atEnd s ===
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import Data.Word
88import Data.Int
99import GHC.Float
1010import Text.Printf (printf )
11- import Data.Word8 (toLower , toUpper )
1211import qualified Z.Data.Parser.Numeric as P
1312import qualified Z.Data.Parser.Base as P
1413import qualified Z.Data.Builder.Numeric as B
You can’t perform that action at this time.
0 commit comments