module Network.Orchid.Core.Format where import Data.ByteString.Lazy (ByteString) import Network.Protocol.Uri (URI) import Network.Orchid.Core.Backend -- Formats produce proper UTF-8 text or binary docs. (TODO: ascii for tex?) data Output = TextOutput String | BinaryOutput ByteString -- Wiki format description data type. data WikiFormat = WikiFormat { extension :: String , mime :: String , handler :: Backend -> FilePath -> URI -> String -> IO Output }