packages feed

PyF 0.9.0.2 → 0.9.0.3

raw patch · 4 files changed

+30/−8 lines, 4 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- PyF.Formatters: [AlignCenter] :: AlignMode 'AlignAll
+ PyF.Formatters: [AlignCenter] :: AlignMode 'AlignAll
- PyF.Formatters: [AlignInside] :: AlignMode 'AlignNumber
+ PyF.Formatters: [AlignInside] :: AlignMode 'AlignNumber
- PyF.Formatters: [AlignLeft] :: AlignMode 'AlignAll
+ PyF.Formatters: [AlignLeft] :: AlignMode 'AlignAll
- PyF.Formatters: [AlignRight] :: AlignMode 'AlignAll
+ PyF.Formatters: [AlignRight] :: AlignMode 'AlignAll
- PyF.Formatters: [Alternate] :: Format 'CanAlt u f -> Format 'NoAlt u f
+ PyF.Formatters: [Alternate] :: Format 'CanAlt u f -> Format 'NoAlt u f
- PyF.Formatters: [Binary] :: Format 'CanAlt 'NoUpper 'Integral
+ PyF.Formatters: [Binary] :: Format 'CanAlt 'NoUpper 'Integral
- PyF.Formatters: [Character] :: Format 'NoAlt 'NoUpper 'Integral
+ PyF.Formatters: [Character] :: Format 'NoAlt 'NoUpper 'Integral
- PyF.Formatters: [Decimal] :: Format 'NoAlt 'NoUpper 'Integral
+ PyF.Formatters: [Decimal] :: Format 'NoAlt 'NoUpper 'Integral
- PyF.Formatters: [Exponent] :: Format 'CanAlt 'CanUpper 'Fractional
+ PyF.Formatters: [Exponent] :: Format 'CanAlt 'CanUpper 'Fractional
- PyF.Formatters: [Fixed] :: Format 'CanAlt 'CanUpper 'Fractional
+ PyF.Formatters: [Fixed] :: Format 'CanAlt 'CanUpper 'Fractional
- PyF.Formatters: [Generic] :: Format 'CanAlt 'CanUpper 'Fractional
+ PyF.Formatters: [Generic] :: Format 'CanAlt 'CanUpper 'Fractional
- PyF.Formatters: [Hexa] :: Format 'CanAlt 'CanUpper 'Integral
+ PyF.Formatters: [Hexa] :: Format 'CanAlt 'CanUpper 'Integral
- PyF.Formatters: [Octal] :: Format 'CanAlt 'NoUpper 'Integral
+ PyF.Formatters: [Octal] :: Format 'CanAlt 'NoUpper 'Integral
- PyF.Formatters: [Percent] :: Format 'CanAlt 'NoUpper 'Fractional
+ PyF.Formatters: [Percent] :: Format 'CanAlt 'NoUpper 'Fractional
- PyF.Formatters: [Upper] :: Format alt 'CanUpper f -> Format 'NoAlt 'NoUpper f
+ PyF.Formatters: [Upper] :: Format alt 'CanUpper f -> Format 'NoAlt 'NoUpper f
- PyF.Formatters: formatFractional :: RealFloat f => Format t t' 'Fractional -> SignMode -> Maybe (Int, AlignMode k, Char) -> Maybe (Int, Char) -> Maybe Int -> f -> String
+ PyF.Formatters: formatFractional :: RealFloat f => Format t t' 'Fractional -> SignMode -> Maybe (Int, AlignMode k, Char) -> Maybe (Int, Char) -> Maybe Int -> f -> String
- PyF.Formatters: formatIntegral :: (Show i, Integral i) => Format t t' 'Integral -> SignMode -> Maybe (Int, AlignMode k, Char) -> Maybe (Int, Char) -> i -> String
+ PyF.Formatters: formatIntegral :: (Show i, Integral i) => Format t t' 'Integral -> SignMode -> Maybe (Int, AlignMode k, Char) -> Maybe (Int, Char) -> i -> String
- PyF.Formatters: formatString :: Maybe (Int, AlignMode 'AlignAll, Char) -> Maybe Int -> String -> String
+ PyF.Formatters: formatString :: Maybe (Int, AlignMode 'AlignAll, Char) -> Maybe Int -> String -> String
- PyF.Formatters: getAlignForString :: AlignMode k -> Maybe (AlignMode 'AlignAll)
+ PyF.Formatters: getAlignForString :: AlignMode k -> Maybe (AlignMode 'AlignAll)

Files

ChangeLog.md view
@@ -1,5 +1,10 @@ # Revision history for PyF +## 0.9.0.3 -- 2021-02-06++- Test phase do not depend anymore on python (unless cabal flag `python_test` is+  set). This ease the deployment / packaging process.+ ## 0.9.0.2 -- 2020-09-11  - Version bump for megaparsec 9.0
PyF.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.4 name:                PyF-version:             0.9.0.2+version:             0.9.0.3 synopsis: Quasiquotations for a python like interpolated string formater description: Quasiquotations for a python like interpolated string formater. license:             BSD-3-Clause@@ -11,6 +11,11 @@ build-type:          Simple extra-source-files:  ChangeLog.md Readme.md test/failureCases/*.hs test/golden/*.golden +Flag python_test+    Description: Enable extensive python testing+    Manual: True+    Default: False+ library   exposed-modules:                   PyF@@ -42,9 +47,12 @@   hs-source-dirs:      test   main-is:             Spec.hs   other-modules: SpecUtils SpecCustomDelimiters-  build-depends:       base, PyF, hspec, text, template-haskell, process+  build-depends:       base, PyF, hspec, text, template-haskell   ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N   default-language:    Haskell2010+  if flag(python_test)+    cpp-options: -DPYTHON_TEST+    build-depends:       process  test-suite pyf-overloaded   type:                exitcode-stdio-1.0
Readme.md view
@@ -314,6 +314,11 @@ "+~~~~~~~~~~1111,1111" ``` +# GHC compatibility++This library is tested with ghc 8.6, 8.8, 8.10 and 9.0.+ # Conclusion  Don't hesitate to make any suggestion, I'll be more than happy to work on it.+
test/SpecUtils.hs view
@@ -1,21 +1,24 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-}  module SpecUtils   ( checkExample,     checkExampleDiff,-    check,   ) where  import Language.Haskell.TH-import Language.Haskell.TH.Syntax import PyF.Internal.QQ+#ifdef PYTHON_TEST+import Language.Haskell.TH.Syntax import System.Exit import System.Process+#endif import Test.Hspec  -- * Utils +#ifdef PYTHON_TEST -- | Runs a python formatter example -- -- For conveniance, it exports a few python symbols, `inf`, `nan` and pi.@@ -59,13 +62,14 @@ --     the same as the one provided by python. checkExample :: String -> String -> Q Exp checkExample s res = pyCheck s (Just res)+#else+-- | Alias for checkExampleDiff+checkExample :: String -> String -> Q Exp+checkExample = checkExampleDiff+#endif  -- | `checkExampleDiff formatString result` checks if, once formated, --     `formatString` is equal to result. It does not check the result --     against the python implementation checkExampleDiff :: String -> String -> Q Exp checkExampleDiff s res = [|$(toExpPython s) `shouldBe` res|]---- | `check formatString` checks only with the python implementation-check :: String -> Q Exp-check s = pyCheck s Nothing