Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement HasForeign instance #1035

Merged
merged 3 commits into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion servant-foreign/servant-foreign.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: servant-foreign
version: 0.11.1
version: 0.11.2
afcady marked this conversation as resolved.
Show resolved Hide resolved
x-revision: 3
synopsis: Helpers for generating clients for servant APIs in any programming language
description:
Expand Down
1 change: 1 addition & 0 deletions servant-foreign/src/Servant/Foreign.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module Servant.Foreign
, reqMethod
, reqHeaders
, reqBody
, reqBodyIsJSON
, reqReturnType
, reqFuncName
, path
Expand Down
3 changes: 2 additions & 1 deletion servant-foreign/src/Servant/Foreign/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,14 @@ data Req f = Req
, _reqBody :: Maybe f
, _reqReturnType :: Maybe f
, _reqFuncName :: FunctionName
, _reqBodyIsJSON :: Bool
afcady marked this conversation as resolved.
Show resolved Hide resolved
}
deriving (Data, Eq, Show, Typeable)

makeLenses ''Req

defReq :: Req ftype
defReq = Req defUrl "GET" [] Nothing Nothing (FunctionName [])
defReq = Req defUrl "GET" [] Nothing Nothing (FunctionName []) True

-- | 'HasForeignType' maps Haskell types with types in the target
-- language of your backend. For example, let's say you're
Expand Down