PyF 0.8.1.2 → 0.9.0.0
raw patch · 5 files changed
+8/−5 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ PyF.Class: instance GHC.Show.Show t => PyF.Class.PyFToString t
Files
- ChangeLog.md +4/−0
- PyF.cabal +1/−1
- Readme.md +1/−1
- src/PyF/Class.hs +2/−0
- test/SpecFail.hs +0/−3
ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for PyF +## 0.9.0.0 -- 2019-12-29++- Any type with `Show` instance can be formatted using `:s` formatter. For example, `[fmt|hello {(True, 10):s}|]`. This breaks compatibility because previous version of PyF was generating an error when try to format to string anything which was not a string, now it accepts roughly anything (with a `Show` instance).+ ## 0.8.1.2 -- 2019-11-08 - Bump megaparsec bounds
PyF.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: PyF-version: 0.8.1.2+version: 0.9.0.0 synopsis: Quasiquotations for a python like interpolated string formater description: Quasiquotations for a python like interpolated string formater. license: BSD-3-Clause
Readme.md view
@@ -25,7 +25,7 @@ - Sign handling, to display or not the `+` for positive number - Number grouping - Floating point representation-- The interpolated value can be any Haskell expression+- The interpolated value can be any Haskell expression. You will need the extension `QuasiQuotes`, enable it with `{-# LANGUAGE QuasiQuotes #-}` in top of your source file or with `:set -XQuasiQuotes` in your `ghci` session. `ExtendedDefaultRules` and `OverloadedStrings` may be more convenient.
src/PyF/Class.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DefaultSignatures #-}+{-# LANGUAGE UndecidableInstances #-} module PyF.Class where import Data.Int@@ -56,3 +57,4 @@ instance PyFToString String where pyfToString = id instance PyFToString LText.Text where pyfToString = LText.unpack instance PyFToString SText.Text where pyfToString = SText.unpack+instance {-# OVERLAPPABLE #-} Show t => PyFToString t where pyfToString = show
test/SpecFail.hs view
@@ -170,7 +170,6 @@ failCompile "{truncate' number:e}" failCompile "{truncate' number:E}" failCompile "{truncate' number:%}"- failCompile "{truncate number:s}" describe "number with precision" $ do failCompile "{truncate number:.3d}"@@ -184,7 +183,6 @@ failCompile "{number:x}" failCompile "{number:X}" failCompile "{number:d}"- failCompile "{number:s}" -- XXX: this are not failing for now, it should be fixed xdescribe "not specified" $ do@@ -221,7 +219,6 @@ ] describe "Wrong type" $ do- failCompile "{True:s}" failCompile "{True}" failCompile "{True:f}" failCompile "{True:d}"