-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Efficient conversion of values into Text -- -- text-show offers a replacement for the Show -- typeclass intended for use with Text instead of -- Strings. This package was created in the spirit of -- bytestring-show. -- -- At the moment, text-show provides instances for most data -- types in the array, base, -- bytestring, and text packages. -- Therefore, much of the source code for text-show consists of -- borrowed code from those packages in order to ensure that the -- behaviors of Show and TextShow coincide. -- -- For most uses, simply importing TextShow will suffice: -- --
-- module Main where -- -- import TextShow -- -- main :: IO () -- main = printT (Just "Hello, World!") ---- -- If you desire it, there are also monomorphic versions of the -- showb function available in the submodules of -- TextShow. See the naming conventions page for more -- information. -- -- Support for automatically deriving TextShow instances can be -- found in the TextShow.TH and TextShow.Generic modules. @package text-show @version 3.7 -- | TextShow instance for ConsoleEvent. Only provided if -- using Windows, and not using GHCJS. -- -- Since: 2 module TextShow.GHC.Conc.Windows -- | TextShow instances for data types in the OldTypeable -- module. This module only exports functions if using base-4.7. -- -- Since: 2 module TextShow.Data.OldTypeable -- | TextShow instance for strict ST. -- -- Since: 2 module TextShow.Control.Monad.ST instance TextShow.Classes.TextShow (GHC.ST.ST s a) instance TextShow.Classes.TextShow1 (GHC.ST.ST s) instance TextShow.Classes.TextShow2 GHC.ST.ST -- | TextShow instance for Compose. -- -- Since: 3 module TextShow.Data.Functor.Compose instance (TextShow.Classes.TextShow1 f, TextShow.Classes.TextShow1 g, TextShow.Classes.TextShow a) => TextShow.Classes.TextShow (Data.Functor.Compose.Compose f g a) instance (TextShow.Classes.TextShow1 f, TextShow.Classes.TextShow1 g) => TextShow.Classes.TextShow1 (Data.Functor.Compose.Compose f g) -- | TextShow instance for Identity values. -- -- Since: 2 module TextShow.Data.Functor.Identity instance TextShow.Classes.TextShow a => TextShow.Classes.TextShow (Data.Functor.Identity.Identity a) instance TextShow.Classes.TextShow1 Data.Functor.Identity.Identity -- | TextShow instances and monomorphic functions for integral -- types. -- -- Since: 2 module TextShow.Data.Integral -- | Convert an Integral type to a Builder with the given -- precedence. -- -- Since: 2 showbIntegralPrec :: Integral a => Int -> a -> Builder -- | Shows a non-negative Integral number using the base -- specified by the first argument, and the character representation -- specified by the second. -- -- Since: 2 showbIntAtBase :: (Integral a, TextShow a) => a -> (Int -> Char) -> a -> Builder -- | Show non-negative Integral numbers in base 2. -- -- Since: 2 showbBin :: (Integral a, TextShow a) => a -> Builder -- | Show non-negative Integral numbers in base 16. -- -- Since: 2 showbHex :: (Integral a, TextShow a) => a -> Builder -- | Show non-negative Integral numbers in base 8. -- -- Since: 2 showbOct :: (Integral a, TextShow a) => a -> Builder instance TextShow.Classes.TextShow GHC.Types.Int instance TextShow.Classes.TextShow GHC.Int.Int8 instance TextShow.Classes.TextShow GHC.Int.Int16 instance TextShow.Classes.TextShow GHC.Int.Int32 instance TextShow.Classes.TextShow GHC.Int.Int64 instance TextShow.Classes.TextShow GHC.Integer.Type.Integer instance TextShow.Classes.TextShow GHC.Types.Word instance TextShow.Classes.TextShow GHC.Word.Word8 instance TextShow.Classes.TextShow GHC.Word.Word16 instance TextShow.Classes.TextShow GHC.Word.Word32 instance TextShow.Classes.TextShow GHC.Word.Word64 -- | Provides TextShow instance for Fixed, as well as the -- showbFixed function. -- -- Since: 2 module TextShow.Data.Fixed -- | Convert a Fixed value to a Builder, where the first -- argument indicates whether to chop off trailing zeroes. -- -- Since: 2 showbFixed :: HasResolution a => Bool -> Fixed a -> Builder instance Data.Fixed.HasResolution a => TextShow.Classes.TextShow (Data.Fixed.Fixed a) -- | TextShow instance for Ratio. -- -- Since: 2 module TextShow.Data.Ratio instance TextShow.Classes.TextShow a => TextShow.Classes.TextShow (GHC.Real.Ratio a) instance TextShow.Classes.TextShow1 GHC.Real.Ratio -- | TextShow instance for Void. -- -- Since: 2 module TextShow.Data.Void instance TextShow.Classes.TextShow Data.Void.Void -- | TextShow instances for pointer types used in the Haskell -- Foreign Function Interface (FFI). -- -- Since: 2 module TextShow.Foreign.Ptr instance TextShow.Classes.TextShow (GHC.Ptr.Ptr a) instance TextShow.Classes.TextShow1 GHC.Ptr.Ptr instance TextShow.Classes.TextShow (GHC.Ptr.FunPtr a) instance TextShow.Classes.TextShow1 GHC.Ptr.FunPtr instance TextShow.Classes.TextShow Foreign.Ptr.IntPtr instance TextShow.Classes.TextShow Foreign.Ptr.WordPtr instance TextShow.Classes.TextShow (GHC.ForeignPtr.ForeignPtr a) instance TextShow.Classes.TextShow1 GHC.ForeignPtr.ForeignPtr -- | Optional orphan TextShow, TextShow1, and -- TextShow2 instances for functions. -- -- Since: 2 module TextShow.Functions instance TextShow.Classes.TextShow (a -> b) instance TextShow.Classes.TextShow1 ((->) a) instance TextShow.Classes.TextShow2 (->) -- | TextShow instance for Fingerprint. -- -- Since: 2 module TextShow.GHC.Fingerprint instance TextShow.Classes.TextShow GHC.Fingerprint.Type.Fingerprint -- | TextShow instance for Natural. -- -- Since: 2 module TextShow.Numeric.Natural instance TextShow.Classes.TextShow GHC.Natural.Natural -- | TextShow instances for Exception data types. -- -- Since: 2 module TextShow.Control.Exception instance TextShow.Classes.TextShow GHC.IO.MaskingState instance TextShow.Classes.TextShow GHC.Exception.SomeException instance TextShow.Classes.TextShow GHC.IO.Exception.IOException instance TextShow.Classes.TextShow GHC.Exception.ArithException instance TextShow.Classes.TextShow GHC.IO.Exception.ArrayException instance TextShow.Classes.TextShow GHC.IO.Exception.AssertionFailed instance TextShow.Classes.TextShow GHC.IO.Exception.SomeAsyncException instance TextShow.Classes.TextShow GHC.IO.Exception.AsyncException instance TextShow.Classes.TextShow Control.Exception.Base.NonTermination instance TextShow.Classes.TextShow Control.Exception.Base.NestedAtomically instance TextShow.Classes.TextShow GHC.IO.Exception.BlockedIndefinitelyOnMVar instance TextShow.Classes.TextShow GHC.IO.Exception.BlockedIndefinitelyOnSTM instance TextShow.Classes.TextShow GHC.IO.Exception.AllocationLimitExceeded instance TextShow.Classes.TextShow Control.Exception.Base.TypeError instance TextShow.Classes.TextShow GHC.IO.Exception.Deadlock instance TextShow.Classes.TextShow Control.Exception.Base.NoMethodError instance TextShow.Classes.TextShow Control.Exception.Base.PatternMatchFail instance TextShow.Classes.TextShow Control.Exception.Base.RecConError instance TextShow.Classes.TextShow Control.Exception.Base.RecSelError instance TextShow.Classes.TextShow Control.Exception.Base.RecUpdError instance TextShow.Classes.TextShow GHC.Exception.ErrorCall -- | TextShow instance for Bool. -- -- Since: 2 module TextShow.Data.Bool instance TextShow.Classes.TextShow GHC.Types.Bool -- | TextShow instances and monomorphic functions for Char -- and String. -- -- Since: 2 module TextShow.Data.Char -- | Convert a Char to a Builder (surrounded by single -- quotes). -- -- Since: 2 showbChar :: Char -> Builder -- | Convert a Char to a Builder (without single quotes). -- -- Since: 2 showbLitChar :: Char -> Builder -- | Convert a String to a Builder (surrounded by double -- quotes). -- -- Since: 2 showbString :: String -> Builder -- | Convert a String to a Builder (without double quotes). -- -- Since: 2 showbLitString :: String -> Builder -- | Convert a GeneralCategory to a Builder. -- -- Since: 2 showbGeneralCategory :: GeneralCategory -> Builder -- | A table of ASCII control characters that needs to be escaped with a -- backslash. -- -- Since: 2 asciiTabB :: Array Int Builder instance TextShow.Classes.TextShow GHC.Unicode.GeneralCategory instance TextShow.Classes.TextShow GHC.Types.Char -- | Exports showbListWith, showtListWith, and -- showtlListWith, and TextShow instances for lists. module TextShow.Data.List -- | Converts a list of values into a Builder in which the values -- are surrounded by square brackets and each value is separated by a -- comma. The function argument controls how each element is shown. -- -- showbListWith showb is the default -- implementation of showbList save for a few special cases (e.g., -- String). -- -- Since: 2 showbListWith :: (a -> Builder) -> [a] -> Builder -- | Converts a list of values into a strict Text in which the -- values are surrounded by square brackets and each value is separated -- by a comma. The function argument controls how each element is shown. -- -- Since: 3.4 showtListWith :: (a -> Text) -> [a] -> Text -- | Converts a list of values into a lazy Text in which the values -- are surrounded by square brackets and each value is separated by a -- comma. The function argument controls how each element is shown. -- -- Since: 3.4 showtlListWith :: (a -> Text) -> [a] -> Text instance TextShow.Classes.TextShow a => TextShow.Classes.TextShow [a] instance TextShow.Classes.TextShow1 [] -- | TextShow instances for Const and ZipList. -- -- Since: 2 module TextShow.Control.Applicative instance TextShow.Classes.TextShow1 Control.Applicative.ZipList instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow (Control.Applicative.ZipList a0) instance forall k a (b :: k). TextShow.Classes.TextShow a => TextShow.Classes.TextShow (Data.Functor.Const.Const a b) instance TextShow.Classes.TextShow a => TextShow.Classes.TextShow1 (Data.Functor.Const.Const a) instance TextShow.Classes.TextShow2 Data.Functor.Const.Const -- | TextShow instances for data types in the bytestring -- library. -- -- Since: 2 module TextShow.Data.ByteString instance TextShow.Classes.TextShow Data.ByteString.Internal.ByteString instance TextShow.Classes.TextShow Data.ByteString.Lazy.Internal.ByteString instance TextShow.Classes.TextShow Data.ByteString.Short.Internal.ShortByteString -- | TextShow instances for data types in the Typeable -- module. -- -- Since: 2 module TextShow.Data.Typeable instance TextShow.Classes.TextShow Data.Typeable.Internal.TypeRep instance TextShow.Classes.TextShow GHC.Types.TyCon instance TextShow.Classes.TextShow GHC.Types.TrName instance TextShow.Classes.TextShow GHC.Types.Module -- | TextShow instance for Dynamic. -- -- Since: 2 module TextShow.Data.Dynamic instance TextShow.Classes.TextShow Data.Dynamic.Dynamic -- | TextShow instances for data types in the GHC.TypeLits -- module. Only provided if using base-4.6.0.0 or later. -- -- Since: 2 module TextShow.GHC.TypeLits instance TextShow.Classes.TextShow GHC.TypeLits.SomeNat instance TextShow.Classes.TextShow GHC.TypeLits.SomeSymbol -- | TextShow instances for data types in the Data.Data -- module. -- -- Since: 2 module TextShow.Data.Data instance TextShow.Classes.TextShow Data.Data.Fixity instance TextShow.Classes.TextShow Data.Data.Constr instance TextShow.Classes.TextShow Data.Data.ConstrRep instance TextShow.Classes.TextShow Data.Data.DataRep instance TextShow.Classes.TextShow Data.Data.DataType -- | TextShow instance for Either. -- -- Since: 2 module TextShow.Data.Either instance TextShow.Classes.TextShow2 Data.Either.Either instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow1 (Data.Either.Either a0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0) => TextShow.Classes.TextShow (Data.Either.Either a0 b0) -- | TextShow instances and monomorphic functions for floating-point -- types. -- -- Since: 2 module TextShow.Data.Floating -- | Convert a RealFloat value to a Builder with the given -- precedence. -- -- Since: 2 showbRealFloatPrec :: RealFloat a => Int -> a -> Builder -- | Show a signed RealFloat value using scientific (exponential) -- notation (e.g. 2.45e2, 1.5e-3). -- -- In the call showbEFloat digs val, if digs is -- Nothing, the value is shown to full precision; if digs -- is Just d, then at most d digits after the -- decimal point are shown. -- -- Since: 2 showbEFloat :: RealFloat a => Maybe Int -> a -> Builder -- | Show a signed RealFloat value using standard decimal notation -- (e.g. 245000, 0.0015). -- -- In the call showbFFloat digs val, if digs is -- Nothing, the value is shown to full precision; if digs -- is Just d, then at most d digits after the -- decimal point are shown. -- -- Since: 2 showbFFloat :: RealFloat a => Maybe Int -> a -> Builder -- | Show a signed RealFloat value using standard decimal notation -- for arguments whose absolute value lies between 0.1 and -- 9,999,999, and scientific notation otherwise. -- -- In the call showbGFloat digs val, if digs is -- Nothing, the value is shown to full precision; if digs -- is Just d, then at most d digits after the -- decimal point are shown. -- -- Since: 2 showbGFloat :: RealFloat a => Maybe Int -> a -> Builder -- | Show a signed RealFloat value using standard decimal notation -- (e.g. 245000, 0.0015). -- -- This behaves as showFFloat, except that a decimal point is -- always guaranteed, even if not needed. -- -- Since: 2 showbFFloatAlt :: RealFloat a => Maybe Int -> a -> Builder -- | Show a signed RealFloat value using standard decimal notation -- for arguments whose absolute value lies between 0.1 and -- 9,999,999, and scientific notation otherwise. -- -- This behaves as showFFloat, except that a decimal point is -- always guaranteed, even if not needed. -- -- Since: 2 showbGFloatAlt :: RealFloat a => Maybe Int -> a -> Builder -- | Convert an FPFormat value to a Builder. -- -- Since: 2 showbFPFormat :: FPFormat -> Builder -- | Control the rendering of floating point numbers. data FPFormat :: * -- | Scientific notation (e.g. 2.3e123). Exponent :: FPFormat -- | Standard decimal notation. Fixed :: FPFormat -- | Use decimal notation for values between 0.1 and -- 9,999,999, and scientific notation otherwise. Generic :: FPFormat -- | Like formatRealFloatAltB, except that the decimal is only shown -- for arguments whose absolute value is between 0.1 and -- 9,999,999. -- -- Since: 2 formatRealFloatB :: RealFloat a => FPFormat -> Maybe Int -> a -> Builder -- | Converts a RealFloat value to a Builder, specifying if a -- decimal point should always be shown. -- -- Since: 2 formatRealFloatAltB :: RealFloat a => FPFormat -> Maybe Int -> Bool -> a -> Builder instance TextShow.Classes.TextShow Data.Text.Lazy.Builder.RealFloat.FPFormat instance TextShow.Classes.TextShow GHC.Types.Float instance TextShow.Classes.TextShow GHC.Types.Double -- | TextShow instances for Ratio. -- -- Since: 2 module TextShow.Data.Complex instance TextShow.Classes.TextShow1 Data.Complex.Complex instance TextShow.Classes.TextShow a => TextShow.Classes.TextShow (Data.Complex.Complex a) -- | TextShow instances for Haskell newtypes corresponding to C -- types in the Foreign Function Interface (FFI). -- -- Since: 2 module TextShow.Foreign.C.Types instance TextShow.Classes.TextShow Foreign.C.Types.CChar instance TextShow.Classes.TextShow Foreign.C.Types.CSChar instance TextShow.Classes.TextShow Foreign.C.Types.CUChar instance TextShow.Classes.TextShow Foreign.C.Types.CShort instance TextShow.Classes.TextShow Foreign.C.Types.CUShort instance TextShow.Classes.TextShow Foreign.C.Types.CInt instance TextShow.Classes.TextShow Foreign.C.Types.CUInt instance TextShow.Classes.TextShow Foreign.C.Types.CLong instance TextShow.Classes.TextShow Foreign.C.Types.CULong instance TextShow.Classes.TextShow Foreign.C.Types.CPtrdiff instance TextShow.Classes.TextShow Foreign.C.Types.CSize instance TextShow.Classes.TextShow Foreign.C.Types.CWchar instance TextShow.Classes.TextShow Foreign.C.Types.CSigAtomic instance TextShow.Classes.TextShow Foreign.C.Types.CLLong instance TextShow.Classes.TextShow Foreign.C.Types.CULLong instance TextShow.Classes.TextShow Foreign.C.Types.CIntPtr instance TextShow.Classes.TextShow Foreign.C.Types.CUIntPtr instance TextShow.Classes.TextShow Foreign.C.Types.CIntMax instance TextShow.Classes.TextShow Foreign.C.Types.CUIntMax instance TextShow.Classes.TextShow Foreign.C.Types.CClock instance TextShow.Classes.TextShow Foreign.C.Types.CTime instance TextShow.Classes.TextShow Foreign.C.Types.CUSeconds instance TextShow.Classes.TextShow Foreign.C.Types.CSUSeconds instance TextShow.Classes.TextShow Foreign.C.Types.CFloat instance TextShow.Classes.TextShow Foreign.C.Types.CDouble -- | TextShow instances for concurrency-related data types. -- -- Since: 2 module TextShow.Control.Concurrent instance TextShow.Classes.TextShow GHC.Conc.Sync.BlockReason instance TextShow.Classes.TextShow GHC.Conc.Sync.ThreadStatus instance TextShow.Classes.TextShow GHC.Conc.Sync.ThreadId -- | TextShow instances for Haskell equivalents of POSIX data types. -- Note that these are only available if the operating system supports -- them, so some OSes (e.g., Windows) will not be able to use all of the -- instances in this module. -- -- Since: 2 module TextShow.System.Posix.Types instance TextShow.Classes.TextShow System.Posix.Types.CDev instance TextShow.Classes.TextShow System.Posix.Types.CIno instance TextShow.Classes.TextShow System.Posix.Types.CMode instance TextShow.Classes.TextShow System.Posix.Types.COff instance TextShow.Classes.TextShow System.Posix.Types.CPid instance TextShow.Classes.TextShow System.Posix.Types.CSsize instance TextShow.Classes.TextShow System.Posix.Types.CGid instance TextShow.Classes.TextShow System.Posix.Types.CNlink instance TextShow.Classes.TextShow System.Posix.Types.CUid instance TextShow.Classes.TextShow System.Posix.Types.CCc instance TextShow.Classes.TextShow System.Posix.Types.CSpeed instance TextShow.Classes.TextShow System.Posix.Types.CTcflag instance TextShow.Classes.TextShow System.Posix.Types.CRLim instance TextShow.Classes.TextShow System.Posix.Types.Fd -- | TextShow instance for Product. -- -- Since: 3 module TextShow.Data.Functor.Product instance (TextShow.Classes.TextShow1 f0, TextShow.Classes.TextShow1 g0) => TextShow.Classes.TextShow1 (Data.Functor.Product.Product f0 g0) instance (TextShow.Classes.TextShow1 f, TextShow.Classes.TextShow1 g, TextShow.Classes.TextShow a) => TextShow.Classes.TextShow (Data.Functor.Product.Product f g a) -- | TextShow instance for Sum. -- -- Since: 3 module TextShow.Data.Functor.Sum instance (TextShow.Classes.TextShow1 f0, TextShow.Classes.TextShow1 g0) => TextShow.Classes.TextShow1 (Data.Functor.Sum.Sum f0 g0) instance (TextShow.Classes.TextShow1 f, TextShow.Classes.TextShow1 g, TextShow.Classes.TextShow a) => TextShow.Classes.TextShow (Data.Functor.Sum.Sum f g a) -- | TextShow instance for NonEmpty lists. -- -- Since: 3 module TextShow.Data.List.NonEmpty instance TextShow.Classes.TextShow1 Data.List.NonEmpty.NonEmpty instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow (Data.List.NonEmpty.NonEmpty a0) -- | TextShow instance for Maybe. -- -- Since: 2 module TextShow.Data.Maybe instance TextShow.Classes.TextShow1 GHC.Base.Maybe instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow (GHC.Base.Maybe a0) -- | TextShow instances for Monoid-related newtypes. -- -- Since: 2 module TextShow.Data.Monoid instance TextShow.Classes.TextShow1 f0 => TextShow.Classes.TextShow1 (Data.Monoid.Alt f0) instance TextShow.Classes.TextShow1 Data.Monoid.Sum instance TextShow.Classes.TextShow (f a) => TextShow.Classes.TextShow (Data.Monoid.Alt f a) instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow (Data.Monoid.Sum a0) instance TextShow.Classes.TextShow1 Data.Monoid.Product instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow (Data.Monoid.Product a0) instance TextShow.Classes.TextShow1 Data.Monoid.Last instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow (Data.Monoid.Last a0) instance TextShow.Classes.TextShow1 Data.Monoid.First instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow (Data.Monoid.First a0) instance TextShow.Classes.TextShow1 Data.Monoid.Dual instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow (Data.Monoid.Dual a0) instance TextShow.Classes.TextShow Data.Monoid.Any instance TextShow.Classes.TextShow Data.Monoid.All -- | TextShow instances for Ordering and Down. -- -- Since: 2 module TextShow.Data.Ord instance TextShow.Classes.TextShow1 Data.Ord.Down instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow (Data.Ord.Down a0) instance TextShow.Classes.TextShow GHC.Types.Ordering -- | TextShow instance for Proxy. -- -- Since: 2 module TextShow.Data.Proxy instance TextShow.Classes.TextShow1 Data.Proxy.Proxy instance forall k (s :: k). TextShow.Classes.TextShow (Data.Proxy.Proxy s) -- | TextShow instances for data types in the -- Data.Semigroup module. -- -- Since: 3 module TextShow.Data.Semigroup instance TextShow.Classes.TextShow2 Data.Semigroup.Arg instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow1 (Data.Semigroup.Arg a0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0) => TextShow.Classes.TextShow (Data.Semigroup.Arg a0 b0) instance TextShow.Classes.TextShow1 Data.Semigroup.Option instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow (Data.Semigroup.Option a0) instance TextShow.Classes.TextShow1 Data.Semigroup.WrappedMonoid instance TextShow.Classes.TextShow m0 => TextShow.Classes.TextShow (Data.Semigroup.WrappedMonoid m0) instance TextShow.Classes.TextShow1 Data.Semigroup.Last instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow (Data.Semigroup.Last a0) instance TextShow.Classes.TextShow1 Data.Semigroup.First instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow (Data.Semigroup.First a0) instance TextShow.Classes.TextShow1 Data.Semigroup.Max instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow (Data.Semigroup.Max a0) instance TextShow.Classes.TextShow1 Data.Semigroup.Min instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow (Data.Semigroup.Min a0) -- | TextShow instances for Text types. -- -- Since: 2 module TextShow.Data.Text instance TextShow.Classes.TextShow Data.Text.Internal.Fusion.Size.Size instance TextShow.Classes.TextShow Data.Text.Foreign.I16 instance TextShow.Classes.TextShow Data.Text.Encoding.Error.UnicodeException instance TextShow.Classes.TextShow Data.Text.Encoding.Decoding instance TextShow.Classes.TextShow Data.Text.Internal.Text instance TextShow.Classes.TextShow Data.Text.Internal.Lazy.Text instance TextShow.Classes.TextShow Data.Text.Internal.Builder.Builder -- | TextShow instances for tuple types. -- -- Since: 2 module TextShow.Data.Tuple instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0, TextShow.Classes.TextShow j0, TextShow.Classes.TextShow k0, TextShow.Classes.TextShow l0, TextShow.Classes.TextShow m0) => TextShow.Classes.TextShow2 ((,,,,,,,,,,,,,,) a0 b0 c0 d0 e0 f0 g0 h0 i0 j0 k0 l0 m0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0, TextShow.Classes.TextShow j0, TextShow.Classes.TextShow k0, TextShow.Classes.TextShow l0) => TextShow.Classes.TextShow2 ((,,,,,,,,,,,,,) a0 b0 c0 d0 e0 f0 g0 h0 i0 j0 k0 l0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0, TextShow.Classes.TextShow j0, TextShow.Classes.TextShow k0) => TextShow.Classes.TextShow2 ((,,,,,,,,,,,,) a0 b0 c0 d0 e0 f0 g0 h0 i0 j0 k0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0, TextShow.Classes.TextShow j0) => TextShow.Classes.TextShow2 ((,,,,,,,,,,,) a0 b0 c0 d0 e0 f0 g0 h0 i0 j0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0) => TextShow.Classes.TextShow2 ((,,,,,,,,,,) a0 b0 c0 d0 e0 f0 g0 h0 i0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0) => TextShow.Classes.TextShow2 ((,,,,,,,,,) a0 b0 c0 d0 e0 f0 g0 h0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0) => TextShow.Classes.TextShow2 ((,,,,,,,,) a0 b0 c0 d0 e0 f0 g0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0) => TextShow.Classes.TextShow2 ((,,,,,,,) a0 b0 c0 d0 e0 f0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0) => TextShow.Classes.TextShow2 ((,,,,,,) a0 b0 c0 d0 e0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0) => TextShow.Classes.TextShow2 ((,,,,,) a0 b0 c0 d0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0) => TextShow.Classes.TextShow2 ((,,,,) a0 b0 c0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0) => TextShow.Classes.TextShow2 ((,,,) a0 b0) instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow2 ((,,) a0) instance TextShow.Classes.TextShow2 (,) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0, TextShow.Classes.TextShow j0, TextShow.Classes.TextShow k0, TextShow.Classes.TextShow l0, TextShow.Classes.TextShow m0, TextShow.Classes.TextShow n0) => TextShow.Classes.TextShow1 ((,,,,,,,,,,,,,,) a0 b0 c0 d0 e0 f0 g0 h0 i0 j0 k0 l0 m0 n0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0, TextShow.Classes.TextShow j0, TextShow.Classes.TextShow k0, TextShow.Classes.TextShow l0, TextShow.Classes.TextShow m0) => TextShow.Classes.TextShow1 ((,,,,,,,,,,,,,) a0 b0 c0 d0 e0 f0 g0 h0 i0 j0 k0 l0 m0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0, TextShow.Classes.TextShow j0, TextShow.Classes.TextShow k0, TextShow.Classes.TextShow l0) => TextShow.Classes.TextShow1 ((,,,,,,,,,,,,) a0 b0 c0 d0 e0 f0 g0 h0 i0 j0 k0 l0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0, TextShow.Classes.TextShow j0, TextShow.Classes.TextShow k0) => TextShow.Classes.TextShow1 ((,,,,,,,,,,,) a0 b0 c0 d0 e0 f0 g0 h0 i0 j0 k0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0, TextShow.Classes.TextShow j0) => TextShow.Classes.TextShow1 ((,,,,,,,,,,) a0 b0 c0 d0 e0 f0 g0 h0 i0 j0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0) => TextShow.Classes.TextShow1 ((,,,,,,,,,) a0 b0 c0 d0 e0 f0 g0 h0 i0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0) => TextShow.Classes.TextShow1 ((,,,,,,,,) a0 b0 c0 d0 e0 f0 g0 h0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0) => TextShow.Classes.TextShow1 ((,,,,,,,) a0 b0 c0 d0 e0 f0 g0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0) => TextShow.Classes.TextShow1 ((,,,,,,) a0 b0 c0 d0 e0 f0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0) => TextShow.Classes.TextShow1 ((,,,,,) a0 b0 c0 d0 e0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0) => TextShow.Classes.TextShow1 ((,,,,) a0 b0 c0 d0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0) => TextShow.Classes.TextShow1 ((,,,) a0 b0 c0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0) => TextShow.Classes.TextShow1 ((,,) a0 b0) instance TextShow.Classes.TextShow a0 => TextShow.Classes.TextShow1 ((,) a0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0, TextShow.Classes.TextShow j0, TextShow.Classes.TextShow k0, TextShow.Classes.TextShow l0, TextShow.Classes.TextShow m0, TextShow.Classes.TextShow n0, TextShow.Classes.TextShow o0) => TextShow.Classes.TextShow (a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0, TextShow.Classes.TextShow j0, TextShow.Classes.TextShow k0, TextShow.Classes.TextShow l0, TextShow.Classes.TextShow m0, TextShow.Classes.TextShow n0) => TextShow.Classes.TextShow (a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0, TextShow.Classes.TextShow j0, TextShow.Classes.TextShow k0, TextShow.Classes.TextShow l0, TextShow.Classes.TextShow m0) => TextShow.Classes.TextShow (a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0, TextShow.Classes.TextShow j0, TextShow.Classes.TextShow k0, TextShow.Classes.TextShow l0) => TextShow.Classes.TextShow (a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0, TextShow.Classes.TextShow j0, TextShow.Classes.TextShow k0) => TextShow.Classes.TextShow (a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0, TextShow.Classes.TextShow j0) => TextShow.Classes.TextShow (a0, b0, c0, d0, e0, f0, g0, h0, i0, j0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0, TextShow.Classes.TextShow i0) => TextShow.Classes.TextShow (a0, b0, c0, d0, e0, f0, g0, h0, i0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0, TextShow.Classes.TextShow h0) => TextShow.Classes.TextShow (a0, b0, c0, d0, e0, f0, g0, h0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0, TextShow.Classes.TextShow g0) => TextShow.Classes.TextShow (a0, b0, c0, d0, e0, f0, g0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0, TextShow.Classes.TextShow f0) => TextShow.Classes.TextShow (a0, b0, c0, d0, e0, f0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0, TextShow.Classes.TextShow e0) => TextShow.Classes.TextShow (a0, b0, c0, d0, e0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0, TextShow.Classes.TextShow d0) => TextShow.Classes.TextShow (a0, b0, c0, d0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0, TextShow.Classes.TextShow c0) => TextShow.Classes.TextShow (a0, b0, c0) instance (TextShow.Classes.TextShow a0, TextShow.Classes.TextShow b0) => TextShow.Classes.TextShow (a0, b0) instance TextShow.Classes.TextShow () -- | Provides TextShow instances for Array types, as well as -- the showbIArrayPrec function. -- -- Since: 2 module TextShow.Data.Array -- | Convert an IArray instance to a Builder with the given -- precedence. -- -- Since: 2 showbIArrayPrec :: (IArray a e, Ix i, TextShow i, TextShow e) => Int -> a i e -> Builder instance (TextShow.Classes.TextShow i, TextShow.Classes.TextShow e, GHC.Arr.Ix i) => TextShow.Classes.TextShow (GHC.Arr.Array i e) instance (Data.Array.Base.IArray Data.Array.Base.UArray e, GHC.Arr.Ix i, TextShow.Classes.TextShow i, TextShow.Classes.TextShow e) => TextShow.Classes.TextShow (Data.Array.Base.UArray i e) -- | TextShow instance for representational equality. Only -- provided if using base-4.7.0.0 or later. -- -- Since: 2 module TextShow.Data.Type.Coercion instance TextShow.Classes.TextShow2 Data.Type.Coercion.Coercion instance forall k (a0 :: k) (b0 :: k). TextShow.Classes.TextShow (Data.Type.Coercion.Coercion a0 b0) instance TextShow.Classes.TextShow1 (Data.Type.Coercion.Coercion a) -- | TextShow instance for propositional equality. Only provided -- if using base-4.7.0.0 or later. -- -- Since: 2 module TextShow.Data.Type.Equality instance TextShow.Classes.TextShow2 (Data.Type.Equality.:~:) instance forall k (a0 :: k) (b0 :: k). TextShow.Classes.TextShow (a0 Data.Type.Equality.:~: b0) instance TextShow.Classes.TextShow1 ((Data.Type.Equality.:~:) a) -- | Provides a TextShow instance for Version and the -- showbVersion function. -- -- Since: 2 module TextShow.Data.Version -- | Provides one possible concrete representation for Version. For -- a version with versionBranch = [1,2,3] and -- versionTags = ["tag1","tag2"], the output will be -- 1.2.3-tag1-tag2. -- -- Since: 3.6 showbVersion :: Version -> Builder instance TextShow.Classes.TextShow Data.Version.Version -- | TextShow instances for data types in the Event module. -- Only provided if using a platform other than Windows or GHCJS. -- -- Since: 2 module TextShow.GHC.Event instance TextShow.Classes.TextShow GHC.Event.Internal.Lifetime instance TextShow.Classes.TextShow GHC.Event.Manager.FdKey instance TextShow.Classes.TextShow GHC.Event.Unique.Unique instance TextShow.Classes.TextShow GHC.Event.Internal.Event -- | TextShow instances for generics-related data types. -- -- Since: 2 module TextShow.GHC.Generics instance TextShow.Classes.TextShow GHC.Generics.DecidedStrictness instance TextShow.Classes.TextShow GHC.Generics.SourceStrictness instance TextShow.Classes.TextShow GHC.Generics.SourceUnpackedness instance TextShow.Classes.TextShow GHC.Generics.Associativity instance TextShow.Classes.TextShow GHC.Generics.Fixity instance TextShow.Classes.TextShow1 (GHC.Generics.URec GHC.Types.Word) instance TextShow.Classes.TextShow1 (GHC.Generics.URec GHC.Types.Int) instance TextShow.Classes.TextShow (GHC.Generics.UWord p) instance TextShow.Classes.TextShow1 (GHC.Generics.URec GHC.Types.Float) instance TextShow.Classes.TextShow (GHC.Generics.UInt p) instance TextShow.Classes.TextShow1 (GHC.Generics.URec GHC.Types.Double) instance TextShow.Classes.TextShow (GHC.Generics.UFloat p) instance TextShow.Classes.TextShow1 (GHC.Generics.URec GHC.Types.Char) instance TextShow.Classes.TextShow (GHC.Generics.UDouble p) instance (TextShow.Classes.TextShow1 f0, TextShow.Classes.TextShow1 g0) => TextShow.Classes.TextShow1 (f0 GHC.Generics.:.: g0) instance TextShow.Classes.TextShow (GHC.Generics.UChar p) instance (TextShow.Classes.TextShow1 f0, TextShow.Classes.TextShow1 g0) => TextShow.Classes.TextShow1 (f0 GHC.Generics.:*: g0) instance TextShow.Classes.TextShow (f (g p)) => TextShow.Classes.TextShow ((GHC.Generics.:.:) f g p) instance (TextShow.Classes.TextShow1 f0, TextShow.Classes.TextShow1 g0) => TextShow.Classes.TextShow1 (f0 GHC.Generics.:+: g0) instance (TextShow.Classes.TextShow (f p), TextShow.Classes.TextShow (g p)) => TextShow.Classes.TextShow ((GHC.Generics.:*:) f g p) instance TextShow.Classes.TextShow1 f0 => TextShow.Classes.TextShow1 (GHC.Generics.Rec1 f0) instance TextShow.Classes.TextShow c => TextShow.Classes.TextShow (GHC.Generics.K1 i c p) instance TextShow.Classes.TextShow c => TextShow.Classes.TextShow1 (GHC.Generics.K1 i c) instance TextShow.Classes.TextShow2 (GHC.Generics.K1 i) instance TextShow.Classes.TextShow (f p) => TextShow.Classes.TextShow (GHC.Generics.M1 i c f p) instance TextShow.Classes.TextShow1 f => TextShow.Classes.TextShow1 (GHC.Generics.M1 i c f) instance (TextShow.Classes.TextShow (f p), TextShow.Classes.TextShow (g p)) => TextShow.Classes.TextShow ((GHC.Generics.:+:) f g p) instance TextShow.Classes.TextShow1 GHC.Generics.Par1 instance TextShow.Classes.TextShow (f p) => TextShow.Classes.TextShow (GHC.Generics.Rec1 f p) instance TextShow.Classes.TextShow p0 => TextShow.Classes.TextShow (GHC.Generics.Par1 p0) instance TextShow.Classes.TextShow1 GHC.Generics.U1 instance TextShow.Classes.TextShow (GHC.Generics.U1 p) -- | TextShow instances for data types in the Flags module. -- Only provided if using base-4.8.0.0 or later. -- -- Since: 2 module TextShow.GHC.RTS.Flags instance TextShow.Classes.TextShow GHC.RTS.Flags.DoTrace instance TextShow.Classes.TextShow GHC.RTS.Flags.DoHeapProfile instance TextShow.Classes.TextShow GHC.RTS.Flags.DoCostCentres instance TextShow.Classes.TextShow GHC.RTS.Flags.GiveGCStats instance TextShow.Classes.TextShow GHC.RTS.Flags.TickyFlags instance TextShow.Classes.TextShow GHC.RTS.Flags.TraceFlags instance TextShow.Classes.TextShow GHC.RTS.Flags.ProfFlags instance TextShow.Classes.TextShow GHC.RTS.Flags.CCFlags instance TextShow.Classes.TextShow GHC.RTS.Flags.DebugFlags instance TextShow.Classes.TextShow GHC.RTS.Flags.MiscFlags instance TextShow.Classes.TextShow GHC.RTS.Flags.ConcFlags instance TextShow.Classes.TextShow GHC.RTS.Flags.GCFlags instance TextShow.Classes.TextShow GHC.RTS.Flags.RTSFlags -- | TextShow instances for CallStack and SrcLoc -- values. Only provided if using base-4.8.1.0 or later. -- -- Since: 3.0.1 module TextShow.GHC.Stack instance TextShow.Classes.TextShow GHC.Stack.Types.SrcLoc instance TextShow.Classes.TextShow GHC.Stack.Types.CallStack -- | TextShow instance for StaticPtrInfo. Only provided if -- using base-4.8.0.0 or later. -- -- Since: 2 module TextShow.GHC.StaticPtr instance TextShow.Classes.TextShow GHC.StaticPtr.StaticPtrInfo -- | TextShow instance for GCStats. -- -- Since: 2 module TextShow.GHC.Stats instance TextShow.Classes.TextShow GHC.Stats.GCStats -- | TextShow instance for ExitCode. -- -- Since: 2 module TextShow.System.Exit instance TextShow.Classes.TextShow GHC.IO.Exception.ExitCode -- | TextShow instances for IO-related data types. -- -- Since: 2 module TextShow.System.IO instance TextShow.Classes.TextShow GHC.IO.Handle.Types.NewlineMode instance TextShow.Classes.TextShow GHC.IO.Handle.Types.Newline instance TextShow.Classes.TextShow GHC.IO.Encoding.Failure.CodingFailureMode instance TextShow.Classes.TextShow GHC.IO.Encoding.Types.CodingProgress instance TextShow.Classes.TextShow GHC.IO.Device.SeekMode instance TextShow.Classes.TextShow GHC.IO.Encoding.Types.TextEncoding instance TextShow.Classes.TextShow GHC.IO.Handle.Types.BufferMode instance TextShow.Classes.TextShow GHC.IO.Handle.HandlePosn instance TextShow.Classes.TextShow GHC.IO.IOMode.IOMode instance TextShow.Classes.TextShow GHC.IO.Handle.Types.Handle -- | TextShow instance for Lexeme (and Number, if -- using a recent-enough version of base). -- -- Since: 2 module TextShow.Text.Read instance TextShow.Classes.TextShow Text.Read.Lex.Number instance TextShow.Classes.TextShow Text.Read.Lex.Lexeme -- | Functions for tracing and monitoring execution. -- -- These can be useful for investigating bugs or performance problems. -- They should not be used in production code. -- -- If you do not wish to require TextShow instances for your -- trace functions, the TextShow.Debug.Trace.TH and -- Text.Show.Text.Debug.Trace.Generic modules exist to convert the -- input to a debug message using Template Haskell or generics, -- respectively. -- -- Since: 2 module TextShow.Debug.Trace -- | The tracet function outputs the trace message given as its -- first argument, before returning the second argument as its result. -- -- For example, this returns the value of f x but first outputs -- the message. -- --
-- tracet ("calling f with x = " <> showt x) (f x)
--
--
-- The tracet function should only be used for debugging,
-- or for monitoring execution. The function is not referentially
-- transparent: its type indicates that it is a pure function but it has
-- the side effect of outputting the trace message.
--
-- Since: 2
tracet :: Text -> a -> a
-- | Like tracet but accepts a lazy Text argument.
--
-- Since: 2
tracetl :: Text -> a -> a
-- | Like tracet but returns the message instead of a third value.
--
-- Since: 2
tracetId :: Text -> Text
-- | Like tracetId but accepts a lazy Text argument.
--
-- Since: 2
tracetlId :: Text -> Text
-- | Like tracet, but uses showt on the argument to convert
-- it to a Text.
--
-- This makes it convenient for printing the values of interesting
-- variables or expressions inside a function. For example here we print
-- the value of the variables x and z:
--
-- -- f x y = -- traceTextShow (x, z) $ result -- where -- z = ... -- ... ---- -- Since: 2 traceTextShow :: TextShow a => a -> b -> b -- | Like traceTextShow but returns the shown value instead of a -- third value. -- -- Since: 2 traceTextShowId :: TextShow a => a -> a -- | Like tracet but additionally prints a call stack if one is -- available. -- -- In the current GHC implementation, the call stack is only availble if -- the program was compiled with -prof; otherwise -- tracetStack behaves exactly like tracet. Entries in the -- call stack correspond to SCC annotations, so it is a good -- idea to use -fprof-auto or -fprof-auto-calls to add -- SCC annotations automatically. -- -- Since: 2 tracetStack :: Text -> a -> a -- | Like tracetStack but accepts a lazy Text argument. -- -- Since: 2 tracetlStack :: Text -> a -> a -- | The tracetIO function outputs the trace message from the IO -- monad. This sequences the output with respect to other IO actions. -- -- Since: 2 tracetIO :: Text -> IO () -- | Like tracetIO but accepts a lazy Text argument. -- -- Since: 2 tracetlIO :: Text -> IO () -- | Like tracet but returning unit in an arbitrary -- Applicative context. Allows for convenient use in do-notation. -- Note that the application of tracet is not an action in the -- Applicative context, as tracetIO is in the IO -- type. -- --
-- ... = do -- x <- ... -- tracetM $ "x: " <> showt x -- y <- ... -- tracetM $ "y: " <> showt y ---- -- Since: 2 tracetM :: Applicative f => Text -> f () -- | Like tracetM but accepts a lazy Text argument. tracetlM :: Applicative f => Text -> f () -- | Like tracetM, but uses showt on the argument to convert -- it to a Text. -- --
-- ... = do -- x <- ... -- traceTextShowM x -- y <- ... -- traceTextShowM $ x + y ---- -- Since: 2 traceTextShowM :: (TextShow a, Applicative f) => a -> f () -- | The tracetEvent function behaves like tracet with the -- difference that the message is emitted to the eventlog, if eventlog -- profiling is available and enabled at runtime. -- -- It is suitable for use in pure code. In an IO context use -- tracetEventIO instead. -- -- Note that when using GHC's SMP runtime, it is possible (but rare) to -- get duplicate events emitted if two CPUs simultaneously evaluate the -- same thunk that uses traceEvent. -- -- Since: 2 tracetEvent :: Text -> a -> a -- | Like tracetEvent but accepts a lazy Text argument. -- -- Since: 2 tracetlEvent :: Text -> a -> a -- | The tracetEventIO function emits a message to the eventlog, if -- eventlog profiling is available and enabled at runtime. -- -- Compared to tracetEvent, tracetEventIO sequences the -- event with respect to other IO actions. -- -- Since: 2 tracetEventIO :: Text -> IO () -- | Like tracetEventIO but accepts a lazy Text argument. -- -- Since: 2 tracetlEventIO :: Text -> IO () -- | The tracetMarker function emits a marker to the eventlog, if -- eventlog profiling is available and enabled at runtime. The -- Text is the name of the marker. The name is just used in the -- profiling tools to help you keep clear which marker is which. -- -- This function is suitable for use in pure code. In an IO context use -- tracetMarkerIO instead. -- -- Note that when using GHC's SMP runtime, it is possible (but rare) to -- get duplicate events emitted if two CPUs simultaneously evaluate the -- same thunk that uses traceMarker. -- -- Since: 2 tracetMarker :: Text -> a -> a -- | Like tracetMarker but accepts a lazy Text argument. -- -- Since: 2 tracetlMarker :: Text -> a -> a -- | The tracetMarkerIO function emits a marker to the eventlog, if -- eventlog profiling is available and enabled at runtime. -- -- Compared to tracetMarker, tracetMarkerIO sequences the -- event with respect to other IO actions. -- -- Since: 2 tracetMarkerIO :: Text -> IO () -- | Like tracetMarkerIO but accepts a lazy Text argument. -- -- Since: 2 tracetlMarkerIO :: Text -> IO () -- | Functions that splice traces into source code which take an arbitrary -- data type or data family instance as an argument (even if it is not an -- instance of TextShow). You need to enable the -- TemplateHaskell language extension in order to use this -- module. -- -- Since: 2 module TextShow.Debug.Trace.TH -- | Generates a lambda expression which behaves like traceTextShow -- (without requiring a TextShow instance). -- -- Since: 2 makeTraceTextShow :: Name -> Q Exp -- | Generates a lambda expression which behaves like -- traceTextShowId (without requiring a TextShow -- instance). -- -- Since: 2 makeTraceTextShowId :: Name -> Q Exp -- | Generates a lambda expression which behaves like traceTextShowM -- (without requiring a TextShow instance). -- -- Since: 2 makeTraceTextShowM :: Name -> Q Exp -- | Generic versions of TextShow and TextShow1 class -- functions, as an alternative to TextShow.TH, which uses -- Template Haskell. Because there is no Generic2 class, -- TextShow2 cannot be implemented generically. -- -- This implementation is loosely based off of the -- Generics.Deriving.Show module from the -- generic-deriving library. -- -- Since: 2 module TextShow.Generic -- | A Generic implementation of showt. -- -- Since: 2 genericShowt :: (Generic a, GTextShowT Zero (Rep a)) => a -> Text -- | A Generic implementation of showtl. -- -- Since: 2 genericShowtl :: (Generic a, GTextShowTL Zero (Rep a)) => a -> Text -- | A Generic implementation of showPrect. -- -- Since: 2 genericShowtPrec :: (Generic a, GTextShowT Zero (Rep a)) => Int -> a -> Text -- | A Generic implementation of showtlPrec. -- -- Since: 2 genericShowtlPrec :: (Generic a, GTextShowTL Zero (Rep a)) => Int -> a -> Text -- | A Generic implementation of showtList. -- -- Since: 2 genericShowtList :: (Generic a, GTextShowT Zero (Rep a)) => [a] -> Text -- | A Generic implementation of showtlList. -- -- Since: 2 genericShowtlList :: (Generic a, GTextShowTL Zero (Rep a)) => [a] -> Text -- | A Generic implementation of showb. -- -- Since: 2 genericShowb :: (Generic a, GTextShowB Zero (Rep a)) => a -> Builder -- | A Generic implementation of showbPrec. -- -- Since: 2 genericShowbPrec :: (Generic a, GTextShowB Zero (Rep a)) => Int -> a -> Builder -- | A Generic implementation of showbList. -- -- Since: 2 genericShowbList :: (Generic a, GTextShowB Zero (Rep a)) => [a] -> Builder -- | A Generic implementation of printT. -- -- Since: 2 genericPrintT :: (Generic a, GTextShowT Zero (Rep a)) => a -> IO () -- | A Generic implementation of printTL. -- -- Since: 2 genericPrintTL :: (Generic a, GTextShowTL Zero (Rep a)) => a -> IO () -- | A Generic implementation of hPrintT. -- -- Since: 2 genericHPrintT :: (Generic a, GTextShowT Zero (Rep a)) => Handle -> a -> IO () -- | A Generic implementation of hPrintTL. -- -- Since: 2 genericHPrintTL :: (Generic a, GTextShowTL Zero (Rep a)) => Handle -> a -> IO () -- | A Generic1 implementation of genericLiftShowbPrec. -- -- Since: 2 genericLiftShowbPrec :: (Generic1 f, GTextShowB One (Rep1 f)) => (Int -> a -> Builder) -> ([a] -> Builder) -> Int -> f a -> Builder -- | A 'Generic'/'Generic1' implementation of showbPrec1. -- -- Since: 2 genericShowbPrec1 :: (Generic a, Generic1 f, GTextShowB Zero (Rep a), GTextShowB One (Rep1 f)) => Int -> f a -> Builder -- | Class of generic representation types that can be converted to a -- Builder. The arity type variable indicates which type -- class is used. GTextShowB Zero indicates -- TextShow behavior, and GTextShowB One -- indicates TextShow1 behavior. Since: 3.4 class GTextShowB arity f -- | This is used as the default generic implementation of showbPrec -- (if the arity is Zero) or liftShowbPrec (if the -- arity is One). gShowbPrec :: GTextShowB arity f => ShowFunsB arity a -> Int -> f a -> Builder -- | Class of generic representation types for which the ConType has -- been determined. The arity type variable indicates which type -- class is used. GTextShowConB Zero indicates -- TextShow behavior, and GTextShowConB One -- indicates TextShow1 behavior. class GTextShowConB arity f -- | Convert value of a specific ConType to a Builder with -- the given precedence. gShowbPrecCon :: GTextShowConB arity f => ConType -> ShowFunsB arity a -> Int -> f a -> Builder -- | A ShowFunsB value either stores nothing (for TextShow) -- or it stores the two function arguments that show occurrences of the -- type parameter (for TextShow1). Since: 3.4 data ShowFunsB arity a [NoShowFunsB] :: ShowFunsB Zero a [Show1FunsB] :: (Int -> a -> Builder) -> ([a] -> Builder) -> ShowFunsB One a -- | Class of generic representation types that can be converted to a -- Text. The arity type variable indicates which type -- class is used. GTextShowT Zero indicates -- TextShow behavior, and GTextShowT One -- indicates TextShow1 behavior. Since: 3.4 class GTextShowT arity f -- | This is used as the default generic implementation of showtPrec -- (if the arity is Zero) or liftShowtPrec (if the -- arity is One). gShowtPrec :: GTextShowT arity f => ShowFunsT arity a -> Int -> f a -> Text -- | Class of generic representation types for which the ConType has -- been determined. The arity type variable indicates which type -- class is used. GTextShowConT Zero indicates -- TextShow behavior, and GTextShowConT One -- indicates TextShow1 behavior. class GTextShowConT arity f -- | Convert value of a specific ConType to a Text with the -- given precedence. gShowtPrecCon :: GTextShowConT arity f => ConType -> ShowFunsT arity a -> Int -> f a -> Text -- | A ShowFunsT value either stores nothing (for TextShow) -- or it stores the two function arguments that show occurrences of the -- type parameter (for TextShow1). Since: 3.4 data ShowFunsT arity a [NoShowFunsT] :: ShowFunsT Zero a [Show1FunsT] :: (Int -> a -> Text) -> ([a] -> Text) -> ShowFunsT One a -- | Class of generic representation types that can be converted to a -- Text. The arity type variable indicates which type -- class is used. GTextShowTL Zero indicates -- TextShow behavior, and GTextShowTL One -- indicates TextShow1 behavior. Since: 3.4 class GTextShowTL arity f -- | This is used as the default generic implementation of -- showtlPrec (if the arity is Zero) or -- liftShowtlPrec (if the arity is One). gShowtlPrec :: GTextShowTL arity f => ShowFunsTL arity a -> Int -> f a -> Text -- | Class of generic representation types for which the ConType has -- been determined. The arity type variable indicates which type -- class is used. GTextShowConTL Zero indicates -- TextShow behavior, and GTextShowConTL -- One indicates TextShow1 behavior. class GTextShowConTL arity f -- | Convert value of a specific ConType to a Text with the -- given precedence. gShowtlPrecCon :: GTextShowConTL arity f => ConType -> ShowFunsTL arity a -> Int -> f a -> Text -- | A ShowFunsTL value either stores nothing (for TextShow) -- or it stores the two function arguments that show occurrences of the -- type parameter (for TextShow1). Since: 3.4 data ShowFunsTL arity a [NoShowFunsTL] :: ShowFunsTL Zero a [Show1FunsTL] :: (Int -> a -> Text) -> ([a] -> Text) -> ShowFunsTL One a -- | Class of generic representation types that represent a constructor -- with zero or more fields. class IsNullary f isNullary :: IsNullary f => f a -> Bool -- | Whether a constructor is a record (Rec), a tuple (Tup), -- is prefix (Pref), or infix (Inf). -- -- Since: 2 data ConType Rec :: ConType Tup :: ConType Pref :: ConType Inf :: String -> ConType -- | A type-level indicator that TextShow is being derived -- generically. -- -- Since: 3.2 data Zero -- | A type-level indicator that TextShow1 is being derived -- generically. -- -- Since: 3.2 data One instance TextShow.Classes.TextShow TextShow.Generic.ConType instance Language.Haskell.TH.Syntax.Lift TextShow.Generic.ConType instance GHC.Show.Show TextShow.Generic.ConType instance GHC.Read.Read TextShow.Generic.ConType instance GHC.Classes.Ord TextShow.Generic.ConType instance GHC.Generics.Generic TextShow.Generic.ConType instance GHC.Classes.Eq TextShow.Generic.ConType instance Data.Data.Data TextShow.Generic.ConType instance Data.Functor.Contravariant.Contravariant (TextShow.Generic.ShowFunsB arity) instance TextShow.Generic.GTextShowB arity f => TextShow.Generic.GTextShowB arity (GHC.Generics.D1 d f) instance TextShow.Generic.GTextShowB TextShow.Generic.Zero GHC.Generics.V1 instance TextShow.Generic.GTextShowB TextShow.Generic.One GHC.Generics.V1 instance (TextShow.Generic.GTextShowB arity f, TextShow.Generic.GTextShowB arity g) => TextShow.Generic.GTextShowB arity (f GHC.Generics.:+: g) instance (GHC.Generics.Constructor c, TextShow.Generic.GTextShowConB arity f, TextShow.Generic.IsNullary f) => TextShow.Generic.GTextShowB arity (GHC.Generics.C1 c f) instance TextShow.Generic.GTextShowConB arity GHC.Generics.U1 instance TextShow.Generic.GTextShowConB TextShow.Generic.One GHC.Generics.Par1 instance TextShow.Classes.TextShow c => TextShow.Generic.GTextShowConB arity (GHC.Generics.K1 i c) instance TextShow.Classes.TextShow1 f => TextShow.Generic.GTextShowConB TextShow.Generic.One (GHC.Generics.Rec1 f) instance (GHC.Generics.Selector s, TextShow.Generic.GTextShowConB arity f) => TextShow.Generic.GTextShowConB arity (GHC.Generics.S1 s f) instance (TextShow.Generic.GTextShowConB arity f, TextShow.Generic.GTextShowConB arity g) => TextShow.Generic.GTextShowConB arity (f GHC.Generics.:*: g) instance (TextShow.Classes.TextShow1 f, TextShow.Generic.GTextShowConB TextShow.Generic.One g) => TextShow.Generic.GTextShowConB TextShow.Generic.One (f GHC.Generics.:.: g) instance TextShow.Generic.GTextShowConB arity GHC.Generics.UChar instance TextShow.Generic.GTextShowConB arity GHC.Generics.UDouble instance TextShow.Generic.GTextShowConB arity GHC.Generics.UFloat instance TextShow.Generic.GTextShowConB arity GHC.Generics.UInt instance TextShow.Generic.GTextShowConB arity GHC.Generics.UWord instance Data.Functor.Contravariant.Contravariant (TextShow.Generic.ShowFunsT arity) instance TextShow.Generic.GTextShowT arity f => TextShow.Generic.GTextShowT arity (GHC.Generics.D1 d f) instance TextShow.Generic.GTextShowT TextShow.Generic.Zero GHC.Generics.V1 instance TextShow.Generic.GTextShowT TextShow.Generic.One GHC.Generics.V1 instance (TextShow.Generic.GTextShowT arity f, TextShow.Generic.GTextShowT arity g) => TextShow.Generic.GTextShowT arity (f GHC.Generics.:+: g) instance (GHC.Generics.Constructor c, TextShow.Generic.GTextShowConT arity f, TextShow.Generic.IsNullary f) => TextShow.Generic.GTextShowT arity (GHC.Generics.C1 c f) instance TextShow.Generic.GTextShowConT arity GHC.Generics.U1 instance TextShow.Generic.GTextShowConT TextShow.Generic.One GHC.Generics.Par1 instance TextShow.Classes.TextShow c => TextShow.Generic.GTextShowConT arity (GHC.Generics.K1 i c) instance TextShow.Classes.TextShow1 f => TextShow.Generic.GTextShowConT TextShow.Generic.One (GHC.Generics.Rec1 f) instance (GHC.Generics.Selector s, TextShow.Generic.GTextShowConT arity f) => TextShow.Generic.GTextShowConT arity (GHC.Generics.S1 s f) instance (TextShow.Generic.GTextShowConT arity f, TextShow.Generic.GTextShowConT arity g) => TextShow.Generic.GTextShowConT arity (f GHC.Generics.:*: g) instance (TextShow.Classes.TextShow1 f, TextShow.Generic.GTextShowConT TextShow.Generic.One g) => TextShow.Generic.GTextShowConT TextShow.Generic.One (f GHC.Generics.:.: g) instance TextShow.Generic.GTextShowConT arity GHC.Generics.UChar instance TextShow.Generic.GTextShowConT arity GHC.Generics.UDouble instance TextShow.Generic.GTextShowConT arity GHC.Generics.UFloat instance TextShow.Generic.GTextShowConT arity GHC.Generics.UInt instance TextShow.Generic.GTextShowConT arity GHC.Generics.UWord instance Data.Functor.Contravariant.Contravariant (TextShow.Generic.ShowFunsTL arity) instance TextShow.Generic.GTextShowTL arity f => TextShow.Generic.GTextShowTL arity (GHC.Generics.D1 d f) instance TextShow.Generic.GTextShowTL TextShow.Generic.Zero GHC.Generics.V1 instance TextShow.Generic.GTextShowTL TextShow.Generic.One GHC.Generics.V1 instance (TextShow.Generic.GTextShowTL arity f, TextShow.Generic.GTextShowTL arity g) => TextShow.Generic.GTextShowTL arity (f GHC.Generics.:+: g) instance (GHC.Generics.Constructor c, TextShow.Generic.GTextShowConTL arity f, TextShow.Generic.IsNullary f) => TextShow.Generic.GTextShowTL arity (GHC.Generics.C1 c f) instance TextShow.Generic.GTextShowConTL arity GHC.Generics.U1 instance TextShow.Generic.GTextShowConTL TextShow.Generic.One GHC.Generics.Par1 instance TextShow.Classes.TextShow c => TextShow.Generic.GTextShowConTL arity (GHC.Generics.K1 i c) instance TextShow.Classes.TextShow1 f => TextShow.Generic.GTextShowConTL TextShow.Generic.One (GHC.Generics.Rec1 f) instance (GHC.Generics.Selector s, TextShow.Generic.GTextShowConTL arity f) => TextShow.Generic.GTextShowConTL arity (GHC.Generics.S1 s f) instance (TextShow.Generic.GTextShowConTL arity f, TextShow.Generic.GTextShowConTL arity g) => TextShow.Generic.GTextShowConTL arity (f GHC.Generics.:*: g) instance (TextShow.Classes.TextShow1 f, TextShow.Generic.GTextShowConTL TextShow.Generic.One g) => TextShow.Generic.GTextShowConTL TextShow.Generic.One (f GHC.Generics.:.: g) instance TextShow.Generic.GTextShowConTL arity GHC.Generics.UChar instance TextShow.Generic.GTextShowConTL arity GHC.Generics.UDouble instance TextShow.Generic.GTextShowConTL arity GHC.Generics.UFloat instance TextShow.Generic.GTextShowConTL arity GHC.Generics.UInt instance TextShow.Generic.GTextShowConTL arity GHC.Generics.UWord instance TextShow.Generic.IsNullary GHC.Generics.U1 instance TextShow.Generic.IsNullary GHC.Generics.Par1 instance TextShow.Generic.IsNullary (GHC.Generics.K1 i c) instance TextShow.Generic.IsNullary f => TextShow.Generic.IsNullary (GHC.Generics.S1 s f) instance TextShow.Generic.IsNullary (GHC.Generics.Rec1 f) instance TextShow.Generic.IsNullary (f GHC.Generics.:*: g) instance TextShow.Generic.IsNullary (f GHC.Generics.:.: g) instance TextShow.Generic.IsNullary GHC.Generics.UChar instance TextShow.Generic.IsNullary GHC.Generics.UDouble instance TextShow.Generic.IsNullary GHC.Generics.UFloat instance TextShow.Generic.IsNullary GHC.Generics.UInt instance TextShow.Generic.IsNullary GHC.Generics.UWord -- | Functions that trace the values of Generic instances (even if -- they are not instances of TextShow). -- -- Since: 2 module TextShow.Debug.Trace.Generic -- | A Generic implementation of traceTextShow. -- -- Since: 2 genericTraceTextShow :: (Generic a, GTextShowT Zero (Rep a)) => a -> b -> b -- | A Generic implementation of traceTextShowId. -- -- Since: 2 genericTraceTextShowId :: (Generic a, GTextShowT Zero (Rep a)) => a -> a -- | A Generic implementation of traceShowM. -- -- Since: 2 genericTraceTextShowM :: (Generic a, GTextShowT Zero (Rep a), Applicative f) => a -> f () -- | Functions to mechanically derive TextShow, -- TextShow1, or TextShow2 instances, or to splice -- show-related expressions into Haskell source code. You need -- to enable the TemplateHaskell language extension in order to -- use this module. -- -- Since: 2 module TextShow.TH -- | Generates a TextShow instance declaration for the given data -- type or data family instance. -- -- Since: 2 deriveTextShow :: Name -> Q [Dec] -- | Generates a TextShow1 instance declaration for the given data -- type or data family instance. -- -- Since: 2 deriveTextShow1 :: Name -> Q [Dec] -- | Generates a TextShow2 instance declaration for the given data -- type or data family instance. -- -- Since: 2 deriveTextShow2 :: Name -> Q [Dec] -- | Generates a lambda expression which behaves like showt (without -- requiring a TextShow instance). -- -- Since: 2 makeShowt :: Name -> Q Exp -- | Generates a lambda expression which behaves like showtl -- (without requiring a TextShow instance). -- -- Since: 2 makeShowtl :: Name -> Q Exp -- | Generates a lambda expression which behaves like showtPrec -- (without requiring a TextShow instance). -- -- Since: 2 makeShowtPrec :: Name -> Q Exp -- | Generates a lambda expression which behaves like showtlPrec -- (without requiring a TextShow instance). -- -- Since: 2 makeShowtlPrec :: Name -> Q Exp -- | Generates a lambda expression which behaves like showtList -- (without requiring a TextShow instance). -- -- Since: 2 makeShowtList :: Name -> Q Exp -- | Generates a lambda expression which behaves like showtlList -- (without requiring a TextShow instance). -- -- Since: 2 makeShowtlList :: Name -> Q Exp -- | Generates a lambda expression which behaves like showb (without -- requiring a TextShow instance). -- -- Since: 2 makeShowb :: Name -> Q Exp -- | Generates a lambda expression which behaves like showbPrec -- (without requiring a TextShow instance). -- -- Since: 2 makeShowbPrec :: Name -> Q Exp -- | Generates a lambda expression which behaves like showbList -- (without requiring a TextShow instance). -- -- Since: 2 makeShowbList :: Name -> Q Exp -- | Generates a lambda expression which behaves like printT -- (without requiring a TextShow instance). -- -- Since: 2 makePrintT :: Name -> Q Exp -- | Generates a lambda expression which behaves like printTL -- (without requiring a TextShow instance). -- -- Since: 2 makePrintTL :: Name -> Q Exp -- | Generates a lambda expression which behaves like hPrintT -- (without requiring a TextShow instance). -- -- Since: 2 makeHPrintT :: Name -> Q Exp -- | Generates a lambda expression which behaves like hPrintTL -- (without requiring a TextShow instance). -- -- Since: 2 makeHPrintTL :: Name -> Q Exp -- | Generates a lambda expression which behaves like liftShowbPrec -- (without requiring a TextShow1 instance). -- -- Since: 3 makeLiftShowbPrec :: Name -> Q Exp -- | Generates a lambda expression which behaves like showbPrec1 -- (without requiring a TextShow1 instance). -- -- Since: 2 makeShowbPrec1 :: Name -> Q Exp -- | Generates a lambda expression which behaves like liftShowbPrec2 -- (without requiring a TextShow2 instance). -- -- Since: 3 makeLiftShowbPrec2 :: Name -> Q Exp -- | Generates a lambda expression which behaves like showbPrec2 -- (without requiring a TextShow2 instance). -- -- Since: 2 makeShowbPrec2 :: Name -> Q Exp -- | Options that specify how to derive TextShow instances using -- Template Haskell. -- -- Since: 3.4 data Options Options :: GenTextMethods -> Bool -> Options -- | When Template Haskell should generate definitions for methods which -- return Text? -- -- Since: 3.4 [genTextMethods] :: Options -> GenTextMethods -- | If True, derived instances for empty data types (i.e., ones -- with no data constructors) will use the EmptyCase language -- extension. If False, derived instances will simply use -- seq instead. (This has no effect on GHCs before 7.8, since -- EmptyCase is only available in 7.8 or later.) -- -- Since: 3.7 [emptyCaseBehavior] :: Options -> Bool -- | Sensible default Options. -- -- Since: 3.4 defaultOptions :: Options -- | When should Template Haskell generate implementations for the methods -- of TextShow which return Text? -- -- Since: 3.4 data GenTextMethods -- | Always generate them. AlwaysTextMethods :: GenTextMethods -- | Only generate when text-show feels it's appropriate. SometimesTextMethods :: GenTextMethods -- | Never generate them under any circumstances. NeverTextMethods :: GenTextMethods -- | Like deriveTextShow, but takes an Options argument. -- -- Since: 3.4 deriveTextShowOptions :: Options -> Name -> Q [Dec] -- | Like deriveTextShow1, but takes an Options argument. -- -- Since: 3.4 deriveTextShow1Options :: Options -> Name -> Q [Dec] -- | Like deriveTextShow2, but takes an Options argument. -- -- Since: 3.4 deriveTextShow2Options :: Options -> Name -> Q [Dec] instance TextShow.Classes.TextShow TextShow.Options.GenTextMethods instance TextShow.Classes.TextShow TextShow.Options.Options -- | Efficiently convert from values to Text via Builders. -- -- Since: 2 module TextShow -- | Conversion of values to Text. Because there are both strict -- and lazy Text variants, the TextShow class -- deliberately avoids using Text in its functions. Instead, -- showbPrec, showb, and showbList all return -- Builder, an efficient intermediate form that can be converted -- to either kind of Text. -- -- Builder is a Monoid, so it is useful to use the -- mappend (or <>) function to combine -- Builders when creating TextShow instances. As an -- example: -- --
-- import Data.Monoid -- import TextShow -- -- data Example = Example Int Int -- instance TextShow Example where -- showb (Example i1 i2) = showb i1 <> showbSpace <> showb i2 ---- -- If you do not want to create TextShow instances manually, you -- can alternatively use the TextShow.TH module to automatically -- generate default TextShow instances using Template Haskell, or -- the TextShow.Generic module to quickly define TextShow -- instances using genericShowbPrec. -- -- Since: 2 class TextShow a where showbPrec _ = showb showb = showbPrec 0 showbList = showbListWith showb showtPrec p = toStrict . showtlPrec p showt = showtPrec 0 showtList = toStrict . showtlList showtlPrec p = toLazyText . showbPrec p showtl = showtlPrec 0 showtlList = toLazyText . showbList -- | Convert a value to a Builder with the given predence. -- -- Since: 2 showbPrec :: TextShow a => Int -> a -> Builder -- | Converts a value to a strict Text. If you hand-define this, it -- should satisfy: -- --
-- showb = showbPrec 0 ---- -- Since: 2 showb :: TextShow a => a -> Builder -- | Converts a list of values to a Builder. By default, this is -- defined as 'showbList = showbListWith showb, -- but it can be overridden to allow for specialized displaying of lists -- (e.g., lists of Chars). -- -- Since: 2 showbList :: TextShow a => [a] -> Builder -- | Converts a value to a strict Text with the given precedence. -- This can be overridden for efficiency, but it should satisfy: -- --
-- showtPrec p = toStrict . showtlPrec p ---- -- Since: 3 showtPrec :: TextShow a => Int -> a -> Text -- | Converts a value to a strict Text. This can be overridden for -- efficiency, but it should satisfy: -- --
-- showt = showtPrec 0 -- showt = toStrict . showtl ---- -- The first equation is the default definition of showt. -- -- Since: 3 showt :: TextShow a => a -> Text -- | Converts a list of values to a strict Text. This can be -- overridden for efficiency, but it should satisfy: -- --
-- showtList = toStrict . showtlList ---- -- Since: 3 showtList :: TextShow a => [a] -> Text -- | Converts a value to a lazy Text with the given precedence. This -- can be overridden for efficiency, but it should satisfy: -- --
-- showtlPrec p = toLazyText . showbPrec p ---- -- Since: 3 showtlPrec :: TextShow a => Int -> a -> Text -- | Converts a value to a lazy Text. This can be overridden for -- efficiency, but it should satisfy: -- --
-- showtl = showtlPrec 0 -- showtl = toLazyText . showb ---- -- The first equation is the default definition of showtl. -- -- Since: 3 showtl :: TextShow a => a -> Text -- | Converts a list of values to a lazy Text. This can be -- overridden for efficiency, but it should satisfy: -- --
-- showtlList = toLazyText . showbList ---- -- Since: 3 showtlList :: TextShow a => [a] -> Text -- | Surrounds Builder output with parentheses if the Bool -- parameter is True. -- -- Since: 2 showbParen :: Bool -> Builder -> Builder -- | Surrounds strict Text output with parentheses if the -- Bool parameter is True. -- -- Since: 3.4 showtParen :: Bool -> Text -> Text -- | Surrounds lazy Text output with parentheses if the Bool -- parameter is True. -- -- Since: 3.4 showtlParen :: Bool -> Text -> Text -- | Construct a Builder containing a comma followed by a space. -- -- Since: 3.6 showbCommaSpace :: Builder -- | Construct a strict Text containing a comma followed by a space. -- -- Since: 3.6 showtCommaSpace :: Text -- | Construct a lazy Text containing a comma followed by a space. -- -- Since: 3.6 showtlCommaSpace :: Text -- | Construct a Builder containing a single space character. -- -- Since: 2 showbSpace :: Builder -- | Construct a strict Text containing a single space character. -- -- Since: 3.4 showtSpace :: Text -- | Construct a lazy Text containing a single space character. -- -- Since: 3.4 showtlSpace :: Text -- | Lifting of the TextShow class to unary type constructors. -- -- Since: 2 class TextShow1 f where liftShowbList sp sl = showbListWith (liftShowbPrec sp sl 0) -- | showbPrec function for an application of the type constructor -- based on showbPrec and showbList functions for the -- argument type. -- -- Since: 3 liftShowbPrec :: TextShow1 f => (Int -> a -> Builder) -> ([a] -> Builder) -> Int -> f a -> Builder -- | showbList function for an application of the type constructor -- based on showbPrec and showbList functions for the -- argument type. The default implementation using standard list syntax -- is correct for most types. -- -- Since: 3 liftShowbList :: TextShow1 f => (Int -> a -> Builder) -> ([a] -> Builder) -> [f a] -> Builder -- | Lift the standard showbPrec and showbList functions -- through the type constructor. -- -- Since: 2 showbPrec1 :: (TextShow1 f, TextShow a) => Int -> f a -> Builder -- | showbUnaryWith sp n p x produces the Builder -- representation of a unary data constructor with name n and -- argument x, in precedence context p, using the -- function sp to show occurrences of the type argument. -- -- Since: 2 showbUnaryWith :: (Int -> a -> Builder) -> Builder -> Int -> a -> Builder -- | showtPrec function for an application of the type constructor -- based on showtPrec and showtList functions for the -- argument type. -- -- The current implementation is based on liftShowbPrec -- internally. -- -- Since: 3.4 liftShowtPrec :: TextShow1 f => (Int -> a -> Text) -> ([a] -> Text) -> Int -> f a -> Text -- | showtlPrec function for an application of the type constructor -- based on showtlPrec and showtlList functions for the -- argument type. -- -- The current implementation is based on liftShowbPrec -- internally. -- -- Since: 3.4 liftShowtlPrec :: TextShow1 f => (Int -> a -> Text) -> ([a] -> Text) -> Int -> f a -> Text -- | Lifting of the TextShow class to binary type constructors. -- -- Since: 2 class TextShow2 f where liftShowbList2 sp1 sl1 sp2 sl2 = showbListWith (liftShowbPrec2 sp1 sl1 sp2 sl2 0) -- | showbPrec function for an application of the type constructor -- based on showbPrec and showbList functions for the -- argument types. -- -- Since: 3 liftShowbPrec2 :: TextShow2 f => (Int -> a -> Builder) -> ([a] -> Builder) -> (Int -> b -> Builder) -> ([b] -> Builder) -> Int -> f a b -> Builder -- | showbList function for an application of the type constructor -- based on showbPrec and showbList functions for the -- argument types. The default implementation using standard list syntax -- is correct for most types. -- -- Since: 3 liftShowbList2 :: TextShow2 f => (Int -> a -> Builder) -> ([a] -> Builder) -> (Int -> b -> Builder) -> ([b] -> Builder) -> [f a b] -> Builder -- | Lift two showbPrec functions through the type constructor. -- -- Since: 2 showbPrec2 :: (TextShow2 f, TextShow a, TextShow b) => Int -> f a b -> Builder -- | showbBinaryWith sp n p x y produces the Builder -- representation of a binary data constructor with name n and -- arguments x and y, in precedence context p, -- using the functions sp1 and sp2 to show occurrences -- of the type arguments. -- -- Since: 2 showbBinaryWith :: (Int -> a -> Builder) -> (Int -> b -> Builder) -> Builder -> Int -> a -> b -> Builder -- | showtPrec function for an application of the type constructor -- based on showtPrec and showtList functions for the -- argument type. -- -- The current implementation is based on liftShowbPrec2 -- internally. -- -- Since: 3.4 liftShowtPrec2 :: TextShow2 f => (Int -> a -> Text) -> ([a] -> Text) -> (Int -> b -> Text) -> ([b] -> Text) -> Int -> f a b -> Text -- | showtlPrec function for an application of the type constructor -- based on showtlPrec and showtlList functions for the -- argument type. -- -- The current implementation is based on liftShowbPrec2 -- internally. -- -- Since: 3.4 liftShowtlPrec2 :: TextShow2 f => (Int -> a -> Text) -> ([a] -> Text) -> (Int -> b -> Text) -> ([b] -> Text) -> Int -> f a b -> Text -- | A Builder is an efficient way to build lazy Text -- values. There are several functions for constructing builders, but -- only one to inspect them: to extract any data, you have to turn them -- into lazy Text values using toLazyText. -- -- Internally, a builder constructs a lazy Text by filling -- arrays piece by piece. As each buffer is filled, it is 'popped' off, -- to become a new chunk of the resulting lazy Text. All this is -- hidden from the user of the Builder. data Builder :: * -- | Convert a Builder to a strict Text. -- -- Since: 2 toText :: Builder -> Text -- | O(n). Extract a lazy Text from a Builder with -- a default buffer size. The construction work takes place if and when -- the relevant part of the lazy Text is demanded. toLazyText :: Builder -> Text -- | O(n). Extract a lazy Text from a Builder, -- using the given size for the initial buffer. The construction work -- takes place if and when the relevant part of the lazy Text is -- demanded. -- -- If the initial buffer is too small to hold all data, subsequent -- buffers will be the default buffer size. toLazyTextWith :: Int -> Builder -> Text -- | Convert a Builder to a String (without surrounding it -- with double quotes, as show would). -- -- Since: 2 toString :: Builder -> String -- | O(1). A Builder taking a single character, satisfying -- --
toLazyText (singleton c) = singleton -- c
toLazyText (fromText t) = fromChunks -- [t]
toLazyText (fromLazyText t) = t
toLazyText (fromString s) = fromChunks -- [S.pack s]
-- showbPrec p (FromStringShow x) = showsToShowb showsPrec p x ---- -- Since: 2 newtype FromStringShow a FromStringShow :: a -> FromStringShow a [fromStringShow] :: FromStringShow a -> a -- | The String Show instance for FromTextShow is -- based on its TextShow instance. That is, -- --
-- showsPrec p (FromTextShow x) = showbToShows showbPrec p x ---- -- Since: 2 newtype FromTextShow a FromTextShow :: a -> FromTextShow a [fromTextShow] :: FromTextShow a -> a -- | The TextShow1 instance for FromStringShow1 is based on -- its String Show1 instance. That is, -- --
-- liftShowbPrec sp sl p (FromStringShow1 x) = -- showsPrecToShowbPrec (liftShowsPrec (showbPrecToShowsPrec sp) -- (showbToShows sl)) -- p x ---- -- Since: 3 newtype FromStringShow1 f a FromStringShow1 :: f a -> FromStringShow1 f a [fromStringShow1] :: FromStringShow1 f a -> f a -- | The String Show1 instance for FromTextShow1 is -- based on its TextShow1 instance. That is, -- --
-- liftShowsPrec sp sl p (FromTextShow1 x) = -- showbPrecToShowsPrec (liftShowbPrec (showsPrecToShowbPrec sp) -- (showsToShowb sl)) -- p x ---- -- Since: 3 newtype FromTextShow1 f a FromTextShow1 :: f a -> FromTextShow1 f a [fromTextShow1] :: FromTextShow1 f a -> f a -- | The TextShow2 instance for FromStringShow2 is based on -- its String Show2 instance. That is, -- --
-- liftShowbPrec2 sp1 sl1 sp2 sl2 p (FromStringShow2 x) = -- showsPrecToShowbPrec (liftShowsPrec2 (showbPrecToShowsPrec sp1) -- (showbToShows sl1) -- (showbPrecToShowsPrec sp2) -- (showbToShows sl2)) -- p x ---- -- Since: 3 newtype FromStringShow2 f a b FromStringShow2 :: f a b -> FromStringShow2 f a b [fromStringShow2] :: FromStringShow2 f a b -> f a b -- | The String Show2 instance for FromTextShow2 is -- based on its TextShow2 instance. That is, -- --
-- liftShowsPrec2 sp1 sl1 sp2 sl2 p (FromTextShow2 x) = -- showbPrecToShowsPrec (liftShowbPrec2 (showsPrecToShowbPrec sp1) -- (showsToShowb sl1) -- (showsPrecToShowbPrec sp2) -- (showsToShowb sl2)) -- p x ---- -- Since: 3 newtype FromTextShow2 f a b FromTextShow2 :: f a b -> FromTextShow2 f a b [fromTextShow2] :: FromTextShow2 f a b -> f a b -- | Convert a precedence-aware ShowS-based show function to a -- Builder-based one. -- -- Since: 3 showsPrecToShowbPrec :: (Int -> a -> ShowS) -> Int -> a -> Builder -- | Convert a ShowS-based show function to a Builder-based -- one. -- -- Since: 3 showsToShowb :: (a -> ShowS) -> a -> Builder -- | Convert a precedence-aware Builder-based show function to a -- ShowS-based one. -- -- Since: 3 showbPrecToShowsPrec :: (Int -> a -> Builder) -> Int -> a -> ShowS -- | Convert a Builder-based show function to a ShowS-based -- one. -- -- Since: 3 showbToShows :: (a -> Builder) -> a -> ShowS -- | Convert a precedence-aware, strict Text-based show function to -- a Builder-based one. -- -- Since: 3.4 showtPrecToShowbPrec :: (Int -> a -> Text) -> Int -> a -> Builder -- | Convert a precedence-aware, lazy Text-based show function to a -- Builder-based one. -- -- Since: 3.4 showtlPrecToShowbPrec :: (Int -> a -> Text) -> Int -> a -> Builder -- | Convert a strict Text-based show function to a -- Builder-based one. -- -- Since: 3.4 showtToShowb :: (a -> Text) -> a -> Builder -- | Convert a lazy Text-based show function to a -- Builder-based one. -- -- Since: 3.4 showtlToShowb :: (a -> Text) -> a -> Builder -- | Convert a precedence-aware Builder-based show function to a -- strict Text-based one. -- -- Since: 3.4 showbPrecToShowtPrec :: (Int -> a -> Builder) -> Int -> a -> Text -- | Convert a precedence-aware Builder-based show function to a -- lazy Text-based one. -- -- Since: 3.4 showbPrecToShowtlPrec :: (Int -> a -> Builder) -> Int -> a -> Text -- | Convert a Builder-based show function to a strict -- Text-based one. -- -- Since: 3 showbToShowt :: (a -> Builder) -> a -> Text -- | Convert a Builder-based show function to a lazy -- Text-based one. -- -- Since: 3 showbToShowtl :: (a -> Builder) -> a -> Text