servant-py-0.1.1.0: Automatically derive python functions to query servant webservices.

Safe HaskellNone
LanguageHaskell2010

Servant.PY.Internal

Synopsis

Documentation

data CommonGeneratorOptions Source #

This structure is used by specific implementations to let you customize the output

Constructors

CommonGeneratorOptions 

Fields

defCommonGeneratorOptions :: CommonGeneratorOptions Source #

Default options.

> defCommonGeneratorOptions = CommonGeneratorOptions
>   { functionNameBuilder = snakeCase
>   , requestBody = "body"
>   , urlPrefix = ""
>   , indentation = "    "  -- 4 spaces
>   , returnMode = DangerMode
>   }

type Indent = (" " :: Symbol) Source #

toValidFunctionName :: Text -> Text Source #

Attempts to reduce the function name provided to that allowed by Foreign.

For valid Python function identifiers see the following: https://docs.python.org/3.2/reference/lexical_analysis.html#identifiers valid start chars: Lu, Ll, Lt, Lm, Lo, Nl, the underscore valid continuation chars: valid start chars <> Mn, Mc, Nd, Pc

functionArguments :: forall f. Req f -> Text Source #