2015-11-16 18:40:15 +01:00
-- | Generalizes all the data needed to make code generation work with
-- arbitrary programming languages.
2021-02-03 07:52:28 +01:00
--
-- 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
2021-02-03 08:03:33 +01:00
( listFromAPI
, Req ( .. )
, defReq
, HasForeignType ( .. )
, GenerateList ( .. )
, HasForeign ( .. )
, NoTypes
, ArgType ( .. )
2016-02-11 11:41:34 +01:00
, HeaderArg ( .. )
, QueryArg ( .. )
2018-09-17 23:19:41 +02:00
, ReqBodyContentType ( .. )
2015-11-16 18:40:15 +01:00
, Segment ( .. )
2021-02-03 08:03:33 +01:00
, isCapture
, captureArg
2015-11-16 18:40:15 +01:00
, SegmentType ( .. )
2016-02-11 11:41:34 +01:00
, Url ( .. )
2021-02-03 08:03:33 +01:00
-- * aliases
2016-02-11 11:41:34 +01:00
, Path
2016-02-17 22:47:30 +01:00
, Arg ( .. )
, FunctionName ( .. )
, PathSegment ( .. )
2021-02-03 08:03:33 +01:00
-- * lenses
2016-03-13 05:02:00 +01:00
, argName
, argType
, argPath
2015-11-16 18:40:15 +01:00
, reqUrl
, reqMethod
2016-02-11 11:41:34 +01:00
, reqHeaders
, reqBody
2018-09-17 23:19:41 +02:00
, reqBodyContentType
2015-11-28 09:13:26 +01:00
, reqReturnType
2016-02-11 11:41:34 +01:00
, reqFuncName
, path
2015-11-16 18:40:15 +01:00
, queryStr
2016-03-13 05:02:00 +01:00
, queryArgName
, queryArgType
2016-02-17 22:47:30 +01:00
, headerArg
2021-02-03 08:03:33 +01:00
-- * prisms
2016-02-17 22:47:30 +01:00
, _PathSegment
2016-02-11 11:41:34 +01:00
, _HeaderArg
, _ReplaceHeaderArg
, _Static
, _Cap
, _Normal
, _Flag
, _List
2021-02-03 08:03:33 +01:00
-- * 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