-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A generic pretty-printer using generics-sop
--   
--   This library contains a generic implementation of the <a>prettyVal</a>
--   function from the <tt><a>pretty-show</a></tt> package. Using the
--   pretty printer, values can easily be rendered to strings and HTML
--   documents in a uniform way.
--   
--   This library makes use of the <tt><a>generics-sop</a></tt> package and
--   is an example of a generic function defined in the SOP style.
@package pretty-sop
@version 0.2.0.2


-- | Generic pretty-printer.
--   
--   This module defines a generic function that helps in defining class
--   instances for the <a>PrettyVal</a> class from the <tt>pretty-show</tt>
--   package.
module Generics.SOP.PrettyVal

-- | Generic pretty-printer.
--   
--   This function turns a value into the uniform representation of type
--   <a>Value</a> that is provided by the <tt>pretty-show</tt> package. The
--   function has the suitable type to serve as the default implementation
--   of the <a>prettyVal</a> function in the <a>PrettyVal</a> class.
--   
--   If you have a datatype <tt>T</tt> that is an instance of
--   <tt>generic-sop</tt>'s <a>Generic</a> and <a>HasDatatypeInfo</a>
--   classes, you can use <a>gprettyVal</a> as follows:
--   
--   <pre>
--   instance PrettyVal T where
--     prettyVal = gprettyVal
--   </pre>
gprettyVal :: forall a. (Generic a, HasDatatypeInfo a, All2 PrettyVal (Code a)) => a -> Value

-- | A class for types that may be reified into a value. Instances of this
--   class may be derived automatically, for datatypes that support
--   <tt>Generics</tt>.
class PrettyVal a
prettyVal :: PrettyVal a => a -> Value
