Safe Haskell | None |
---|---|
Language | Haskell2010 |
Executing commands within the Car Monad.
Synopsis
- runCmd :: (MonadIO m, Postable p) => String -> p -> Car m CommandResponse
- runCmd' :: MonadIO m => String -> Car m CommandResponse
- type CommandResponse = Either Text ()
- type Car = ReaderT CarEnv
- mkCommand :: String -> String -> Q [Dec]
- mkCommands :: [String] -> Q [Dec]
- mkNamedCommands :: [(String, String)] -> Q [Dec]
Documentation
runCmd :: (MonadIO m, Postable p) => String -> p -> Car m CommandResponse Source #
Run a command with a payload.
type CommandResponse = Either Text () Source #
A CommandResponse wraps an Either such that Left represents a failure message and Right suggests the command was successful.
TH support for generating commands.
mkCommand :: String -> String -> Q [Dec] Source #
Build a simple named command car that posts to the given named endpoint.
mkCommands :: [String] -> Q [Dec] Source #
Build a bunch of commands from a list of named endpoints, defining functions by removing the common prefix.
Orphan instances
FormValue Bool Source # | |
renderFormValue :: Bool -> ByteString # |