diff --git a/servant-foreign/servant-foreign.cabal b/servant-foreign/servant-foreign.cabal index 2dc94cac..ebeb3dfe 100644 --- a/servant-foreign/servant-foreign.cabal +++ b/servant-foreign/servant-foreign.cabal @@ -25,7 +25,7 @@ source-repository head location: http://github.com/haskell-servant/servant.git library - exposed-modules: Servant.Foreign + exposed-modules: Servant.Foreign, Servant.Foreign.Internal build-depends: base == 4.* , lens == 4.* , servant == 0.5.* diff --git a/servant-foreign/src/Servant/Foreign.hs b/servant-foreign/src/Servant/Foreign.hs new file mode 100644 index 00000000..3baa9887 --- /dev/null +++ b/servant-foreign/src/Servant/Foreign.hs @@ -0,0 +1,34 @@ +-- | Generalizes all the data needed to make code generation work with +-- arbitrary programming languages. +module Servant.Foreign + ( HasForeign(..) + , Segment(..) + , SegmentType(..) + , FunctionName + , QueryArg(..) + , HeaderArg(..) + , ArgType(..) + , Req + , captureArg + , defReq + , concatCase + , snakeCase + , camelCase + -- lenses + , argType + , argName + , isCapture + , funcName + , path + , reqUrl + , reqBody + , reqHeaders + , reqMethod + , segment + , queryStr + -- re-exports + , module Servant.API + ) where + +import Servant.API +import Servant.Foreign.Internal diff --git a/servant-foreign/src/Servant/Foreign/Internal.hs b/servant-foreign/src/Servant/Foreign/Internal.hs index f4582c22..1aa92af4 100644 --- a/servant-foreign/src/Servant/Foreign/Internal.hs +++ b/servant-foreign/src/Servant/Foreign/Internal.hs @@ -16,35 +16,7 @@ -- | Generalizes all the data needed to make code generation work with -- arbitrary programming languages. -module Servant.Foreign - ( HasForeign(..) - , Segment(..) - , SegmentType(..) - , FunctionName - , QueryArg(..) - , HeaderArg(..) - , ArgType(..) - , Req - , captureArg - , defReq - , concatCase - , snakeCase - , camelCase - -- lenses - , argType - , argName - , isCapture - , funcName - , path - , reqUrl - , reqBody - , reqHeaders - , reqMethod - , segment - , queryStr - -- re-exports - , module Servant.API - ) where +module Servant.Foreign.Internal where import Control.Lens (makeLenses, (%~), (&), (.~), (<>~)) import qualified Data.Char as C