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

-- | XML-RPC client and server library.
--   
--   HaXR is a library for writing XML-RPC client and server applications
--   in Haskell.
@package haxr
@version 3000.11.5

module Network.XmlRpc.DTD_XMLRPC
newtype I4
I4 :: String -> I4
newtype I8
I8 :: String -> I8
newtype AInt
AInt :: String -> AInt
newtype Boolean
Boolean :: String -> Boolean
newtype AString
AString :: String -> AString
newtype ADouble
ADouble :: String -> ADouble
newtype DateTime_iso8601
DateTime_iso8601 :: String -> DateTime_iso8601
newtype Base64
Base64 :: String -> Base64
newtype Data
Data :: [Value] -> Data
newtype Array
Array :: Data -> Array
newtype Name
Name :: String -> Name
data Member
Member :: Name -> Value -> Member
newtype Struct
Struct :: [Member] -> Struct
newtype Nil
Nil :: () -> Nil
newtype Value
Value :: [Value_] -> Value
data Value_
Value_Str :: String -> Value_
Value_I4 :: I4 -> Value_
Value_I8 :: I8 -> Value_
Value_AInt :: AInt -> Value_
Value_Boolean :: Boolean -> Value_
Value_AString :: AString -> Value_
Value_DateTime_iso8601 :: DateTime_iso8601 -> Value_
Value_ADouble :: ADouble -> Value_
Value_Base64 :: Base64 -> Value_
Value_Struct :: Struct -> Value_
Value_Array :: Array -> Value_
Value_Nil :: Nil -> Value_
newtype Param
Param :: Value -> Param
newtype Params
Params :: [Param] -> Params
newtype MethodName
MethodName :: String -> MethodName
data MethodCall
MethodCall :: MethodName -> Maybe Params -> MethodCall
newtype Fault
Fault :: Value -> Fault
data MethodResponse
MethodResponseParams :: Params -> MethodResponse
MethodResponseFault :: Fault -> MethodResponse
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.I4
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.I4
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.I8
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.I8
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.AInt
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.AInt
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.Boolean
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.Boolean
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.AString
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.AString
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.ADouble
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.ADouble
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.DateTime_iso8601
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.DateTime_iso8601
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.Base64
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.Base64
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.Name
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.Name
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.Nil
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.Nil
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.Data
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.Data
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.Array
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.Array
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.Value
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.Value
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.Member
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.Member
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.Struct
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.Struct
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.Value_
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.Value_
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.Param
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.Param
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.Params
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.Params
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.MethodName
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.MethodName
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.MethodCall
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.MethodCall
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.Fault
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.Fault
instance GHC.Show.Show Network.XmlRpc.DTD_XMLRPC.MethodResponse
instance GHC.Classes.Eq Network.XmlRpc.DTD_XMLRPC.MethodResponse
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.MethodResponse
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.MethodResponse
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.Fault
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.Fault
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.MethodCall
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.MethodCall
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.MethodName
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.MethodName
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.Params
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.Params
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.Param
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.Param
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.Data
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.Data
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.Array
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.Array
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.Member
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.Member
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.Struct
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.Struct
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.Value
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.Value
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.Value_
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.Value_
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.Nil
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.Nil
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.Name
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.Name
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.Base64
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.Base64
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.DateTime_iso8601
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.DateTime_iso8601
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.ADouble
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.ADouble
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.AString
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.AString
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.Boolean
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.Boolean
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.AInt
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.AInt
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.I8
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.I8
instance Text.XML.HaXml.TypeMapping.HTypeable Network.XmlRpc.DTD_XMLRPC.I4
instance Text.XML.HaXml.XmlContent.Parser.XmlContent Network.XmlRpc.DTD_XMLRPC.I4

-- | This is a fast non-pretty-printer for turning the internal
--   representation of generic structured XML documents into Lazy
--   ByteStrings. Like in Text.Xml.HaXml.Pretty, there is one pp function
--   for each type in Text.Xml.HaXml.Types, so you can pretty-print as much
--   or as little of the document as you wish.
module Network.XmlRpc.Pretty

-- | Render a Document to a ByteString.
document :: Document i -> ByteString
content :: Content i -> ByteString
element :: Element i -> ByteString
doctypedecl :: DocTypeDecl -> ByteString
prolog :: Prolog -> ByteString
cp :: CP -> ByteString
instance GHC.Base.Monoid Network.XmlRpc.Pretty.MBuilder
instance GHC.Base.Semigroup Network.XmlRpc.Pretty.MBuilder
instance Data.String.IsString Network.XmlRpc.Pretty.MBuilder

-- | This module contains the core functionality of the XML-RPC library.
--   Most applications should not need to use this module. Client
--   applications should use Network.XmlRpc.Client and server
--   applications should use Network.XmlRpc.Server.
--   
--   The XML-RPC specifcation is available at
--   http://www.xmlrpc.com/spec.
module Network.XmlRpc.Internals

-- | An XML-RPC method call. Consists of a method name and a list of
--   parameters.
data MethodCall
MethodCall :: String -> [Value] -> MethodCall

-- | An XML-RPC response.
data MethodResponse

-- | A method response returning a value
Return :: Value -> MethodResponse

-- | A fault response
Fault :: Int -> String -> MethodResponse

-- | An XML-RPC value.
data Value

-- | int, i4, or i8
ValueInt :: Int -> Value

-- | bool
ValueBool :: Bool -> Value

-- | string
ValueString :: String -> Value

-- | no inner element
ValueUnwrapped :: String -> Value

-- | double
ValueDouble :: Double -> Value

-- | dateTime.iso8601
ValueDateTime :: LocalTime -> Value

-- | base 64. NOTE that you should provide the raw data; the haxr library
--   takes care of doing the base-64 encoding.
ValueBase64 :: ByteString -> Value

-- | struct
ValueStruct :: [(String, Value)] -> Value

-- | array
ValueArray :: [Value] -> Value

-- | nil
ValueNil :: Value

-- | An XML-RPC value. Use for error messages and introspection.
data Type
TInt :: Type
TBool :: Type
TString :: Type
TDouble :: Type
TDateTime :: Type
TBase64 :: Type
TStruct :: Type
TArray :: Type
TUnknown :: Type
TNil :: Type

-- | A class for mapping Haskell types to XML-RPC types.
class XmlRpcType a

-- | Convert from this type to a Value
toValue :: XmlRpcType a => a -> Value

-- | Convert from a Value to this type. May fail if if there is a
--   type error.
fromValue :: (XmlRpcType a, MonadFail m) => Value -> Err m a
getType :: XmlRpcType a => a -> Type

-- | Parses a method response from XML.
parseResponse :: (Show e, MonadError e m, MonadFail m) => String -> Err m MethodResponse

-- | Parses a method call from XML.
parseCall :: (Show e, MonadError e m, MonadFail m) => String -> Err m MethodCall

-- | Get a field value from a (possibly heterogeneous) struct.
getField :: (MonadFail m, XmlRpcType a) => String -> [(String, Value)] -> Err m a

-- | Get a field value from a (possibly heterogeneous) struct.
getFieldMaybe :: (MonadFail m, XmlRpcType a) => String -> [(String, Value)] -> Err m (Maybe a)

-- | Makes an XML-representation of a method call. FIXME: pretty prints
--   ugly XML
renderCall :: MethodCall -> ByteString

-- | Makes an XML-representation of a method response. FIXME: pretty prints
--   ugly XML
renderResponse :: MethodResponse -> ByteString
toXRValue :: Value -> Value
fromXRValue :: MonadFail m => Value -> Err m Value
toXRMethodCall :: MethodCall -> MethodCall
fromXRMethodCall :: MonadFail m => MethodCall -> Err m MethodCall
toXRMethodResponse :: MethodResponse -> MethodResponse
fromXRMethodResponse :: MonadFail m => MethodResponse -> Err m MethodResponse
toXRParams :: [Value] -> Params
fromXRParams :: MonadFail m => Params -> Err m [Value]
toXRMember :: (String, Value) -> Member
fromXRMember :: MonadFail m => Member -> Err m (String, Value)
type Err m a = ExceptT String m a

-- | Convert a HType value to a value in any monad
maybeToM :: MonadFail m => String -> Maybe a -> m a

-- | Handle errors from the error monad.
handleError :: MonadFail m => (String -> m a) -> Err m a -> m a

-- | Catch IO errors in the error monad.
ioErrorToErr :: IO a -> Err IO a
instance GHC.Show.Show Network.XmlRpc.Internals.Value
instance GHC.Classes.Eq Network.XmlRpc.Internals.Value
instance GHC.Show.Show Network.XmlRpc.Internals.MethodResponse
instance GHC.Classes.Eq Network.XmlRpc.Internals.MethodResponse
instance GHC.Show.Show Network.XmlRpc.Internals.MethodCall
instance GHC.Classes.Eq Network.XmlRpc.Internals.MethodCall
instance GHC.Classes.Eq Network.XmlRpc.Internals.Type
instance Network.XmlRpc.Internals.XmlRpcType Network.XmlRpc.Internals.Value
instance Network.XmlRpc.Internals.XmlRpcType GHC.Types.Int
instance Network.XmlRpc.Internals.XmlRpcType GHC.Types.Bool
instance Network.XmlRpc.Internals.XmlRpcType GHC.Base.String
instance Network.XmlRpc.Internals.XmlRpcType Data.Text.Internal.Text
instance Network.XmlRpc.Internals.XmlRpcType Data.ByteString.Internal.Type.ByteString
instance Network.XmlRpc.Internals.XmlRpcType GHC.Types.Double
instance Network.XmlRpc.Internals.XmlRpcType Data.Time.LocalTime.Internal.LocalTime.LocalTime
instance Network.XmlRpc.Internals.XmlRpcType System.Time.CalendarTime
instance Network.XmlRpc.Internals.XmlRpcType ()
instance Network.XmlRpc.Internals.XmlRpcType a => Network.XmlRpc.Internals.XmlRpcType [a]
instance Network.XmlRpc.Internals.XmlRpcType a => Network.XmlRpc.Internals.XmlRpcType [(GHC.Base.String, a)]
instance (Network.XmlRpc.Internals.XmlRpcType a, Network.XmlRpc.Internals.XmlRpcType b, Network.XmlRpc.Internals.XmlRpcType c, Network.XmlRpc.Internals.XmlRpcType d, Network.XmlRpc.Internals.XmlRpcType e) => Network.XmlRpc.Internals.XmlRpcType (a, b, c, d, e)
instance (Network.XmlRpc.Internals.XmlRpcType a, Network.XmlRpc.Internals.XmlRpcType b, Network.XmlRpc.Internals.XmlRpcType c, Network.XmlRpc.Internals.XmlRpcType d) => Network.XmlRpc.Internals.XmlRpcType (a, b, c, d)
instance (Network.XmlRpc.Internals.XmlRpcType a, Network.XmlRpc.Internals.XmlRpcType b, Network.XmlRpc.Internals.XmlRpcType c) => Network.XmlRpc.Internals.XmlRpcType (a, b, c)
instance (Network.XmlRpc.Internals.XmlRpcType a, Network.XmlRpc.Internals.XmlRpcType b) => Network.XmlRpc.Internals.XmlRpcType (a, b)
instance GHC.Show.Show Network.XmlRpc.Internals.Type
instance GHC.Read.Read Network.XmlRpc.Internals.Type

-- | This module contains the client functionality of XML-RPC. The XML-RPC
--   specifcation is available at http://www.xmlrpc.com/spec.
--   
--   A simple client application:
--   
--   
--   import Network.XmlRpc.Client
--   
--   server = "http://localhost/~bjorn/cgi-bin/simple_server"
--   
--   add :: String -> Int -> Int -> IO Int
--   add url = remote url "examples.add"
--   
--   main = do
--          let x = 4
--              y = 7
--          z <- add server x y
--          putStrLn (show x ++ " + " ++ show y ++ " = " ++ show z)
--   
module Network.XmlRpc.Client

-- | Call a remote method.
remote :: Remote a => String -> String -> a

-- | Call a remote method. Takes a list of extra headers to add to the HTTP
--   request.
remoteWithHeaders :: Remote a => String -> String -> HeadersAList -> a

-- | Low-level method calling function. Use this function if you need to do
--   custom conversions between XML-RPC types and Haskell types. Throws an
--   exception if the response was a fault.
call :: String -> String -> [Value] -> Err IO Value

-- | Low-level method calling function. Use this function if you need to do
--   custom conversions between XML-RPC types and Haskell types. Takes a
--   list of extra headers to add to the HTTP request. Throws an exception
--   if the response was a fault.
callWithHeaders :: String -> String -> HeadersAList -> [Value] -> Err IO Value
class Remote a
instance Network.XmlRpc.Internals.XmlRpcType a => Network.XmlRpc.Client.Remote (GHC.Types.IO a)
instance (Network.XmlRpc.Internals.XmlRpcType a, Network.XmlRpc.Client.Remote b) => Network.XmlRpc.Client.Remote (a -> b)

module Network.XmlRpc.Introspect
type Signature = ([Type], Type)
type Help = String
type MethodInfo = (String, [Signature], Help)
listMethods :: String -> IO [String]
methodSignature :: String -> String -> IO [[String]]
methodHelp :: String -> String -> IO String
signatures :: String -> String -> IO [Signature]
methodInfo :: String -> String -> IO MethodInfo

-- | This module contains the server functionality of XML-RPC. The XML-RPC
--   specifcation is available at http://www.xmlrpc.com/spec.
--   
--   A simple CGI-based XML-RPC server application:
--   
--   
--   import Network.XmlRpc.Server
--   
--   add :: Int -> Int -> IO Int
--   add x y = return (x + y)
--   
--   main = cgiXmlRpcServer [("examples.add", fun add)]
--   
module Network.XmlRpc.Server

-- | The type of XML-RPC methods on the server.
type XmlRpcMethod = (MethodCall -> ServerResult, Signature)
type ServerResult = Err IO MethodResponse

-- | Turns any function (XmlRpcType t1, ..., XmlRpcType tn, XmlRpcType
--   r) => t1 -> ... -> tn -> IO r into an
--   XmlRpcMethod
fun :: XmlRpcFun a => a -> XmlRpcMethod

-- | Reads a method call from a string, uses the supplied method to
--   generate a response and returns that response as a string
handleCall :: (MethodCall -> ServerResult) -> String -> IO ByteString

-- | An XmlRpcMethod that looks up the method name in a table and uses that
--   method to handle the call.
methods :: [(String, XmlRpcMethod)] -> MethodCall -> ServerResult

-- | A CGI-based XML-RPC server. Reads a request from standard input and
--   writes some HTTP headers (Content-Type and Content-Length), followed
--   by the response to standard output. Supports introspection.
cgiXmlRpcServer :: [(String, XmlRpcMethod)] -> IO ()
instance Network.XmlRpc.Internals.XmlRpcType a => Network.XmlRpc.Server.XmlRpcFun (GHC.Types.IO a)
instance (Network.XmlRpc.Internals.XmlRpcType a, Network.XmlRpc.Server.XmlRpcFun b) => Network.XmlRpc.Server.XmlRpcFun (a -> b)

-- | Uses Template Haskell to automagically derive instances of
--   XmlRpcType
module Network.XmlRpc.THDeriveXmlRpcType
asXmlRpcStruct :: Name -> Q [Dec]
