orchid-0.0.7: src/Network/Orchid/Core/Format.hs
module Network.Orchid.Core.Format where
import Data.ByteString.Lazy (ByteString)
import Data.FileStore (FileStore)
import Network.Protocol.Uri (URI)
-- 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 {
postfix :: String
, mime :: String
, handler :: FileStore
-> FilePath -- Working dir.
-> FilePath -- Document name.
-> String -- Contents.
-> IO Output
}