Commit graph

2263 commits

Author SHA1 Message Date
Felix Yan
3af3129f75
Allow transformers-compat 0.7 (#1436)
Builds fine and all tests pass.
2021-08-29 15:06:09 -05:00
Brandon Chinn
799537f82d
Add serveWithContextT, ServerContext (#1441)
servant-server: add serveWithContexT and ServerContext
2021-08-21 19:15:02 +02:00
Dan Fithian
47bd25266f
Servant docs curl (#1401)
servant-dosc: generate sample curl request
2021-08-19 13:11:00 +02:00
Paolo Capriotti
19ec395e66
Avoid using SOP constructors directly (#1434)
This is a followup to #1420. It uses `respond` and `matchUnion`, with
the help of some type annotations, instead of the NS constructors from
SOP.
2021-07-13 10:10:30 -05:00
Maxim Koltsov
21682f6b72
servant-foreign 0.15.4 2021-06-23 23:47:01 +02:00
Maxim Koltsov
e2b897d3c0
Prepare 0.18.3 release (#1430) 2021-06-24 00:38:46 +03:00
Maxim Koltsov
3e29b5194e
Merge pull request #1409 from haskell-servant/maksbotan/ghc-9
Update for GHC 9.0.1
2021-06-24 00:12:26 +03:00
Maxim Koltsov
f527f09ac3
continue-on-error for doctest on GHC 9 2021-06-23 23:06:15 +02:00
Maxim Koltsov
2eba8866b7
Fix doctest running in CI 2021-06-23 23:06:15 +02:00
Maxim Koltsov
6cf2da8b64
Update GHC 8.10 to 8.10.4 in GitHub actions 2021-06-23 23:06:15 +02:00
Maxim Koltsov
4c05338876
doctest 0.18 2021-06-23 23:06:15 +02:00
Maxim Koltsov
61111178f0
Support GHC-9.0.1 2021-06-23 23:06:07 +02:00
Felix Yan
cc67b9ec6e
Allow attoparsec 0.14 (#1408)
Builds fine and all tests pass.
2021-06-21 22:54:50 -05:00
Alp
0c961f6ebb
Fix #1405 (#1429)
Request bodies are not really supposed to be used in GET requests.
2021-06-21 22:54:29 -05:00
Alp
ba30dd1700
Merge pull request #1424 from haskell-servant/update-irc-link
Update IRC link in readme to point at libera
2021-06-16 11:44:52 +02:00
Paolo Capriotti
0f9cc7eeec
Add response header support to UVerb (#1420)
* Use type wrapped in Headers h to generate response

This avoids having to define MimeRender instances for Headers.
2021-06-10 17:10:50 +02:00
Samuel Gélineau
0cb2d603c4
use Capture Description if available (#1423)
* use Capture Description if available

* update golden/comprehensive.md

This is technically a breaking change, because if a Capture has both a
Description and a ToCapture instance, the Description now takes
precedence. Since this Description wasn't doing anything before, I am
guessing that most projects currently only use Description to describe
their endpoints and not their Captures, and thus that few people will be
affected by this breaking change.

* test the "no ToCapture instance" case

The case in which there is both a Description and a ToCapture instance
seems like a corner case. The more interesting cases are the one in
which there is a Description but no ToCapture instance, and the case in
which there is a ToCapture instance but no description.
2021-06-08 13:28:19 -05:00
Maxim Koltsov
da8e64b534
Allow lens-5.0 (#1426) 2021-06-06 00:37:35 +03:00
Nathan van Doorn
26f0f93874
Update IRC link in readme to point at libera 2021-05-26 09:05:50 +01:00
Maxim Koltsov
4016aafe66
CI: add ppa:hvr/ghc in ghcjs build (#1421) 2021-05-14 16:34:16 +03:00
Maxim Koltsov
507f0a4671
Allow hspec < 2.9
https://github.com/commercialhaskell/stackage/issues/6010
2021-05-14 12:34:04 +03:00
Gaël Deest
4a79cea3ff
Merge pull request #1415 from felixonmars/patch-1
Allow singleton-bool 0.1.6
2021-04-29 15:29:02 +02:00
fisx
448c444db6
Typo (#1416) 2021-04-23 10:37:48 +02:00
Felix Yan
3c520683ce
Allow singleton-bool 0.1.6
Builds fine and all tests pass.
2021-04-21 06:16:17 +08:00
Caroline GAUDREAU
ad76c47c2f
Merge pull request #1413 from akhesaCaro/cookbook_hoist_server_with_context
enabling hoist-server-with-context cookbook
2021-04-16 13:49:57 +02:00
akhesaCaro
97967d87d1 enabling hoist-server-with-context cookbook 2021-04-16 13:39:09 +02:00
Gaël Deest
4fe6997659
Merge pull request #1412 from akhesaCaro/cookbook_https
enabling https cookbook
2021-04-10 15:47:38 +02:00
akhesaCaro
bbd016df09 enabling https cookbook 2021-04-10 15:23:57 +02:00
Caroline GAUDREAU
486f89da04
Merge pull request #1410 from akhesaCaro/improve_nix_shell
pinning nixpkgs and adding missing dependencies to shell.nix file
2021-04-10 11:59:17 +02:00
akhesaCaro
4a7a1080a0 pinning nixpkgs and adding missing dependencies 2021-04-10 11:30:37 +02:00
Caroline GAUDREAU
bc6144716b
Merge pull request #1407 from akhesaCaro/using_derivingvia_uverb
Using DerivingVia in UVerb's cookbook
2021-04-09 16:43:12 +02:00
Gaël Deest
f30b72cc90 Add DeriveAnyClass to UVerb.lhs (not implied by DerivingVia on 8.6.5) 2021-04-09 16:19:51 +02:00
Gaël Deest
81a73dfcda Try excluding uverb cookbook from pre 8.6.1 builds 2021-04-09 15:59:02 +02:00
Caroline GAUDREAU
d06b65c4e6
Merge pull request #1390 from Profpatsch/document-servant-foreign
Document servant-foreign
2021-03-25 12:21:20 +01:00
Philip Patsch
e4865644c1 doc(servant-foreign): Document module
I spend some considerable time reverse engineering the module, so I
thought I’d write the documentation I would have liked to see.

The strategy here is that a user not necessarily has insight into how
servant works internally, or even how to write complex servant routes,
they just want to generate a list of endpoints and convert the `Req`
type into e.g. generated code in $language. Thus, they need to know
the semantics of all fields of Req, how they interact and how they
relate to a plain http route.

I made sure every `f` is replaced with `ftype`, so we have one
conventional way of referring to the foreign type argument everywhere.

Some enums are not set at all, they are marked as such.

`_reqBodyContentType` introduces a major restriction of the module, so
that is mentioned in the documentation for now, until the time it will
be fixed.

A few TODO’s describe places where types don’t make sense but would
introduce API-breaking changes, so these should probably be
simplified,
but bundled in one go.
2021-03-25 11:26:53 +01:00
Philip Patsch
07f7954cc6 chore(servant-foreign): remove dead type Frag
It is not used anywhere and also not exported.
2021-03-25 11:26:53 +01:00
Philip Patsch
a0265097e8 doc(servant-foreign): reorder imports
The imports were ordered in the worst possible way, with all
undocumented small type definitions coming first and the actual meat
of the module coming at the very end, mixed in with irrelevant
functions.

This inverses that toxic ordering, showing the main function
first (`listFromAPI`) and then the main data type (`Req`) and the main
class (`HasForeignType`).
2021-03-25 11:26:53 +01:00
Philip Patsch
c3a517cb4f doc(servant-foreign): Inflection docs & module docs 2021-03-25 11:26:53 +01:00
akhesaCaro
d4f7b0397d adding a compatibility warning in the cookbook 2021-03-23 14:10:14 +01:00
akhesaCaro
ba379287c8 reverting : removing DerivingVia extension (not compatible ghc < 8.6.1) 2021-03-23 14:09:49 +01:00
Gaël Deest
0743ca724d
Merge pull request #1403 from haskell-servant/ci-fix-followups
Try and improve caching on CI
2021-03-18 12:17:58 +01:00
Gaël Deest
a28856a11a Rename GH action file to match branch name 2021-03-18 12:10:10 +01:00
Gaël Deest
d6fb3826c8 Try and improve caching 2021-03-18 11:48:50 +01:00
Gaël Deest
53e943b5bb
Merge pull request #1397 from akhesaCaro/compiling_sqlite_simple_cookbook
Fixing Servant cookbooks part 1 (-testing + sqlite-simple)
2021-03-18 11:09:21 +01:00
akhesaCaro
269e546a6a sqlite-simple cookbook is working with sqlite-simple >= 0.4.5.0 2021-03-18 10:50:17 +01:00
akhesaCaro
dd1ab6dd36 fixing DocSpec tests to make them compile 2021-03-18 07:43:09 +01:00
Gaël Deest
a74d9d911e
Merge pull request #1402 from haskell-servant/fix-ci
Basic GitHub actions-based CI
2021-03-17 23:50:13 +01:00
Gaël Deest
507990cafe Switch to actively maintained haskell/actions/setup for CI 2021-03-17 23:22:20 +01:00
Gaël Deest
6452942a69 Cleanup 2021-03-17 23:22:20 +01:00
Gaël Deest
95d4f5030f Build / tests with GHCJS 2021-03-17 23:22:20 +01:00