servant/servant-foreign/src/Servant/Foreign.hs

62 lines
1.3 KiB
Haskell
Raw Normal View History

2015-11-16 18:40:15 +01:00
-- | Generalizes all the data needed to make code generation work with
-- arbitrary programming languages.
--
-- See documentation of 'HasForeignType' for a simple example. 'listFromAPI' returns a list of all your endpoints and their foreign types, given a mapping from Haskell types to foreign types (conventionally called `ftypes` below).
2015-11-16 18:40:15 +01:00
module Servant.Foreign
(
-- * Main API
listFromAPI
, Req(..)
, defReq
, HasForeignType(..)
, GenerateList(..)
, HasForeign(..)
, NoTypes
-- * Subtypes of 'Req'
, Url(..)
, Path
2015-11-16 18:40:15 +01:00
, Segment(..)
, SegmentType(..)
, isCapture
, captureArg
, QueryArg(..)
, ArgType(..)
, HeaderArg(..)
2016-02-17 22:47:30 +01:00
, Arg(..)
, FunctionName(..)
, ReqBodyContentType(..)
2016-02-17 22:47:30 +01:00
, PathSegment(..)
-- * Lenses
, argName
, argType
, argPath
2015-11-16 18:40:15 +01:00
, reqUrl
, reqMethod
, reqHeaders
, reqBody
, reqBodyContentType
, reqReturnType
, reqFuncName
, path
2015-11-16 18:40:15 +01:00
, queryStr
, queryArgName
, queryArgType
2016-02-17 22:47:30 +01:00
, headerArg
-- * Prisms
2016-02-17 22:47:30 +01:00
, _PathSegment
, _HeaderArg
, _ReplaceHeaderArg
, _Static
, _Cap
, _Normal
, _Flag
, _List
-- * Re-exports
2015-11-16 18:40:15 +01:00
, module Servant.API
2016-02-17 22:47:30 +01:00
, module Servant.Foreign.Inflections
2015-11-16 18:40:15 +01:00
) where
2018-06-29 21:08:26 +02:00
import Servant.API
import Servant.Foreign.Inflections
import Servant.Foreign.Internal