packages feed

scientific-notation 0.1.0.0 → 0.1.0.1

raw patch · 3 files changed

+17/−17 lines, 3 filesdep ~bytesmithPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: bytesmith

API changes (from Hackage documentation)

Files

scientific-notation.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: scientific-notation-version: 0.1.0.0+version: 0.1.0.1 synopsis: Scientific notation intended for tokenization description:   This library provides a type used to represent a number in@@ -49,7 +49,7 @@   exposed-modules: Data.Number.Scientific   build-depends:     , base >=4.12 && <5-    , bytesmith >=0.2.0.1 && <0.3+    , bytesmith >=0.3 && <0.4   hs-source-dirs: src   default-language: Haskell2010 
src/Data/Number/Scientific.hs view
@@ -39,7 +39,7 @@ import GHC.Exts (Int#,Word#,Int(I#),(+#)) import GHC.Word (Word(W#),Word8(W8#),Word16(W16#),Word32(W32#),Word64(W64#)) import GHC.Int (Int64(I64#),Int32(I32#))-import Data.Bytes.Parser (Parser(..))+import Data.Bytes.Parser.Unsafe (Parser(..)) import Data.Fixed (Fixed(MkFixed),HasResolution)  import qualified Data.Fixed as Fixed
test/Main.hs view
@@ -131,29 +131,29 @@   , testGroup "Parser"     [ testGroup "UTF-8-signed"       [ testProperty "small-integer" $ \i ->-          P.Success (small i 0) 0+          let str = show i in+          P.Success (P.Slice (length str + 1) 0 (small i 0))           ===-          P.parseBytes (SCI.parserSignedUtf8Bytes ())-            (bytes (show i))+          P.parseBytes (SCI.parserSignedUtf8Bytes ()) (bytes str)       , testProperty "small-exp" $ \i j b ->-          P.Success (small i j) 0+          let str = show i ++ bool "e" "E" b ++ show j in+          P.Success (P.Slice (length str + 1) 0 (small i j))           ===-          P.parseBytes (SCI.parserSignedUtf8Bytes ())-            (bytes (show i ++ bool "e" "E" b ++ show j))+          P.parseBytes (SCI.parserSignedUtf8Bytes ()) (bytes str)       , testProperty "fixed-e12-no-exp" $ \(i :: Fixed E12) ->-          QC.counterexample (show i)+          let str = show i in+          QC.counterexample str           $-          P.Success (SCI.fromFixed i) 0+          P.Success (P.Slice (length str + 1) 0 (SCI.fromFixed i))           ===-          P.parseBytes (SCI.parserSignedUtf8Bytes ())-            (bytes (show i))+          P.parseBytes (SCI.parserSignedUtf8Bytes ()) (bytes str)       , testProperty "large-integer" $ \(LargeInteger i) (LargeInteger j) ->-          QC.counterexample (show (large i j))+          let str = show (large i j) in+          QC.counterexample str           $-          P.Success (large i j) 0+          P.Success (P.Slice (length str + 1) 0 (large i j))           ===-          P.parseBytes (SCI.parserSignedUtf8Bytes ())-            (bytes (show (large i j)))+          P.parseBytes (SCI.parserSignedUtf8Bytes ()) (bytes str)       ]     ]   ]