From a1dcc275eb2fb4e0ce17e76564853602dbeadd02 Mon Sep 17 00:00:00 2001 From: Matthias Fischmann Date: Mon, 16 Nov 2015 18:33:35 +0100 Subject: [PATCH 1/2] Just rename the file. --- servant-foreign/src/Servant/{Foreign.hs => Foreign/Internal.hs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename servant-foreign/src/Servant/{Foreign.hs => Foreign/Internal.hs} (100%) diff --git a/servant-foreign/src/Servant/Foreign.hs b/servant-foreign/src/Servant/Foreign/Internal.hs similarity index 100% rename from servant-foreign/src/Servant/Foreign.hs rename to servant-foreign/src/Servant/Foreign/Internal.hs From 9b08a05502e11ccdf297f57108dc327556f960e8 Mon Sep 17 00:00:00 2001 From: Matthias Fischmann Date: Mon, 16 Nov 2015 18:40:15 +0100 Subject: [PATCH 2/2] Adjust file contents a little. --- servant-foreign/servant-foreign.cabal | 2 +- servant-foreign/src/Servant/Foreign.hs | 34 +++++++++++++++++++ .../src/Servant/Foreign/Internal.hs | 30 +--------------- 3 files changed, 36 insertions(+), 30 deletions(-) create mode 100644 servant-foreign/src/Servant/Foreign.hs 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