-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Efficient conversion of values into Text -- @package text-show @version 0.7 -- | Monomorphic Show functions for concurrency-related data types. -- -- Since: 0.3 module Text.Show.Text.Control.Concurrent -- | Convert a ThreadId to a Builder with the given -- precedence. -- -- Since: 0.3 showbThreadIdPrec :: Int -> ThreadId -> Builder -- | Convert a ThreadStatus to a Builder with the given -- precedence. -- -- Since: 0.3 showbThreadStatusPrec :: Int -> ThreadStatus -> Builder -- | Convert a BlockReason to a Builder. -- -- Since: 0.3 showbBlockReason :: BlockReason -> Builder instance Show BlockReason instance Show ThreadStatus instance Show ThreadId -- | Monomorphic Show functions for Exceptions. -- -- Since: 0.3 module Text.Show.Text.Control.Exception -- | Convert a SomeException value to a Builder with the -- given precedence. -- -- Since: 0.3 showbSomeExceptionPrec :: Int -> SomeException -> Builder -- | Convert an IOException to a Builder. -- -- Since: 0.3 showbIOException :: IOException -> Builder -- | Convert an ArithException to a Builder. -- -- Since: 0.3 showbArithException :: ArithException -> Builder -- | Convert an ArrayException to a Builder. -- -- Since: 0.3 showbArrayException :: ArrayException -> Builder -- | Convert an AssertionFailed exception to a Builder. -- -- Since: 0.3 showbAssertionFailed :: AssertionFailed -> Builder -- | Convert a SomeAsyncException value to a Builder. This -- function is only available with base-4.7.0.0 or later. -- -- Since: 0.3 showbSomeAsyncException :: SomeAsyncException -> Builder -- | Convert an AsyncException to a Builder. -- -- Since: 0.3 showbAsyncException :: AsyncException -> Builder -- | Convert a NonTermination exception to a Builder. -- -- Since: 0.3 showbNonTermination :: NonTermination -> Builder -- | Convert a NestedAtomically exception to a Builder. -- -- Since: 0.3 showbNestedAtomically :: NestedAtomically -> Builder -- | Convert a BlockedIndefinitelyOnMVar exception to a -- Builder. -- -- Since: 0.3 showbBlockedIndefinitelyOnMVar :: BlockedIndefinitelyOnMVar -> Builder -- | Convert a BlockedIndefinitelyOnSTM exception to a -- Builder. -- -- Since: 0.3 showbBlockedIndefinitelyOnSTM :: BlockedIndefinitelyOnSTM -> Builder -- | Convert a Deadlock exception to a Builder. -- -- Since: 0.3 showbDeadlock :: Deadlock -> Builder -- | Convert a NoMethodError to a Builder. -- -- Since: 0.3 showbNoMethodError :: NoMethodError -> Builder -- | Convert a PatternMatchFail to a Builder. -- -- Since: 0.3 showbPatternMatchFail :: PatternMatchFail -> Builder -- | Convert a RecConError to a Builder. -- -- Since: 0.3 showbRecConError :: RecConError -> Builder -- | Convert a RecSelError to a Builder. -- -- Since: 0.3 showbRecSelError :: RecSelError -> Builder -- | Convert a RecUpdError to a Builder. -- -- Since: 0.3 showbRecUpdError :: RecUpdError -> Builder -- | Convert an ErrorCall to a Builder. -- -- Since: 0.3 showbErrorCall :: ErrorCall -> Builder -- | Convert a MaskingState to a Builder. -- -- Since: 0.4 showbMaskingState :: MaskingState -> Builder instance Show MaskingState instance Show ErrorCall instance Show RecUpdError instance Show RecSelError instance Show RecConError instance Show PatternMatchFail instance Show NoMethodError instance Show Deadlock instance Show BlockedIndefinitelyOnSTM instance Show BlockedIndefinitelyOnMVar instance Show NestedAtomically instance Show NonTermination instance Show AsyncException instance Show SomeAsyncException instance Show AssertionFailed instance Show ArrayException instance Show ArithException instance Show IOException instance Show SomeException -- | Monomorphic Show functions for strict ST values. -- -- Since: 0.3 module Text.Show.Text.Control.Monad.ST -- | Convert a strict ST value to a Builder. -- -- Since: 0.3 showbST :: ST s a -> Builder instance Show1 (ST s) instance Show (ST s a) -- | Monomorphic Show functions for tuple types. -- -- Since: 0.3 module Text.Show.Text.Data.Tuple -- | Converts () into a Builder. -- -- Since: 0.3 showbUnit :: () -> Builder -- | Converts a 2-tuple into a Builder. -- -- Since: 0.3 showb2Tuple :: (Show a, Show b) => (a, b) -> Builder -- | Converts a 3-tuple into a Builder. -- -- Since: 0.3 showb3Tuple :: (Show a, Show b, Show c) => (a, b, c) -> Builder -- | Converts a 4-tuple into a Builder. -- -- Since: 0.3 showb4Tuple :: (Show a, Show b, Show c, Show d) => (a, b, c, d) -> Builder -- | Converts a 5-tuple into a Builder. -- -- Since: 0.3 showb5Tuple :: (Show a, Show b, Show c, Show d, Show e) => (a, b, c, d, e) -> Builder -- | Converts a 6-tuple into a Builder. -- -- Since: 0.3 showb6Tuple :: (Show a, Show b, Show c, Show d, Show e, Show f) => (a, b, c, d, e, f) -> Builder -- | Converts a 7-tuple into a Builder. -- -- Since: 0.3 showb7Tuple :: (Show a, Show b, Show c, Show d, Show e, Show f, Show g) => (a, b, c, d, e, f, g) -> Builder -- | Converts an 8-tuple into a Builder. -- -- Since: 0.3 showb8Tuple :: (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h) => (a, b, c, d, e, f, g, h) -> Builder -- | Converts a 9-tuple into a Builder. -- -- Since: 0.3 showb9Tuple :: (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i) => (a, b, c, d, e, f, g, h, i) -> Builder -- | Converts a 10-tuple into a Builder. -- -- Since: 0.3 showb10Tuple :: (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j) => (a, b, c, d, e, f, g, h, i, j) -> Builder -- | Converts an 11-tuple into a Builder. -- -- Since: 0.3 showb11Tuple :: (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k) => (a, b, c, d, e, f, g, h, i, j, k) -> Builder -- | Converts a 12-tuple into a Builder. -- -- Since: 0.3 showb12Tuple :: (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l) => (a, b, c, d, e, f, g, h, i, j, k, l) -> Builder -- | Converts a 13-tuple into a Builder. -- -- Since: 0.3 showb13Tuple :: (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m) => (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Builder -- | Converts a 14-tuple into a Builder. -- -- Since: 0.3 showb14Tuple :: (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Builder -- | Converts a 15-tuple into a Builder. -- -- Since: 0.3 showb15Tuple :: (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o) => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Builder instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n) => Show1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n) instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m) => Show1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m) instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l) => Show1 ((,,,,,,,,,,,,) a b c d e f g h i j k l) instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k) => Show1 ((,,,,,,,,,,,) a b c d e f g h i j k) instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j) => Show1 ((,,,,,,,,,,) a b c d e f g h i j) instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i) => Show1 ((,,,,,,,,,) a b c d e f g h i) instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h) => Show1 ((,,,,,,,,) a b c d e f g h) instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g) => Show1 ((,,,,,,,) a b c d e f g) instance (Show a, Show b, Show c, Show d, Show e, Show f) => Show1 ((,,,,,,) a b c d e f) instance (Show a, Show b, Show c, Show d, Show e) => Show1 ((,,,,,) a b c d e) instance (Show a, Show b, Show c, Show d) => Show1 ((,,,,) a b c d) instance (Show a, Show b, Show c) => Show1 ((,,,) a b c) instance (Show a, Show b) => Show1 ((,,) a b) instance Show a => Show1 ((,) a) instance (Show a0, Show b0, Show c0, Show d0, Show e0, Show f0, Show g0, Show h0, Show i0, Show j0, Show k0, Show l0, Show m0, Show n0, Show o0) => Show (a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0) instance (Show a0, Show b0, Show c0, Show d0, Show e0, Show f0, Show g0, Show h0, Show i0, Show j0, Show k0, Show l0, Show m0, Show n0) => Show (a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0) instance (Show a0, Show b0, Show c0, Show d0, Show e0, Show f0, Show g0, Show h0, Show i0, Show j0, Show k0, Show l0, Show m0) => Show (a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0) instance (Show a0, Show b0, Show c0, Show d0, Show e0, Show f0, Show g0, Show h0, Show i0, Show j0, Show k0, Show l0) => Show (a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0) instance (Show a0, Show b0, Show c0, Show d0, Show e0, Show f0, Show g0, Show h0, Show i0, Show j0, Show k0) => Show (a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0) instance (Show a0, Show b0, Show c0, Show d0, Show e0, Show f0, Show g0, Show h0, Show i0, Show j0) => Show (a0, b0, c0, d0, e0, f0, g0, h0, i0, j0) instance (Show a0, Show b0, Show c0, Show d0, Show e0, Show f0, Show g0, Show h0, Show i0) => Show (a0, b0, c0, d0, e0, f0, g0, h0, i0) instance (Show a0, Show b0, Show c0, Show d0, Show e0, Show f0, Show g0, Show h0) => Show (a0, b0, c0, d0, e0, f0, g0, h0) instance (Show a0, Show b0, Show c0, Show d0, Show e0, Show f0, Show g0) => Show (a0, b0, c0, d0, e0, f0, g0) instance (Show a0, Show b0, Show c0, Show d0, Show e0, Show f0) => Show (a0, b0, c0, d0, e0, f0) instance (Show a0, Show b0, Show c0, Show d0, Show e0) => Show (a0, b0, c0, d0, e0) instance (Show a0, Show b0, Show c0, Show d0) => Show (a0, b0, c0, d0) instance (Show a0, Show b0, Show c0) => Show (a0, b0, c0) instance (Show a0, Show b0) => Show (a0, b0) instance Show () -- | Monomorphic Show function for Bool values. -- -- Since: 0.3 module Text.Show.Text.Data.Bool -- | Convert a Bool to a Builder. -- -- Since: 0.3 showbBool :: Bool -> Builder instance Show Bool -- | Monomorphic Show functions for data types in the -- bytestring library. -- -- Since: 0.3 module Text.Show.Text.Data.ByteString -- | Convert a strict ByteString to a Builder. -- -- Since: 0.3 showbByteStringStrict :: ByteString -> Builder -- | Convert a lazy ByteString to a Builder. -- -- Since: 0.3 showbByteStringLazy :: ByteString -> Builder -- | Convert a lazy ByteString to a Builder with the given -- precedence. -- -- With bytestring-0.10.0.0 or later, this function ignores the -- precedence argument, since lazy ByteStrings are printed out -- identically to Strings. On earlier versions of -- bytestring, however, lazy ByteStrings can be printed -- with parentheses (e.g., Chunk "example" Empty vs. (Chunk -- "example" Empty)) depending on the precedence. -- -- Since: 0.3 showbByteStringLazyPrec :: Int -> ByteString -> Builder -- | Convert a ShortByteString to a Builder. -- -- Since: 0.7 showbShortByteString :: ShortByteString -> Builder instance Show ShortByteString instance Show ByteString instance Show ByteString -- | Monomorphic Show functions for integral types. -- -- Since: 0.3 module Text.Show.Text.Data.Integral -- | Convert an Int to a Builder with the given precedence. -- -- Since: 0.3 showbIntPrec :: Int -> Int -> Builder -- | Convert an Int8 to a Builder with the given precedence. -- -- Since: 0.3 showbInt8Prec :: Int -> Int8 -> Builder -- | Convert an Int16 to a Builder with the given precedence. -- -- Since: 0.3 showbInt16Prec :: Int -> Int16 -> Builder -- | Convert an Int32 to a Builder with the given precedence. -- -- Since: 0.3 showbInt32Prec :: Int -> Int32 -> Builder -- | Convert an Int64 to a Builder with the given precedence. -- -- Since: 0.3 showbInt64Prec :: Int -> Int64 -> Builder -- | Convert an Integer to a Builder with the given -- precedence. -- -- Since: 0.3 showbIntegerPrec :: Int -> Integer -> Builder -- | Convert an Integral type to a Builder with the given -- precedence. -- -- Since: 0.3 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: 0.3 showbIntAtBase :: (Integral a, Show a) => a -> (Int -> Char) -> a -> Builder -- | Show non-negative Integral numbers in base 2. -- -- Since: 0.3 showbBin :: (Integral a, Show a) => a -> Builder -- | Show non-negative Integral numbers in base 16. -- -- Since: 0.3 showbHex :: (Integral a, Show a) => a -> Builder -- | Show non-negative Integral numbers in base 8. -- -- Since: 0.3 showbOct :: (Integral a, Show a) => a -> Builder -- | Convert a Word to a Builder with the given precedence. -- -- Since: 0.3 showbWord :: Word -> Builder -- | Convert a Word8 to a Builder with the given precedence. -- -- Since: 0.3 showbWord8 :: Word8 -> Builder -- | Convert a Word16 to a Builder with the given precedence. -- -- Since: 0.3 showbWord16 :: Word16 -> Builder -- | Convert a Word32 to a Builder with the given precedence. -- -- Since: 0.3 showbWord32 :: Word32 -> Builder -- | Convert a Word64 to a Builder with the given precedence. -- -- Since: 0.3 showbWord64 :: Word64 -> Builder instance Show Word64 instance Show Word32 instance Show Word16 instance Show Word8 instance Show Word instance Show Integer instance Show Int64 instance Show Int32 instance Show Int16 instance Show Int8 instance Show Int -- | Monomorphic Show functions for Char and String. -- -- Since: 0.3 module Text.Show.Text.Data.Char -- | Convert a Char to a Builder (surrounded by single -- quotes). -- -- Since: 0.3 showbChar :: Char -> Builder -- | Convert a Char to a Builder (without single quotes). -- -- Since: 0.3 showbLitChar :: Char -> Builder -- | Convert a String to a Builder (surrounded by double -- quotes). -- -- Since: 0.3 showbString :: String -> Builder -- | Convert a String to a Builder (without double quotes). -- -- Since: 0.3 showbLitString :: String -> Builder -- | Convert a GeneralCategory to a Builder. -- -- Since: 0.3 showbGeneralCategory :: GeneralCategory -> Builder -- | A table of ASCII control characters that needs to be escaped with a -- backslash. -- -- Since: 0.5 asciiTabB :: Array Int Builder instance Show GeneralCategory instance Show Char -- | Exports showbListWith. module Text.Show.Text.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 :: (a -> Builder) -> [a] -> Builder instance Show1 [] instance Show a => Show [a] -- | Monomorphic Show function for ZipList. -- -- Since: 0.3 module Text.Show.Text.Control.Applicative showbConstPrec :: Show a => Int -> Const a b -> Builder -- | Convert a ZipList to a Builder with the given -- precedence. -- -- Since: 0.3 showbZipListPrec :: Show a => Int -> ZipList a -> Builder instance Show1 ZipList instance Show a0 => Show (ZipList a0) instance Show a => Show1 (Const a) instance Show a => Show (Const a b) -- | Monomorphic Show function for Array values. -- -- Since: 0.3 module Text.Show.Text.Data.Array -- | Convert an Array value to a Builder with the given -- precedence. -- -- Since: 0.3 showbArrayPrec :: (Show i, Show e, Ix i) => Int -> Array i e -> Builder -- | Convert a UArray value to a Builder with the given -- precedence. -- -- Since: 0.7 showbUArrayPrec :: (IArray UArray e, Ix i, Show i, Show e) => Int -> UArray i e -> Builder -- | Convert an IArray instance to a Builder with the given -- precedence. -- -- Since: 0.7 showbIArrayPrec :: (IArray a e, Ix i, Show i, Show e) => Int -> a i e -> Builder instance (IArray UArray e, Ix i, Show i, Show e) => Show (UArray i e) instance (Show i, Show e, Ix i) => Show (Array i e) -- | Monomorphic Show functions for floating-point types. -- -- Since: 0.3 module Text.Show.Text.Data.Floating -- | Convert a RealFloat value to a Builder with the given -- precedence. -- -- Since: 0.3 showbRealFloatPrec :: RealFloat a => Int -> a -> Builder -- | Convert a Float to a Builder with the given precedence. -- -- Since: 0.3 showbFloatPrec :: Int -> Float -> Builder -- | Convert a Double to a Builder with the given precedence. -- -- Since: 0.3 showbDoublePrec :: Int -> Double -> 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: 0.3 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: 0.3 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: 0.3 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: 0.3 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: 0.3 showbGFloatAlt :: RealFloat a => Maybe Int -> a -> Builder instance Show Double instance Show Float -- | Monomorphic Show function for Ratio values. -- -- Since: 0.5 module Text.Show.Text.Data.Complex -- | Convert a Complex value to a Builder with the given -- precedence. -- -- Since: 0.5 showbComplexPrec :: Show a => Int -> Complex a -> Builder instance Show1 Complex instance Show a0 => Show (Complex a0) -- | Monomorphic Show function for Ratio values. -- -- Since: 0.5 module Text.Show.Text.Data.Ratio -- | Convert a Ratio to a Builder with the given precedence. -- -- Since: 0.5 showbRatioPrec :: (Show a, Integral a) => Int -> Ratio a -> Builder instance (Show a, Integral a) => Show (Ratio a) -- | Monomorphic Show functions for data types in the -- Data.Data module. -- -- Since: 0.3 module Text.Show.Text.Data.Data -- | Convert a Constr to a Builder. -- -- Since: 0.3 showbConstr :: Constr -> Builder -- | Convert a ConstrRep to a Builder with the given -- precedence. -- -- Since: 0.3 showbConstrRepPrec :: Int -> ConstrRep -> Builder -- | Convert a DataRep to a Builder with the given -- precedence. -- -- Since: 0.3 showbDataRepPrec :: Int -> DataRep -> Builder -- | Convert a DataType to a Builder with the given -- precedence. -- -- Since: 0.3 showbDataTypePrec :: Int -> DataType -> Builder -- | Convert a Fixity value to a Builder. -- -- Since: 0.3 showbFixity :: Fixity -> Builder instance Show Constr instance Show Fixity instance Show ConstrRep instance Show DataRep instance Show DataType -- | Monomorphic Show function for Either values. -- -- Since: 0.3 module Text.Show.Text.Data.Either -- | Convert a Either value to a Builder with the given -- precedence. -- -- Since: 0.3 showbEitherPrec :: (Show a, Show b) => Int -> Either a b -> Builder instance Show a => Show1 (Either a) instance (Show a0, Show b0) => Show (Either a0 b0) -- | Monomorphic Show function for Fixed values. -- -- Since: 0.3 module Text.Show.Text.Data.Fixed -- | Convert a Fixed value to a Builder, where the first -- argument indicates whether to chop off trailing zeroes. -- -- Since: 0.3 showbFixed :: HasResolution a => Bool -> Fixed a -> Builder instance HasResolution a => Show (Fixed a) -- | Monomorphic Show function for Identity values. -- -- Since: 0.5 module Text.Show.Text.Data.Functor.Identity -- | Convert an Identity value to a Builder with the given -- precedence. -- -- Since: 0.5 showbIdentityPrec :: Show a => Int -> Identity a -> Builder instance Show1 Identity instance Show a => Show (Identity a) -- | Monomorphic Show function for Maybe values. -- -- Since: 0.3 module Text.Show.Text.Data.Maybe -- | Convert a Maybe value to a Builder with the given -- precedence. -- -- Since: 0.3 showbMaybePrec :: Show a => Int -> Maybe a -> Builder instance Show1 Maybe instance Show a0 => Show (Maybe a0) -- | Monomorphic Show functions for Monoid-related -- newtypes. -- -- Since: 0.3 module Text.Show.Text.Data.Monoid -- | Convert an All value to a Builder with the given -- precedence. -- -- Since: 0.3 showbAllPrec :: Int -> All -> Builder -- | Convert an Any value to a Builder with the given -- precedence. -- -- Since: 0.3 showbAnyPrec :: Int -> Any -> Builder -- | Convert a Dual value to a Builder with the given -- precedence. -- -- Since: 0.3 showbDualPrec :: Show a => Int -> Dual a -> Builder -- | Convert a First value to a Builder with the given -- precedence. -- -- Since: 0.3 showbFirstPrec :: Show a => Int -> First a -> Builder -- | Convert a Last value to a Builder with the given -- precedence. -- -- Since: 0.3 showbLastPrec :: Show a => Int -> Last a -> Builder -- | Convert a Product value to a Builder with the given -- precedence. -- -- Since: 0.3 showbProductPrec :: Show a => Int -> Product a -> Builder -- | Convert a Sum value to a Builder with the given -- precedence. -- -- Since: 0.3 showbSumPrec :: Show a => Int -> Sum a -> Builder instance Show1 Sum instance Show1 Product instance Show1 Last instance Show1 First instance Show1 Dual instance Show a0 => Show (Sum a0) instance Show a0 => Show (Product a0) instance Show a0 => Show (Last a0) instance Show a0 => Show (First a0) instance Show a0 => Show (Dual a0) instance Show Any instance Show All -- | Monomorphic Show functions for Ordering and Down. -- -- Since: 0.3 module Text.Show.Text.Data.Ord -- | Convert a Ordering to a Builder. -- -- Since: 0.3 showbOrdering :: Ordering -> Builder -- | Convert a Down value to a Builder with the given -- precedence. This function is only available with base-4.6.0.0 -- or later. -- -- Since: 0.3 showbDownPrec :: Show a => Int -> Down a -> Builder instance Show1 Down instance Show a0 => Show (Down a0) instance Show Ordering -- | Monomorphic Show function for Proxy values. -- -- Since: 0.4 module Text.Show.Text.Data.Proxy -- | Convert a Proxy type to a Builder. -- -- Since: 0.4 showbProxy :: Proxy s -> Builder instance Show1 Proxy instance Show (Proxy s) -- | Monomorphic Show functions for Text types. -- -- Since: 0.3 module Text.Show.Text.Data.Text -- | Convert a strict Text into a Builder. showbText -- should not be confused with fromText, as showbText -- escapes certain characters (such as double quotes). -- -- Since: 0.5 showbText :: Text -> Builder -- | Convert a lazy Text into a Builder. showbTextLazy -- should not be confused with fromTextLazy, as -- showbTextLazy escapes certain characters (such as double -- quotes). -- -- Since: 0.3 showbTextLazy :: Text -> Builder -- | Show a Builder as if it were a String (i.e., escape -- certain characters, such as double quotes). -- -- Since: 0.5 showbBuilder :: Builder -> Builder instance Show Builder instance Show Text instance Show Text -- | Monomorphic Show functions for data types in the -- Typeable module. -- -- Since: 0.3 module Text.Show.Text.Data.Typeable -- | Convert a TyCon to a Builder. -- -- Since: 0.3 showbTyCon :: TyCon -> Builder -- | Convert a TypeRep to a Builder with the given -- precedence. -- -- Since: 0.3 showbTypeRepPrec :: Int -> TypeRep -> Builder instance Show TyCon instance Show TypeRep -- | Monomorphic Show function for Dynamic. -- -- Since: 0.3 module Text.Show.Text.Data.Dynamic -- | Convert a Dynamic value to a Builder. -- -- Since: 0.3 showbDynamic :: Dynamic -> Builder instance Show Dynamic -- | Monomorphic Show functions for Version. -- -- Since: 0.3 module Text.Show.Text.Data.Version -- | Convert a Version to a Builder with the given -- precedence. -- -- Since: 0.3 showbVersionPrec :: Int -> Version -> Builder -- | 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: 0.3 showbVersionConcrete :: Version -> Builder instance Show Version -- | Monomorphic Show function for Void values. -- -- Since: 0.5 module Text.Show.Text.Data.Void -- | Since Void values logically don't exist, attempting to convert -- one to a Builder will never terminate. -- -- Since: 0.5 showbVoid :: Void -> Builder instance Show Void -- | Monomorphic Show functions for Haskell newtypes corresponding -- to C types in the Foreign Function Interface (FFI). -- -- Since: 0.3 module Text.Show.Text.Foreign.C.Types -- | Convert a CChar to a Builder with the given precedence. -- -- Since: 0.3 showbCCharPrec :: Int -> CChar -> Builder -- | Convert a CSChar to a Builder with the given precedence. -- -- Since: 0.3 showbCSCharPrec :: Int -> CSChar -> Builder -- | Convert a CUChar to a Builder. -- -- Since: 0.3 showbCUChar :: CUChar -> Builder -- | Convert a CShort to a Builder with the given precedence. -- -- Since: 0.3 showbCShortPrec :: Int -> CShort -> Builder -- | Convert a CUShort to a Builder. -- -- Since: 0.3 showbCUShort :: CUShort -> Builder -- | Convert a CInt to a Builder with the given precedence. -- -- Since: 0.3 showbCIntPrec :: Int -> CInt -> Builder -- | Convert a CUInt to a Builder. -- -- Since: 0.3 showbCUInt :: CUInt -> Builder -- | Convert a CLong to a Builder with the given precedence. -- -- Since: 0.3 showbCLongPrec :: Int -> CLong -> Builder -- | Convert a CULong to a Builder. -- -- Since: 0.3 showbCULong :: CULong -> Builder -- | Convert a CPtrdiff to a Builder with the given -- precedence. -- -- Since: 0.3 showbCPtrdiffPrec :: Int -> CPtrdiff -> Builder -- | Convert a CSize to a Builder. -- -- Since: 0.3 showbCSize :: CSize -> Builder -- | Convert a CWchar to a Builder with the given precedence. -- -- Since: 0.3 showbCWcharPrec :: Int -> CWchar -> Builder -- | Convert a CSigAtomic to a Builder with the given -- precedence. -- -- Since: 0.3 showbCSigAtomicPrec :: Int -> CSigAtomic -> Builder -- | Convert a CLLong to a Builder with the given precedence. -- -- Since: 0.3 showbCLLongPrec :: Int -> CLLong -> Builder -- | Convert a CULLong to a Builder. -- -- Since: 0.3 showbCULLong :: CULLong -> Builder -- | Convert a CIntPtr to a Builder with the given -- precedence. -- -- Since: 0.3 showbCIntPtrPrec :: Int -> CIntPtr -> Builder -- | Convert a CUIntPtr to a Builder. -- -- Since: 0.3 showbCUIntPtr :: CUIntPtr -> Builder -- | Convert a CIntMax to a Builder with the given -- precedence. -- -- Since: 0.3 showbCIntMaxPrec :: Int -> CIntMax -> Builder -- | Convert a CUIntMax to a Builder. -- -- Since: 0.3 showbCUIntMax :: CUIntMax -> Builder -- | Convert a CClock to a Builder with the given precedence. -- -- Since: 0.3 showbCClockPrec :: Int -> CClock -> Builder -- | Convert a CTime to a Builder with the given precedence. -- -- Since: 0.3 showbCTimePrec :: Int -> CTime -> Builder -- | Convert a CUSeconds value to a Builder. This function is -- only available with base-4.4.0.0 or later. -- -- Since: 0.3 showbCUSeconds :: CUSeconds -> Builder -- | Convert a CSUSeconds value to a Builder with the given -- precedence. This function is only available with base-4.4.0.0 -- or later. -- -- Since: 0.3 showbCSUSecondsPrec :: Int -> CSUSeconds -> Builder -- | Convert a CFloat to a Builder with the given precedence. -- -- Since: 0.3 showbCFloatPrec :: Int -> CFloat -> Builder -- | Convert a CDouble to a Builder with the given -- precedence. -- -- Since: 0.3 showbCDoublePrec :: Int -> CDouble -> Builder instance Show CDouble instance Show CFloat instance Show CSUSeconds instance Show CUSeconds instance Show CTime instance Show CClock instance Show CUIntMax instance Show CIntMax instance Show CUIntPtr instance Show CIntPtr instance Show CULLong instance Show CLLong instance Show CSigAtomic instance Show CWchar instance Show CSize instance Show CPtrdiff instance Show CULong instance Show CLong instance Show CUInt instance Show CInt instance Show CUShort instance Show CShort instance Show CUChar instance Show CSChar instance Show CChar -- | Monomorphic Show functions for pointer types used in the -- Haskell Foreign Function Interface (FFI). -- -- Since: 0.3 module Text.Show.Text.Foreign.Ptr -- | Convert a Ptr to a Builder. Note that this does not -- require the parameterized type to be an instance of Show -- itself. -- -- Since: 0.3 showbPtr :: Ptr a -> Builder -- | Convert a FunPtr to a Builder. Note that this does not -- require the parameterized type to be an instance of Show -- itself. -- -- Since: 0.3 showbFunPtr :: FunPtr a -> Builder -- | Convert an IntPtr to a Builder with the given -- precedence. -- -- Since: 0.3 showbIntPtrPrec :: Int -> IntPtr -> Builder -- | Convert a WordPtr to a Builder. -- -- Since: 0.3 showbWordPtr :: WordPtr -> Builder -- | Convert a ForeignPtr to a Builder. Note that this does -- not require the parameterized type to be an instance of Show -- itself. -- -- Since: 0.3 showbForeignPtr :: ForeignPtr a -> Builder instance Show1 ForeignPtr instance Show (ForeignPtr a) instance Show WordPtr instance Show IntPtr instance Show1 FunPtr instance Show (FunPtr a) instance Show1 Ptr instance Show (Ptr a) -- | Optional Show and Show1 instances for functions. -- -- Since: 0.3 module Text.Show.Text.Functions -- | Convert a function to a Builder. -- -- Since: 0.3 showbFunction :: (a -> b) -> Builder instance Show1 ((->) a) instance Show (a -> b) -- | Monomorphic Show function for Naturals. -- -- Since: 0.5 module Text.Show.Text.Numeric.Natural -- | Convert a Natural to a Builder with the given -- precedence. -- -- Since: 0.5 showbNaturalPrec :: Int -> Natural -> Builder instance Show Natural -- | Monomorphic Show function for ExitCode. -- -- Since: 0.3 module Text.Show.Text.System.Exit -- | Convert an ExitCode to a Builder with the given -- precedence. -- -- Since: 0.3 showbExitCodePrec :: Int -> ExitCode -> Builder instance Show ExitCode -- | Monomorphic Show function for IO-related data types. -- -- Since: 0.3 module Text.Show.Text.System.IO -- | Convert a Handle to a Builder. -- -- Since: 0.3 showbHandle :: Handle -> Builder -- | Convert an IOMode to a Builder. -- -- Since: 0.3 showbIOMode :: IOMode -> Builder -- | Convert a BufferMode to a Builder with the given -- precedence. -- -- Since: 0.3 showbBufferModePrec :: Int -> BufferMode -> Builder -- | Convert a HandlePosn to a Builder. -- -- Since: 0.3 showbHandlePosn :: HandlePosn -> Builder -- | Convert a SeekMode to a Builder. -- -- Since: 0.3 showbSeekMode :: SeekMode -> Builder -- | Convert a TextEncoding to a Builder. This function is -- only available with base-4.3.0.0 or later. -- -- Since: 0.3 showbTextEncoding :: TextEncoding -> Builder -- | Convert a CodingProgress to a Builder. This function is -- only available with base-4.4.0.0 or later. -- -- Since: 0.3 showbCodingProgress :: CodingProgress -> Builder -- | Convert a CodingFailureMode value to a Builder. This -- function is only available with base-4.4.0.0 or later. -- -- Since: 0.3 showbCodingFailureMode :: CodingFailureMode -> Builder -- | Convert a Newline to a Builder. -- -- Since: 0.3 showbNewline :: Newline -> Builder -- | Convert a NewlineMode to a Builder with the given -- precedence. -- -- Since: 0.3 showbNewlineModePrec :: Int -> NewlineMode -> Builder instance Show NewlineMode instance Show Newline instance Show CodingFailureMode instance Show CodingProgress instance Show TextEncoding instance Show SeekMode instance Show HandlePosn instance Show BufferMode instance Show IOMode instance Show Handle -- | Monomorphic Show functions for Haskell equivalents of POSIX -- data types. Note that these functions are only available if the -- operating system supports them, so some OSes (e.g., Windows) will not -- be able to use all of the functions in this module. -- -- Since: 0.3 module Text.Show.Text.System.Posix.Types -- | Convert an Fd to a Builder with the given precedence. -- -- Since: 0.3 showbFdPrec :: Int -> Fd -> Builder -- | Convert a CDev to a Builder. -- -- Since: 0.3 showbCDev :: CDev -> Builder -- | Convert a CIno to a Builder. -- -- Since: 0.3 showbCIno :: CIno -> Builder -- | Convert a CMode to a Builder. -- -- Since: 0.3 showbCMode :: CMode -> Builder -- | Convert a COff to a Builder with the given precedence. -- -- Since: 0.3 showbCOffPrec :: Int -> COff -> Builder -- | Convert a CPid to a Builder with the given precedence. -- -- Since: 0.3 showbCPidPrec :: Int -> CPid -> Builder -- | Convert a CSsize to a Builder with the given precedence. -- -- Since: 0.3 showbCSsizePrec :: Int -> CSsize -> Builder -- | Convert a CGid to a Builder. -- -- Since: 0.3 showbCGid :: CGid -> Builder -- | Convert a CNlink to a Builder. -- -- Since: 0.3 showbCNlink :: CNlink -> Builder -- | Convert a CUid to a Builder. -- -- Since: 0.3 showbCUid :: CUid -> Builder -- | Convert a CCc to a Builder. -- -- Since: 0.3 showbCCc :: CCc -> Builder -- | Convert a CSpeed to a Builder. -- -- Since: 0.3 showbCSpeed :: CSpeed -> Builder -- | Convert a CTcflag to a Builder. -- -- Since: 0.3 showbCTcflag :: CTcflag -> Builder -- | Convert a CRLim to a Builder. -- -- Since: 0.3 showbCRLim :: CRLim -> Builder instance Show Fd instance Show CRLim instance Show CTcflag instance Show CSpeed instance Show CCc instance Show CUid instance Show CNlink instance Show CGid instance Show CSsize instance Show CPid instance Show COff instance Show CMode instance Show CIno instance Show CDev -- | Monomorphic Show function for Lexeme (and Number, -- if using a recent-enough version of base). -- -- Since: 0.3 module Text.Show.Text.Text.Read -- | Convert a Lexeme to a Builder with the given precedence. -- -- Since: 0.3 showbLexemePrec :: Int -> Lexeme -> Builder -- | Convert a Number to a Builder with the given precedence. -- This function is only available with base-4.7.0.0 or later. -- -- Since: 0.3 showbNumberPrec :: Int -> Number -> Builder instance Show Number instance Show Lexeme -- | Monomorphic Show function for Fingerprint values. This -- module is only available with base-4.4.0.0 or later. -- -- Since: 0.5 module Text.Show.Text.GHC.Fingerprint -- | Convert a Fingerprint to a Builder. This function is -- only available with base-4.4.0.0 or later. -- -- Since: 0.5 showbFingerprint :: Fingerprint -> Builder instance Show Fingerprint -- | Monomorphic Show functions for generics-related data types. -- This module is only available with base-4.4.0.0 or later. -- -- Since: 0.3 module Text.Show.Text.GHC.Generics -- | Convert a U1 value to a Builder. This function is only -- available with base-4.4.0.0 or later. -- -- Since: 0.3 showbU1 :: U1 p -> Builder -- | Convert a Par1 value to a Builder with the given -- precedence. This function is only available with base-4.4.0.0 -- or later. -- -- Since: 0.3 showbPar1Prec :: Show p => Int -> Par1 p -> Builder -- | Convert a Rec1 value to a Builder with the given -- precedence. This function is only available with base-4.4.0.0 -- or later. -- -- Since: 0.3 showbRec1Prec :: Show (f p) => Int -> Rec1 f p -> Builder -- | Convert a K1 value to a Builder with the given -- precedence. This function is only available with base-4.4.0.0 -- or later. -- -- Since: 0.3 showbK1Prec :: Show c => Int -> K1 i c p -> Builder -- | Convert an M1 value to a Builder with the given -- precedence. This function is only available with base-4.4.0.0 -- or later. -- -- Since: 0.3 showbM1Prec :: Show (f p) => Int -> M1 i c f p -> Builder -- | Convert a '(:+:)' value to a Builder with the given precedence. -- This function is only available with base-4.4.0.0 or later. -- -- Since: 0.3 showbSumTypePrec :: (Show (f p), Show (g p)) => Int -> (f :+: g) p -> Builder -- | Convert a '(:*:)' value to a Builder with the given precedence. -- This function is only available with base-4.4.0.0 or later. -- -- Since: 0.3 showbProductTypePrec :: (Show (f p), Show (g p)) => Int -> (f :*: g) p -> Builder -- | Convert a '(:.:)' value to a Builder with the given precedence. -- This function is only available with base-4.4.0.0 or later. -- -- Since: 0.3 showbCompFunctorsPrec :: Show (f (g p)) => Int -> (f :.: g) p -> Builder -- | Convert a Fixity value to a Builder with the given -- precedence. This function is only available with base-4.4.0.0 -- or later. -- -- Since: 0.3 showbFixityPrec :: Int -> Fixity -> Builder -- | Convert an Associativity value to a Builder. This -- function is only available with base-4.4.0.0 or later. -- -- Since: 0.3 showbAssociativity :: Associativity -> Builder -- | Convert an Arity value to a Builder with the given -- precedence. This function is only available with base-4.4.0.0 -- or later. -- -- Since: 0.3 showbArityPrec :: Int -> Arity -> Builder instance Show Arity instance Show Associativity instance Show Fixity instance Show (f (g p)) => Show ((:.:) f g p) instance (Show (f p), Show (g p)) => Show ((:*:) f g p) instance (Show (f p), Show (g p)) => Show ((:+:) f g p) instance Show (f p) => Show (M1 i c f p) instance Show c => Show1 (K1 i c) instance Show c => Show (K1 i c p) instance Show (f p) => Show (Rec1 f p) instance Show1 Par1 instance Show p0 => Show (Par1 p0) instance Show1 U1 instance Show (U1 p) -- | Monomorphic Show functions for data types in the Event -- module. This module is only available with base-4.4.0.0 or -- later and is not available on Windows. -- -- Note that this module does not export anything on GHCJS. -- -- Since: 0.3 module Text.Show.Text.GHC.Event -- | Convert an Event to a Builder. This function is only -- available with base-4.4.0.0 or later and is not available on -- Windows. -- -- Since: 0.3 showbEvent :: Event -> Builder -- | Convert an FdKey to a Builder with the given precedence. -- This function is only available with base-4.4.0.0 or later -- and is not available on Windows. -- -- Since: 0.3 showbFdKeyPrec :: Int -> FdKey -> Builder instance Show FdKey instance Show Event -- | Monomorphic Show function for GCStats. This module is -- only available with base-4.5.0.0 or later. -- -- Since: 0.3 module Text.Show.Text.GHC.Stats -- | Convert a GCStats value to a Builder with the given -- precedence. This function is only available with base-4.5.0.0 -- or later. -- -- Since: 0.3 showbGCStatsPrec :: Int -> GCStats -> Builder instance Show GCStats -- | Monomorphic Show functions for data types in the -- GHC.TypeLits module. This module is only available with -- base-4.6.0.0 or later. -- -- Since: 0.5 module Text.Show.Text.GHC.TypeLits -- | Convert a SomeNat value to a Builder with the given -- precedence. This function is only available with base-4.7.0.0 -- or later. -- -- Since: 0.5 showbSomeNatPrec :: Int -> SomeNat -> Builder -- | Convert a SomeSymbol value to a Builder with the given -- precedence. This function is only available with base-4.7.0.0 -- or later. -- -- Since: 0.5 showbSomeSymbol :: SomeSymbol -> Builder instance Show SomeSymbol instance Show SomeNat -- | Monomorphic Show function for representational equality. This -- module is only available with base-4.7.0.0 or later. -- -- Since: 0.3 module Text.Show.Text.Data.Type.Coercion -- | Convert a representational equality value to a Builder. This -- function is only available with base-4.7.0.0 or later. -- -- Since: 0.3 showbCoercion :: Coercion a b -> Builder instance Show1 (Coercion a) instance Show (Coercion a b) -- | Monomorphic Show function for propositional equality. This -- module is only available with base-4.7.0.0 or later. -- -- Since: 0.3 module Text.Show.Text.Data.Type.Equality -- | Convert a propositional equality value to a Builder. This -- function is only available with base-4.7.0.0 or later. -- -- Since: 0.3 showbPropEquality :: (a :~: b) -> Builder instance Show1 ((:~:) a) instance Show (a :~: b) -- | Monomorphic Show functions for data types in the -- OldTypeable module. This module is only available with -- base-4.7. -- -- Since: 0.5 module Text.Show.Text.Data.OldTypeable -- | Convert a TyCon to a Builder. This function is only -- available with base-4.7. -- -- Since: 0.5 showbTyCon :: TyCon -> Builder -- | Convert a TypeRep to a Builder with the given -- precedence. This function is only available with base-4.7. -- -- Since: 0.5 showbTypeRepPrec :: Int -> TypeRep -> Builder instance Show TypeRep instance Show TyCon -- | 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 Show instances for your -- trace functions, the Text.Show.Text.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: 0.5 module Text.Show.Text.Debug.Trace -- | The trace 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. -- --
-- trace ("calling f with x = " <> show x) (f x)
--
--
-- The trace 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: 0.5
trace :: Text -> a -> a
-- | Like trace but accepts a lazy Text argument.
--
-- Since: 0.5
traceLazy :: Text -> a -> a
-- | Like trace but returns the message instead of a third value.
--
-- Since: 0.5
traceId :: Text -> Text
-- | Like traceId but accepts a lazy Text argument.
--
-- Since: 0.5
traceIdLazy :: Text -> Text
-- | Like trace, but uses show 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 = -- traceShow (x, z) $ result -- where -- z = ... -- ... ---- -- Since: 0.5 traceShow :: Show a => a -> b -> b -- | Like traceShow but returns the shown value instead of a third -- value. -- -- Since: 0.5 traceShowId :: Show a => a -> a -- | Like trace 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 -- traceStack behaves exactly like trace. 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: 0.5 traceStack :: Text -> a -> a -- | Like traceStack but accepts a lazy Text argument. -- -- Since: 0.5 traceStackLazy :: Text -> a -> a -- | The traceIO function outputs the trace message from the IO -- monad. This sequences the output with respect to other IO actions. -- -- Since: 0.5 traceIO :: Text -> IO () -- | Like traceIO but accepts a lazy Text argument. -- -- Since: 0.5 traceIOLazy :: Text -> IO () -- | Like trace but returning unit in an arbitrary monad. Allows for -- convenient use in do-notation. Note that the application of -- trace is not an action in the monad, as traceIO is in -- the IO monad. -- --
-- ... = do -- x <- ... -- traceM $ "x: " <> show x -- y <- ... -- traceM $ "y: " <> show y ---- -- Since: 0.5 traceM :: Monad m => Text -> m () -- | Like traceM but accepts a lazy Text argument. traceMLazy :: Monad m => Text -> m () -- | Like traceM, but uses show on the argument to convert it -- to a Text. -- --
-- ... = do -- x <- ... -- traceMShow $ x -- y <- ... -- traceMShow $ x + y ---- -- Since: 0.5 traceShowM :: (Show a, Monad m) => a -> m () -- | The traceEvent function behaves like trace 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 -- traceEventIO 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: 0.5 traceEvent :: Text -> a -> a -- | Like traceEvent but accepts a lazy Text argument. -- -- Since: 0.5 traceEventLazy :: Text -> a -> a -- | The traceEventIO function emits a message to the eventlog, if -- eventlog profiling is available and enabled at runtime. -- -- Compared to traceEvent, traceEventIO sequences the event -- with respect to other IO actions. -- -- Since: 0.5 traceEventIO :: Text -> IO () -- | Like traceEventIO but accepts a lazy Text argument. -- -- Since: 0.5 traceEventIOLazy :: Text -> IO () -- | The traceMarker 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 -- traceMarkerIO 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: 0.5 traceMarker :: Text -> a -> a -- | Like traceMarker but accepts a lazy Text argument. -- -- Since: 0.5 traceMarkerLazy :: Text -> a -> a -- | The traceMarkerIO function emits a marker to the eventlog, if -- eventlog profiling is available and enabled at runtime. -- -- Compared to traceMarker, traceMarkerIO sequences the -- event with respect to other IO actions. -- -- Since: 0.5 traceMarkerIO :: Text -> IO () -- | Like traceMarkerIO but accepts a lazy Text argument. -- -- Since: 0.5 traceMarkerIOLazy :: Text -> IO () -- | Functions that splice traces into source code which take arbitrary -- data types or families as arguments (even if they are not instances of -- Show). You need to enable the TemplateHaskell -- language extension in order to use this module. -- -- Since: 0.5 module Text.Show.Text.Debug.Trace.TH -- | Generates a lambda expression which behaves like traceShow -- (without requiring a Show instance). -- -- Since: 0.5 mkTraceShow :: Name -> Q Exp -- | Generates a lambda expression which behaves like traceShowId -- (without requiring a Show instance). -- -- Since: 0.5 mkTraceShowId :: Name -> Q Exp -- | Generates a lambda expression which behaves like traceShowM -- (without requiring a Show instance). -- -- Since: 0.5 mkTraceShowM :: Name -> Q Exp -- | Functions to mechanically derive Show instances or splice -- show-related expressions into Haskell source code. You need -- to enable the TemplateHaskell language extension in order to -- use this module. -- -- Since: 0.3 module Text.Show.Text.TH -- | Generates a Show instance declaration for the given data type -- or family. -- -- Since: 0.3 deriveShow :: Name -> Q [Dec] -- | Generates a Show instance declaration for the given data type -- or family. You shouldn't need to use this function unless you know -- what you are doing. -- -- Unlike deriveShow, this function allows configuration of -- whether to inline showbPrec, showb, or showbList. -- It also allows for specializing instances certain types. For example: -- --
-- {-# LANGUAGE TemplateHaskell #-}
-- import Text.Show.Text.TH
--
-- data ADT a = ADT a
-- $(deriveShowPragmas defaultInlineShowbPrec {
-- specializeTypes = [ [t| ADT Int |] ]
-- }
-- ''ADT)
--
--
-- This declararation would produce code like this:
--
--
-- instance Show a => Show (ADT a) where
-- {-# INLINE showbPrec #-}
-- {-# SPECIALIZE instance Show (ADT Int) #-}
-- showbPrec = ...
--
--
-- Beware: deriveShow can generate extremely long code splices, so
-- it may be unwise to inline in some cases. Use with caution.
--
-- Since: 0.5
deriveShowPragmas :: PragmaOptions -> Name -> Q [Dec]
-- | Generates a lambda expression which behaves like show (without
-- requiring a Show instance).
--
-- Since: 0.3.1
mkShow :: Name -> Q Exp
-- | Generates a lambda expression which behaves like showLazy
-- (without requiring a Show instance).
--
-- Since: 0.3.1
mkShowLazy :: Name -> Q Exp
-- | Generates a lambda expression which behaves like showPrec
-- (without requiring a Show instance).
--
-- Since: 0.3.1
mkShowPrec :: Name -> Q Exp
-- | Generates a lambda expression which behaves like showPrecLazy
-- (without requiring a Show instance).
--
-- Since: 0.3.1
mkShowPrecLazy :: Name -> Q Exp
-- | Generates a lambda expression which behaves like showList
-- (without requiring a Show instance).
--
-- Since: 0.5
mkShowList :: Name -> Q Exp
-- | Generates a lambda expression which behaves like showListLazy
-- (without requiring a Show instance).
--
-- Since: 0.5
mkShowListLazy :: Name -> Q Exp
-- | Generates a lambda expression which behaves like showb (without
-- requiring a Show instance).
--
-- Since: 0.3.1
mkShowb :: Name -> Q Exp
-- | Generates a lambda expression which behaves like showPrec
-- (without requiring a Show instance).
--
-- Since: 0.3.1
mkShowbPrec :: Name -> Q Exp
-- | Generates a lambda expression which behaves like showbList
-- (without requiring a Show instance).
--
-- Since: 0.5
mkShowbList :: Name -> Q Exp
-- | Generates a lambda expression which behaves like print (without
-- requiring a Show instance).
--
-- Since: 0.3.1
mkPrint :: Name -> Q Exp
-- | Generates a lambda expression which behaves like printLazy
-- (without requiring a Show instance).
--
-- Since: 0.3.1
mkPrintLazy :: Name -> Q Exp
-- | Generates a lambda expression which behaves like hPrint
-- (without requiring a Show instance).
--
-- Since: 0.3.1
mkHPrint :: Name -> Q Exp
-- | Generates a lambda expression which behaves like hPrintLazy
-- (without requiring a Show instance).
--
-- Since: 0.3.1
mkHPrintLazy :: Name -> Q Exp
-- | Options that specify what INLINE or SPECIALIZE
-- pragmas to generate with a Show instance.
--
-- Since: 0.5
data PragmaOptions
PragmaOptions :: Bool -> Bool -> Bool -> [Q Type] -> PragmaOptions
-- | Whether to inline showbPrec
inlineShowbPrec :: PragmaOptions -> Bool
-- | Whether to inline showb
inlineShowb :: PragmaOptions -> Bool
-- | Whether to inline showbList
inlineShowbList :: PragmaOptions -> Bool
-- | Types for which to create specialized instance declarations
specializeTypes :: PragmaOptions -> [Q Type]
-- | Do not generate any pragmas with a Show instance.
--
-- Since: 0.5
defaultPragmaOptions :: PragmaOptions
-- | Inline the showbPrec function in a Show instance.
--
-- Since: 0.5
defaultInlineShowbPrec :: PragmaOptions
-- | Inline the showb function in a Show instance.
--
-- Since: 0.5
defaultInlineShowb :: PragmaOptions
-- | Inline the showbList function in a Show instance.
--
-- Since: 0.5
defaultInlineShowbList :: PragmaOptions
-- | Generic versions of Show class functions, as an alternative to
-- Text.Show.Text.TH, which uses Template Haskell. This module is
-- only available if the compiler supports generics (on GHC, 7.2 or
-- above).
--
-- This implementation is based off of the
-- Generics.Deriving.Show module from the
-- generic-deriving library.
--
-- Since: 0.6
module Text.Show.Text.Generic
-- | A Generic implementation of show.
--
-- Since: 0.6
genericShow :: (Generic a, GShow (Rep a)) => a -> Text
-- | A Generic implementation of showLazy.
--
-- Since: 0.6
genericShowLazy :: (Generic a, GShow (Rep a)) => a -> Text
-- | A Generic implementation of showPrec.
--
-- Since: 0.6
genericShowPrec :: (Generic a, GShow (Rep a)) => Int -> a -> Text
-- | A Generic implementation of showPrecLazy.
--
-- Since: 0.6
genericShowPrecLazy :: (Generic a, GShow (Rep a)) => Int -> a -> Text
-- | A Generic implementation of showList.
--
-- Since: 0.6
genericShowList :: (Generic a, GShow (Rep a)) => [a] -> Text
-- | A Generic implementation of showListLazy.
--
-- Since: 0.6
genericShowListLazy :: (Generic a, GShow (Rep a)) => [a] -> Text
-- | A Generic implementation of showb.
--
-- Since: 0.6
genericShowb :: (Generic a, GShow (Rep a)) => a -> Builder
-- | A Generic implementation of showbPrec.
--
-- Since: 0.6
genericShowbPrec :: (Generic a, GShow (Rep a)) => Int -> a -> Builder
-- | A Generic implementation of showbList.
--
-- Since: 0.6
genericShowbList :: (Generic a, GShow (Rep a)) => [a] -> Builder
-- | A Generic implementation of print.
--
-- Since: 0.6
genericPrint :: (Generic a, GShow (Rep a)) => a -> IO ()
-- | A Generic implementation of printLazy.
--
-- Since: 0.6
genericPrintLazy :: (Generic a, GShow (Rep a)) => a -> IO ()
-- | A Generic implementation of hPrint.
--
-- Since: 0.6
genericHPrint :: (Generic a, GShow (Rep a)) => Handle -> a -> IO ()
-- | A Generic implementation of hPrintLazy.
--
-- Since: 0.6
genericHPrintLazy :: (Generic a, GShow (Rep a)) => Handle -> a -> IO ()
-- | Class of generic representation types (Rep) that can be
-- converted to a Builder.
--
-- Since: 0.6
class GShow f where isNullary = error "generic show (isNullary): unnecessary case"
gShowbPrec :: GShow f => ConType -> Int -> f a -> Builder
isNullary :: GShow f => f a -> Bool
-- | Whether a constructor is a record (Rec), a tuple (Tup),
-- is prefix (Pref), or infix (Inf).
--
-- Since: 0.6
data ConType
Rec :: ConType
Tup :: ConType
Pref :: ConType
Inf :: Builder -> ConType
instance Typeable ConType
instance Typeable GShow
instance Generic ConType
instance Show ConType
instance Eq ConType
instance Ord ConType
instance Datatype D1ConType
instance Constructor C1_0ConType
instance Constructor C1_1ConType
instance Constructor C1_2ConType
instance Constructor C1_3ConType
instance (GShow a, GShow b) => GShow (a :*: b)
instance (GShow a, GShow b) => GShow (a :+: b)
instance GShow a => GShow (M1 D d a)
instance (Selector s, GShow a) => GShow (M1 S s a)
instance (Constructor c, GShow a) => GShow (M1 C c a)
instance Show c => GShow (K1 i c)
instance GShow U1
instance Show ConType
-- | Functions that trace the values of Generic instances (even if
-- they are not instances of Show).
--
-- Since: 0.6
module Text.Show.Text.Debug.Trace.Generic
-- | A Generic implementation of traceShow.
--
-- Since: 0.6
genericTraceShow :: (Generic a, GShow (Rep a)) => a -> b -> b
-- | A Generic implementation of traceShowId.
--
-- Since: 0.6
genericTraceShowId :: (Generic a, GShow (Rep a)) => a -> a
-- | A Generic implementation of traceShowM.
--
-- Since: 0.6
genericTraceShowM :: (Generic a, GShow (Rep a), Monad m) => a -> m ()
-- | Efficiently convert from values to Text via Builders.
--
-- Since: 0.1
module Text.Show.Text
-- | Conversion of values to Text. Because there are both strict
-- and lazy Text variants, the Show 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 Show instances. As an example:
--
-- -- import Text.Show.Text -- -- data Example = Example Int Int -- instance Show Example where -- showb (Example i1 i2) = showb i1 <> showbSpace <> showb i2 ---- -- If you do not want to create Show instances manually, you can -- alternatively use the Text.Show.Text.TH module to automatically -- generate default Show instances using Template Haskell, or the -- Text.Show.Text.Generic module to quickly define Show -- instances using genericShowbPrec. -- -- Since: 0.1 class Show a where showbPrec _ = showb showb = showbPrec 0 showbList = showbListWith showb showbPrec :: Show a => Int -> a -> Builder showb :: Show a => a -> Builder showbList :: Show a => [a] -> Builder -- | Constructs a strict Text from a single value. -- -- Since: 0.1 show :: Show a => a -> Text -- | Constructs a lazy Text from a single value. -- -- Since: 0.3 showLazy :: Show a => a -> Text -- | Constructs a strict Text from a single value with the given -- precedence. -- -- Since: 0.3 showPrec :: Show a => Int -> a -> Text -- | Constructs a lazy Text from a single value with the given -- precedence. -- -- Since: 0.3 showPrecLazy :: Show a => Int -> a -> Text -- | Construct a strict Text from a list of values. -- -- Since: 0.3.1 showList :: Show a => [a] -> Text -- | Construct a lazy Text from a list of values. -- -- Since: 0.3.1 showListLazy :: Show a => [a] -> Text -- | Surrounds Builder output with parentheses if the Bool -- parameter is True. -- -- Since: 0.1 showbParen :: Bool -> Builder -> Builder -- | Construct a Builder containing a single space character. -- -- Since: 0.5 showbSpace :: Builder -- | showbUnary n p x produces the Builder -- representation of a unary data constructor with name n and -- argument x, in precedence context p. -- -- Since: 0.5 showbUnary :: Show a => Builder -> Int -> a -> Builder -- | Lifting of the Show class to unary type constructors. -- -- Since: 0.5 class Show1 f showbPrec1 :: (Show1 f, Show a) => Int -> f a -> Builder -- | showbUnary1 n p x produces the Builder -- representation of a unary data constructor with name n and -- argument x, in precedence context p. -- -- Since: 0.5 showbUnary1 :: (Show1 f, Show a) => Builder -> Int -> f a -> Builder -- | showbBinary1 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. -- -- Since: 0.5 showbBinary1 :: (Show1 f, Show1 g, Show a) => Builder -> Int -> f a -> g a -> Builder -- | Convert a Builder to a String (without surrounding it -- with double quotes, as show would). -- -- Since: 0.4.1 toString :: Builder -> String -- | Convert a Builder to a strict Text. -- -- Since: 0.4.1 toText :: Builder -> Text -- | Computes the length of a Builder. -- -- Since: 0.3 lengthB :: Builder -> Int64 -- | Merges several Builders, separating them by newlines. -- -- Since: 0.1 unlinesB :: [Builder] -> Builder -- | Merges several Builders, separating them by spaces. -- -- Since: 0.1 unwordsB :: [Builder] -> Builder -- | Writes a value's strict Text representation to the standard -- output, followed by a newline. -- -- Since: 0.1 print :: Show a => a -> IO () -- | Writes a value's lazy Text representation to the standard -- output, followed by a newline. -- -- Since: 0.3 printLazy :: Show a => a -> IO () -- | Writes a value's strict Text representation to a file handle, -- followed by a newline. -- -- Since: 0.3 hPrint :: Show a => Handle -> a -> IO () -- | Writes a value's lazy Text representation to a file handle, -- followed by a newline. -- -- Since: 0.3 hPrintLazy :: Show a => Handle -> a -> IO () -- | The Text Show instance for FromStringShow is -- based on its String Show instance. That is, -- --
-- showbPrec p (FromStringShow x) = fromString (showsPrec p x "") ---- -- Since: 0.5 newtype FromStringShow a FromStringShow :: a -> FromStringShow a fromStringShow :: FromStringShow a -> a -- | The String Show instance for FromTextShow is -- based on its Text Show instance. That is, -- --
-- showsPrec p (FromTextShow x) str = toString (showbPrec p x) ++ str ---- -- Since: 0.6 newtype FromTextShow a FromTextShow :: a -> FromTextShow a fromTextShow :: FromTextShow a -> a