e6e13fde84
* non-messy imports * got rid of most long lines (>80 chars) * prisms for sum types and newtypes(we use lens anyway, so why not) * consistent indentation
53 lines
870 B
Haskell
53 lines
870 B
Haskell
-- | Generalizes all the data needed to make code generation work with
|
|
-- arbitrary programming languages.
|
|
module Servant.Foreign
|
|
( ArgType(..)
|
|
, HeaderArg(..)
|
|
, QueryArg(..)
|
|
, Req(..)
|
|
, Segment(..)
|
|
, SegmentType(..)
|
|
, Url(..)
|
|
-- aliases
|
|
, Path
|
|
, ForeignType
|
|
, Arg
|
|
, FunctionName
|
|
-- lenses
|
|
, reqUrl
|
|
, reqMethod
|
|
, reqHeaders
|
|
, reqBody
|
|
, reqReturnType
|
|
, reqFuncName
|
|
, path
|
|
, queryStr
|
|
, argName
|
|
, argType
|
|
-- prisms
|
|
, _HeaderArg
|
|
, _ReplaceHeaderArg
|
|
, _Static
|
|
, _Cap
|
|
, _Normal
|
|
, _Flag
|
|
, _List
|
|
-- rest of it
|
|
, HasForeign(..)
|
|
, HasForeignType(..)
|
|
, HasNoForeignType
|
|
, GenerateList(..)
|
|
, NoTypes
|
|
, captureArg
|
|
, isCapture
|
|
, concatCase
|
|
, snakeCase
|
|
, camelCase
|
|
, defReq
|
|
, listFromAPI
|
|
-- re-exports
|
|
, module Servant.API
|
|
) where
|
|
|
|
import Servant.API
|
|
import Servant.Foreign.Internal
|