-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Converting string-like types to Strings. -- -- This library provides the class: -- -- class ToString s where toString :: s -> String -- -- Instances for String, Char and ShowS are provided. For other instances -- see the package: -- -- http://hackage.haskell.org/package/to-string-instances -- -- Also included is a general coercion function between string-like -- types: -- -- fromToString :: (IsString s2, ToString s1) => s1 -> s2 -- -- fromToString = fromString . toString @package to-string-class @version 0.1.2 module Data.String.ToString -- | Class of string-like types that can be converted to Strings. -- -- Ensure that types that have an instance for this class and also have -- an instance for IsString obey the prop_fromToString law. class ToString s toString :: ToString s => s -> String -- | General coercion between string-like types. -- -- Note that: fromToString = fromString . toString fromToString :: (IsString s2, ToString s1) => s1 -> s2 -- |
--   prop_fromToString x = fromToString x == x
--   
prop_fromToString :: (IsString s, ToString s, Eq s) => s -> Bool instance ToString ShowS instance ToString Char instance ToString String