text-show 3.7.2 → 3.7.3
raw patch · 28 files changed
+116/−82 lines, 28 filesdep +base-compat-batteriesdep −base-compatdep ~base-orphans
Dependencies added: base-compat-batteries
Dependencies removed: base-compat
Dependency ranges changed: base-orphans
Files
- CHANGELOG.md +4/−0
- src/TextShow/Classes.hs +4/−2
- src/TextShow/Control/Concurrent.hs +3/−1
- src/TextShow/Control/Exception.hs +8/−1
- src/TextShow/Data/Array.hs +0/−1
- src/TextShow/Data/Char.hs +0/−1
- src/TextShow/Data/Dynamic.hs +1/−1
- src/TextShow/Data/Fixed.hs +0/−1
- src/TextShow/Data/Floating.hs +3/−1
- src/TextShow/Data/Integral.hs +0/−1
- src/TextShow/Data/OldTypeable.hs +3/−1
- src/TextShow/Data/Ratio.hs +3/−2
- src/TextShow/Data/Text.hs +3/−1
- src/TextShow/Data/Typeable.hs +3/−2
- src/TextShow/Data/Typeable/Utils.hs +0/−1
- src/TextShow/Data/Version.hs +0/−1
- src/TextShow/Foreign/Ptr.hs +0/−1
- src/TextShow/GHC/Event.hs +0/−1
- src/TextShow/GHC/Fingerprint.hs +3/−1
- src/TextShow/GHC/TypeLits.hs +2/−1
- src/TextShow/Generic.hs +0/−1
- src/TextShow/System/IO.hs +3/−1
- src/TextShow/TH/Internal.hs +0/−1
- src/TextShow/Utils.hs +0/−1
- tests/Instances/Control/Exception.hs +10/−0
- tests/Spec/Control/ExceptionSpec.hs +7/−0
- tests/Spec/Data/OldTypeableSpec.hs +1/−1
- text-show.cabal +55/−55
CHANGELOG.md view
@@ -1,3 +1,7 @@+### 3.7.3 [2018.04.07]+* Use `base-compat-batteries`.+* Add a `TextShow FixIOException` instance on `base-4.11` or later.+ ### 3.7.2 [2018.03.08] * Depend on `quickcheck-instances-0.3.18` or later.
src/TextShow/Classes.hs view
@@ -20,7 +20,6 @@ #if __GLASGOW_HASKELL__ >= 708 import Data.Data (Typeable) #endif-import Data.Monoid.Compat ((<>)) import qualified Data.Text as TS (Text, singleton) import qualified Data.Text.IO as TS (putStrLn, hPutStrLn) import qualified Data.Text.Lazy as TL (Text, singleton)@@ -31,6 +30,9 @@ import GHC.Show (appPrec, appPrec1) +import Prelude ()+import Prelude.Compat+ import System.IO (Handle) import TextShow.Utils (toString, toText)@@ -46,7 +48,7 @@ -- to combine 'Builder's when creating 'TextShow' instances. As an example: -- -- @--- import Data.Monoid+-- import Data.Semigroup -- import TextShow -- -- data Example = Example Int Int
src/TextShow/Control/Concurrent.hs view
@@ -17,7 +17,6 @@ -} module TextShow.Control.Concurrent () where -import Data.Monoid.Compat ((<>)) import Data.Text.Lazy.Builder (fromString) import Foreign.C.Types@@ -25,6 +24,9 @@ import GHC.Conc (BlockReason, ThreadStatus) import GHC.Conc.Sync (ThreadId(..)) import GHC.Prim++import Prelude ()+import Prelude.Compat import TextShow.Classes (TextShow(..)) import TextShow.Foreign.C.Types ()
src/TextShow/Control/Exception.hs view
@@ -18,7 +18,6 @@ import Control.Exception.Base -import Data.Monoid.Compat ((<>)) import Data.Text.Lazy.Builder (fromString) #if MIN_VERSION_base(4,9,0) import Data.Text.Lazy.Builder (singleton)@@ -130,6 +129,14 @@ -- /Since: 3.6/ instance TextShow CompactionFailed where showb (CompactionFailed why) = fromString ("compaction failed: " <> why)+#endif++#if MIN_VERSION_base(4,11,0)+-- | Only available with @base-4.11.0.0@ or later.+--+-- /Since: 3.7.3/+instance TextShow FixIOException where+ showbPrec _ FixIOException = fromString "cyclic evaluation in fixIO" #endif -- | /Since: 2/
src/TextShow/Data/Array.hs view
@@ -22,7 +22,6 @@ import Data.Array.Base (IArray) import Data.Array.Unboxed (UArray) import Data.Ix (Ix)-import Data.Monoid.Compat ((<>)) import Data.Text.Lazy.Builder (Builder) import GHC.Show (appPrec)
src/TextShow/Data/Char.hs view
@@ -24,7 +24,6 @@ import Data.Array (Array, (!), listArray) import Data.Char (GeneralCategory, isDigit, ord)-import Data.Monoid.Compat ((<>)) import Data.Text.Lazy.Builder (Builder, singleton) import Prelude ()
src/TextShow/Data/Dynamic.hs view
@@ -15,9 +15,9 @@ module TextShow.Data.Dynamic () where import Data.Dynamic (Dynamic, dynTypeRep)-import Data.Monoid.Compat ((<>)) import Prelude ()+import Prelude.Compat import TextShow.Classes (TextShow(..)) import TextShow.Data.Typeable ()
src/TextShow/Data/Fixed.hs view
@@ -25,7 +25,6 @@ #if MIN_VERSION_base(4,7,0) import Data.Fixed (Fixed(..)) import Data.Int (Int64)-import Data.Monoid.Compat ((<>)) import Data.Semigroup (mtimesDefault) import Data.Text.Lazy.Builder (singleton)
src/TextShow/Data/Floating.hs view
@@ -29,11 +29,13 @@ import Data.Array.Base (unsafeAt) import Data.Array.IArray (Array, array)-import Data.Monoid.Compat ((<>)) import qualified Data.Text as T (replicate) import Data.Text.Lazy.Builder (Builder, fromString, fromText, singleton) import Data.Text.Lazy.Builder.Int (decimal) import Data.Text.Lazy.Builder.RealFloat (FPFormat(..))++import Prelude ()+import Prelude.Compat import TextShow.Classes (TextShow(..), showbParen) import TextShow.TH.Internal (deriveTextShow)
src/TextShow/Data/Integral.hs view
@@ -24,7 +24,6 @@ import Data.Char (intToDigit) import Data.Int (Int8, Int16, Int32, Int64)-import Data.Monoid.Compat ((<>)) import Data.Text.Lazy.Builder (Builder, singleton) import Data.Text.Lazy.Builder.Int (decimal) import Data.Word (Word8, Word16, Word32, Word64)
src/TextShow/Data/OldTypeable.hs view
@@ -20,10 +20,12 @@ module TextShow.Data.OldTypeable () where #if MIN_VERSION_base(4,7,0) && !(MIN_VERSION_base(4,8,0))-import Data.Monoid.Compat ((<>)) import Data.OldTypeable.Internal (TyCon(TyCon, tyConName), TypeRep(..), funTc, listTc) import Data.Text.Lazy.Builder (fromString, singleton)++import Prelude ()+import Prelude.Compat import TextShow.Classes (TextShow(..), showbParen, showbSpace) import TextShow.Data.Typeable.Utils (showbArgs, showbTuple)
src/TextShow/Data/Ratio.hs view
@@ -15,9 +15,10 @@ -} module TextShow.Data.Ratio () where -import Data.Monoid.Compat ((<>))- import GHC.Real (Ratio(..), ratioPrec, ratioPrec1)++import Prelude ()+import Prelude.Compat import TextShow.Classes (TextShow(..), TextShow1(..), showbParen) import TextShow.Data.Integral ()
src/TextShow/Data/Text.hs view
@@ -19,12 +19,14 @@ -} module TextShow.Data.Text () where -import Data.Monoid.Compat ((<>)) import qualified Data.Text as TS import Data.Text.Encoding.Error (UnicodeException(..)) import Data.Text.Foreign (I16) import qualified Data.Text.Lazy as TL import Data.Text.Lazy.Builder (Builder, fromString, toLazyText)++import Prelude ()+import Prelude.Compat import TextShow.Classes (TextShow(..)) import TextShow.Data.Char (showbString)
src/TextShow/Data/Typeable.hs view
@@ -29,8 +29,10 @@ -} module TextShow.Data.Typeable () where +import Prelude ()+import Prelude.Compat+ #if MIN_VERSION_base(4,10,0)-import Data.Monoid.Compat ((<>)) import Data.Kind (Type) import Data.Text.Lazy.Builder (Builder, fromString, singleton) import Data.Type.Equality ((:~~:)(..))@@ -47,7 +49,6 @@ SomeTypeRep(..), TypeRep, eqTypeRep, tyConName, typeRep, typeRepTyCon) #else /* !(MIN_VERSION_base(4,10,0) */-import Data.Monoid.Compat ((<>)) import Data.Text.Lazy.Builder (fromString, singleton) import Data.Typeable (TypeRep, typeRepArgs, typeRepTyCon) import Data.Typeable.Internal (tyConName)
src/TextShow/Data/Typeable/Utils.hs view
@@ -10,7 +10,6 @@ -} module TextShow.Data.Typeable.Utils (showbArgs, showbTuple) where -import Data.Monoid.Compat ((<>)) import Data.Text.Lazy.Builder (Builder, singleton) import Prelude ()
src/TextShow/Data/Version.hs view
@@ -15,7 +15,6 @@ module TextShow.Data.Version (showbVersion) where import Data.List (intersperse)-import Data.Monoid.Compat ((<>)) import Data.Text.Lazy.Builder (Builder, fromString, singleton) import Data.Version (Version(..))
src/TextShow/Foreign/Ptr.hs view
@@ -16,7 +16,6 @@ -} module TextShow.Foreign.Ptr () where -import Data.Monoid.Compat ((<>)) import Data.Semigroup (mtimesDefault) import Data.Text.Lazy.Builder (Builder, singleton)
src/TextShow/GHC/Event.hs view
@@ -23,7 +23,6 @@ #if !defined(__GHCJS__) && !defined(mingw32_HOST_OS) import Data.List (intersperse) import Data.Maybe (catMaybes)-import Data.Monoid.Compat ((<>)) import Data.Text.Lazy.Builder (Builder, singleton) import GHC.Event (Event, evtRead, evtWrite)
src/TextShow/GHC/Fingerprint.hs view
@@ -14,12 +14,14 @@ -} module TextShow.GHC.Fingerprint () where -import Data.Monoid.Compat ((<>)) import Data.Semigroup (mtimesDefault) import Data.Text.Lazy.Builder (Builder, singleton) import Data.Word (Word64) import GHC.Fingerprint.Type (Fingerprint(..))++import Prelude ()+import Prelude.Compat import TextShow.Classes (TextShow(..)) import TextShow.Data.Integral (showbHex)
src/TextShow/GHC/TypeLits.hs view
@@ -28,6 +28,8 @@ module TextShow.GHC.TypeLits () where #if MIN_VERSION_base(4,6,0)+import Prelude ()+import Prelude.Compat import TextShow.Classes (TextShow(..)) import TextShow.Data.Integral ()@@ -36,7 +38,6 @@ import GHC.TypeLits (SomeNat(..), SomeSymbol(..), natVal, symbolVal) import TextShow.Data.Char () # else-import Data.Monoid.Compat ((<>)) import Data.Text.Lazy.Builder (singleton) import GHC.TypeLits (IsEven(..), IsZero(..), Kind, Sing, SingE(fromSing)) # endif
src/TextShow/Generic.hs view
@@ -89,7 +89,6 @@ import Data.Data (Data, Typeable) import Data.Functor.Contravariant (Contravariant(..))-import Data.Monoid.Compat ((<>)) import qualified Data.Text as TS (Text, pack, singleton) import qualified Data.Text.IO as TS (putStrLn, hPutStrLn) import qualified Data.Text.Lazy as TL (Text, pack, singleton)
src/TextShow/System/IO.hs view
@@ -15,13 +15,15 @@ -} module TextShow.System.IO () where -import Data.Monoid.Compat ((<>)) import Data.Text.Lazy.Builder (Builder, fromString, singleton) import GHC.IO.Encoding.Failure (CodingFailureMode) import GHC.IO.Encoding.Types (CodingProgress, TextEncoding(textEncodingName)) import GHC.IO.Handle (HandlePosn(..)) import GHC.IO.Handle.Types (Handle(..))++import Prelude ()+import Prelude.Compat import System.IO (BufferMode, IOMode, Newline, NewlineMode, SeekMode)
src/TextShow/TH/Internal.hs view
@@ -63,7 +63,6 @@ import qualified Data.Map as Map (fromList, keys, lookup, singleton) import Data.Map (Map) import Data.Maybe-import Data.Monoid.Compat ((<>)) import qualified Data.Set as Set import Data.Set (Set) import qualified Data.Text as TS
src/TextShow/Utils.hs view
@@ -26,7 +26,6 @@ import Data.Int (Int64) import Data.Text (Text)-import Data.Monoid.Compat ((<>)) import Data.Text.Lazy (length, toStrict, unpack) import Data.Text.Lazy.Builder (Builder, singleton, toLazyText)
tests/Instances/Control/Exception.hs view
@@ -20,6 +20,9 @@ import GHC.Generics (Generic) import GHC.IO.Exception (IOException(..), IOErrorType(..))+#if MIN_VERSION_base(4,11,0)+import GHC.IO.Exception (FixIOException(..))+#endif import Instances.Foreign.C.Types () import Instances.System.IO ()@@ -95,6 +98,13 @@ #if MIN_VERSION_base(4,10,0) deriving instance Arbitrary CompactionFailed+#endif++#if MIN_VERSION_base(4,11,0)+deriving instance Bounded FixIOException+deriving instance Enum FixIOException+instance Arbitrary FixIOException where+ arbitrary = arbitraryBoundedEnum #endif deriving instance Bounded Deadlock
tests/Spec/Control/ExceptionSpec.hs view
@@ -13,6 +13,9 @@ module Spec.Control.ExceptionSpec (main, spec) where import Control.Exception+#if MIN_VERSION_base(4,11,0)+import Control.Exception.Base (FixIOException)+#endif import Data.Proxy (Proxy(..)) import Instances.Control.Exception () import Spec.Utils (matchesTextShowSpec)@@ -58,6 +61,10 @@ #if MIN_VERSION_base(4,10,0) describe "CompactionFailed" $ matchesTextShowSpec (Proxy :: Proxy CompactionFailed)+#endif+#if MIN_VERSION_base(4,11,0)+ describe "FixIOException" $+ matchesTextShowSpec (Proxy :: Proxy FixIOException) #endif describe "Deadlock" $ matchesTextShowSpec (Proxy :: Proxy Deadlock)
tests/Spec/Data/OldTypeableSpec.hs view
@@ -12,7 +12,7 @@ Stability: Provisional Portability: GHC -@hspec@ tests for data types in the "Data.Monoid" module.+@hspec@ tests for data types in the "Data.OldTypeable" module. -} module Spec.Data.OldTypeableSpec (main, spec) where
text-show.cabal view
@@ -1,5 +1,5 @@ name: text-show-version: 3.7.2+version: 3.7.3 synopsis: Efficient conversion of values into Text description: @text-show@ offers a replacement for the @Show@ typeclass intended for use with @Text@ instead of @String@s. This package was created@@ -156,23 +156,23 @@ TextShow.TH.Internal TextShow.TH.Names TextShow.Utils- build-depends: array >= 0.3 && < 0.6- , base-compat >= 0.8.1 && < 1- , bifunctors >= 5.1 && < 6- , bytestring >= 0.9 && < 0.11+ build-depends: array >= 0.3 && < 0.6+ , base-compat-batteries >= 0.10 && < 0.11+ , bifunctors >= 5.1 && < 6+ , bytestring >= 0.9 && < 0.11 , bytestring-builder- , containers >= 0.1 && < 0.6- , contravariant >= 0.5 && < 2- , generic-deriving >= 1.11 && < 2+ , containers >= 0.1 && < 0.6+ , contravariant >= 0.5 && < 2+ , generic-deriving >= 1.11 && < 2 , ghc-prim , integer-gmp- , nats >= 0.1 && < 2- , semigroups >= 0.17 && < 1- , tagged >= 0.4.4 && < 1- , text >= 0.11.1 && < 1.3- , th-abstraction >= 0.2.2 && < 1- , th-lift >= 0.7.6 && < 1- , void >= 0.5 && < 1+ , nats >= 0.1 && < 2+ , semigroups >= 0.17 && < 1+ , tagged >= 0.4.4 && < 1+ , text >= 0.11.1 && < 1.3+ , th-abstraction >= 0.2.2 && < 1+ , th-lift >= 0.7.6 && < 1+ , void >= 0.5 && < 1 if flag(base-4-9) build-depends: base >= 4.9 && < 5@@ -181,8 +181,8 @@ build-depends: base >= 4.3 && < 4.9 if flag(template-haskell-2-11)- build-depends: template-haskell >= 2.11 && < 2.13- , ghc-boot-th >= 8.0 && < 8.3+ build-depends: template-haskell >= 2.11 && < 2.14+ , ghc-boot-th >= 8.0 && < 8.5 else build-depends: template-haskell >= 2.5 && < 2.11 @@ -337,28 +337,28 @@ Spec.GHC.StackSpec TextShow.TH.Names- build-depends: array >= 0.3 && < 0.6- , base-compat >= 0.8.2 && < 1- , base-orphans >= 0.6 && < 0.8- , bifunctors >= 5.1 && < 6- , bytestring >= 0.9 && < 0.11+ build-depends: array >= 0.3 && < 0.6+ , base-compat-batteries >= 0.10 && < 0.11+ , base-orphans >= 0.6 && < 0.8+ , bifunctors >= 5.1 && < 6+ , bytestring >= 0.9 && < 0.11 , bytestring-builder- , containers >= 0.1 && < 0.6- , contravariant >= 0.5 && < 2- , deriving-compat >= 0.3.4 && < 1- , generic-deriving >= 1.11 && < 2+ , containers >= 0.1 && < 0.6+ , contravariant >= 0.5 && < 2+ , deriving-compat >= 0.3.4 && < 1+ , generic-deriving >= 1.11 && < 2 , ghc-prim- , hspec >= 2 && < 3+ , hspec >= 2 && < 3 , integer-gmp- , nats >= 0.1 && < 2- , QuickCheck >= 2.10 && < 2.12- , quickcheck-instances >= 0.3.18 && < 0.4- , semigroups >= 0.18.3 && < 1- , tagged >= 0.8.3 && < 1- , text >= 0.11.1 && < 1.3- , th-lift >= 0.7.6 && < 1- , transformers-compat >= 0.5 && < 1- , void >= 0.5 && < 1+ , nats >= 0.1 && < 2+ , QuickCheck >= 2.10 && < 2.12+ , quickcheck-instances >= 0.3.18 && < 0.4+ , semigroups >= 0.18.3 && < 1+ , tagged >= 0.8.3 && < 1+ , text >= 0.11.1 && < 1.3+ , th-lift >= 0.7.6 && < 1+ , transformers-compat >= 0.5 && < 1+ , void >= 0.5 && < 1 build-tool-depends: hspec-discover:hspec-discover if flag(base-4-9)@@ -368,8 +368,8 @@ build-depends: base >= 4.3 && < 4.9 if flag(template-haskell-2-11)- build-depends: template-haskell >= 2.11 && < 2.13- , ghc-boot-th >= 8.0 && < 8.3+ build-depends: template-haskell >= 2.11 && < 2.14+ , ghc-boot-th >= 8.0 && < 8.5 else build-depends: template-haskell >= 2.5 && < 2.11 @@ -397,24 +397,24 @@ type: exitcode-stdio-1.0 main-is: Bench.hs- build-depends: array >= 0.3 && < 0.6- , base-compat >= 0.8.1 && < 1- , bifunctors >= 5.1 && < 6- , bytestring >= 0.9 && < 0.11+ build-depends: array >= 0.3 && < 0.6+ , base-compat-batteries >= 0.10 && < 0.11+ , bifunctors >= 5.1 && < 6+ , bytestring >= 0.9 && < 0.11 , bytestring-builder- , containers >= 0.1 && < 0.6- , contravariant >= 0.5 && < 2- , criterion >= 1.1.4 && < 2- , deepseq >= 1.3 && < 2- , generic-deriving >= 1.11 && < 2+ , containers >= 0.1 && < 0.6+ , contravariant >= 0.5 && < 2+ , criterion >= 1.1.4 && < 2+ , deepseq >= 1.3 && < 2+ , generic-deriving >= 1.11 && < 2 , ghc-prim , integer-gmp- , nats >= 0.1 && < 2- , semigroups >= 0.17 && < 1- , tagged >= 0.4.4 && < 1- , text >= 0.11.1 && < 1.3- , th-lift >= 0.7.6 && < 1- , void >= 0.5 && < 1+ , nats >= 0.1 && < 2+ , semigroups >= 0.17 && < 1+ , tagged >= 0.4.4 && < 1+ , text >= 0.11.1 && < 1.3+ , th-lift >= 0.7.6 && < 1+ , void >= 0.5 && < 1 if flag(base-4-9) build-depends: base >= 4.9 && < 5@@ -423,8 +423,8 @@ build-depends: base >= 4.5 && < 4.9 if flag(template-haskell-2-11)- build-depends: template-haskell >= 2.11 && < 2.13- , ghc-boot-th >= 8.0 && < 8.3+ build-depends: template-haskell >= 2.11 && < 2.14+ , ghc-boot-th >= 8.0 && < 8.5 else build-depends: template-haskell >= 2.5 && < 2.11