Commit graph

182 commits

Author SHA1 Message Date
Oleg Grenrus
5f947d1c43 Bump version numbers
- Almost everything 0.15; also servant-foreign jumped to 0.15, for
  consistency
- Bump lower bounds of dependencies to most recent versions atm
- Use hspec-2.6.0
- Update `stack.yaml` accordingly
- Use base-compat a bit more
- Drop aeson-compat dependency (in tests and tutorial)
2018-11-09 20:20:26 +02:00
Oleg Grenrus
4195fd04d4 tested-with: GHC==8.6.2 2018-11-09 17:41:00 +02:00
Oleg Grenrus
8feda81fcd Separate Servant.Client.Streaming
- as a bonus only `servant-client` depends on `kan-extensions`
2018-11-08 17:58:21 +02:00
Oleg Grenrus
953747b55b Correct some doctest looking things to be doctests 2018-11-08 17:12:20 +02:00
Oleg Grenrus
7bed805cf7 Golden test for comprehensive API docs 2018-11-08 16:32:10 +02:00
Oleg Grenrus
f7bda98b6a Use tasty for servant-docs tests 2018-11-08 15:35:48 +02:00
Oleg Grenrus
7634e08352 Make ComprehensiveAPI part of public API
We cannot simply tweak it, it will break tests of other packages.
Including packages not in this repository.
2018-11-06 13:35:47 +02:00
Oleg Grenrus
e94919f4b3
Merge pull request #991 from phadej/servant-machines
Streaming refactoring
2018-11-05 16:23:15 +02:00
Oleg Grenrus
45c1cbdfd5 Refactor Stream stuff
- Introduce SourceT, which is simple variant of "correct `ListT`".
  There are another variants possible (like in `streaming`),
  but I'm not sure there's much real difference.

- Introduce `Codensity`. There's a flag if people don't want to depend
  on `kan-extensions`.

- `StreamGenerator` and `ResultStream` are both `SourceT`.
  `Stream` combinator in `servant-client` uses `Codensity` for CPS.

- Add servant-machines, servant-conduit, servant-pipes
- Add streaming cookbook: just code, no explanations.
- Add a script to run streaming 'benchmarks'
2018-11-05 15:48:47 +02:00
Oleg Grenrus
58ccae1ca0
Merge pull request #1043 from rsoeldner/fix-markdown
Fix markdown indentation and compilation warning
2018-10-31 18:50:21 +02:00
Oleg Grenrus
788e0248f1 8.4.4 job 2018-10-15 18:15:52 +03:00
Colin Woodbury
ef573bab0e
Update tested-with fields 2018-10-07 10:44:41 -07:00
Colin Woodbury
dec0636611
Update bounds for GHC 8.6 2018-10-07 10:38:36 -07:00
Robert Soeldner
4e5e0a5324 Update example output 2018-09-29 17:50:23 +02:00
Robert Soeldner
a2f8c2c9b4 Fix markdown code indent, drop unused var 2018-09-29 17:49:06 +02:00
Oleg Grenrus
cfade67c2f Cleanup pre-GHC-8.0 stuff 2018-07-11 01:39:38 +03:00
Oleg Grenrus
5ba0e439dc Support only GHC-8.0+
Let's bump lower bounds to whatever is in LTS close to release date.
2018-07-10 17:17:56 +03:00
Oleg Grenrus
1114925048 Allow free-5.1, lens-4.17 2018-07-05 23:21:36 +03:00
Oleg Grenrus
f9bcc15d0b Apply stylish-haskell on all modules 2018-06-29 23:36:39 +03:00
Oleg Grenrus
dcc67f3089 Add FromResultStream/ToStreamGenerator [a] instances.
- Add Streaming endpoint to the comprehensive API.
- Rename BuildFromStream to FromResultStram
   - I'm tempted to rename everything in the Servant.API.Stream
     (add some prefixes, `header` is too good name to steal)

The TODO in `servant-docs` is left intentionally.
2018-06-24 21:52:09 +03:00
Oleg Grenrus
bd40d46d28 Update x-revisions 2018-06-19 21:23:40 +03:00
Oleg Grenrus
6a1fa67fc4 Bump up versions 2018-06-12 19:27:13 +03:00
Oleg Grenrus
cc273f2d8b Allow aeson-1.4 2018-06-12 14:04:45 +03:00
Oleg Grenrus
0b084afe62 Update .travis.yml
- Disable file-upload recipe (changed MkLink breaks released
  servant-multipart)
- GHC-8.4.2 -> GHC-8.4.3
2018-06-01 13:42:34 +03:00
Oleg Grenrus
c56fda3869 Support GHC-8.4.1 and newer deps 2018-05-26 01:06:36 +03:00
Oleg Grenrus
7d4293fb56 Bump hspec, doctest and transformers-compat 2018-04-11 11:34:16 +03:00
Oleg Grenrus
dd7ec1dfd7 Allow base-compat-0.10.0 2018-04-11 11:26:14 +03:00
Emmanuel Touzery
7423ca3924 relax the aeson constraint, allow 1.3.0.0, fixes https://github.com/fpco/stackage/issues/3337 2018-03-09 20:26:03 +01:00
Oleg Grenrus
3e1748c965 Add description modifier helpers and parametrise Capture 2018-02-15 12:28:42 +02:00
Oleg Grenrus
56a72d7d48 Add changelog and bump versions 2018-02-08 15:17:48 +02:00
Oleg Grenrus
c55b778d8e Bump lower bound of http-types >= 0.12
- WIP: pending http-api-data release
- TODO: remove MIN_VERSION_http_types
- There have been 3 major releases of http-types:
  - 0.10 change name of variable
  - 0.11 lowercase escaped URIs
  - 0.12 uppercase escaped URIs
- It's easier for us to support only latest, migration from 0.9/0.10 to 0.12
  is trivial for the downstream. 0.11 may cause semantic (non-type-error) breakage somewhere.

Also allow lens-4.16, remove MIN_VERSION_http_types conditionals, and
update `stack.yaml`
2018-01-30 11:29:25 +02:00
Oleg Grenrus
f9963d32ff Bump lower bounds in rest of packages 2018-01-25 17:17:35 +02:00
Oleg Grenrus
bc3f61d615 Add Servant.API.Modifiers to servant
Changes Header, ReqBody and QueryParam to take a modifier list.

Resolves https://github.com/haskell-servant/servant/issues/856

ResponseHeader story turns to be somewhat ugly, but it can be made
elegant when https://github.com/haskell-servant/servant/issues/841 is
implemnted, then we can omit HList aka Header Heterogenous List
implementation.

- servant-server changes:

  Writing server side intepretations is quite simple using
  `unfoldRequestArgument`, which makes Header and QueryParam look quite
  the same.

  `ReqBody` cannot be easily made optional with current design (what that
  would mean: No Content-Type Header?), so that dimensions isn't used
  there.

- Add HasLink for all the rest ComprehensiveAPI combinators
- Add 'tricky' Header', QueryParam' endpoints to ComprehensiveAPI
- servant-docs: Quick'n'dirty implementation. Don't use modifiers information (yet).
2018-01-25 09:10:11 +02:00
Oleg Grenrus
6533d4bee5 Void -> TypeError
This doesn't work on GHC-8.0. I have trouble finding a ticket though.
See
https://ghc.haskell.org/trac/ghc/wiki/Proposal/CustomTypeErrors#DesignquestionsRAE
2018-01-22 18:40:23 +02:00
Oleg Grenrus
ccf0056f64 Regenerate .travis.yml 2017-12-10 14:27:40 +02:00
Oleg Grenrus
018f0e082e Bump versions and update changelogs.
The changelog for `servant` contains changes across core packages,
as we release them as a suite.

Also added links to the GitHub master as we might update entries
for old versions, as changelogs are written by humans.
2017-11-06 11:24:48 +02:00
Oleg Grenrus
b45e94de19 cabal new-build based .travis.yml 2017-10-25 18:15:02 +03:00
Oleg Grenrus
2d6bf5055b Improve .cabal files
- Add build-tool-depends, so new-build can use hspec-discover
- Add mtl bounds in tutorial (and dependency on mtl-compact)
- Add extra-source-files to tutorial, so it's buildable from sdist
2017-10-23 08:58:39 +03:00
Ivan Lazar Miljenovic
0d97deada9 Note change 2017-10-11 12:19:00 +11:00
Ivan Lazar Miljenovic
6df200326f Add an option to wrap notes in a separate header
Closes #831, using option 3.
2017-10-11 12:12:48 +11:00
Ivan Lazar Miljenovic
9d10fe13dd Use 3rd-level headings
For some reason, 2nd-level headings are used for introductions and for
each API endpoint, but then it immediately jumps to 4th-level
headings.

Instead, promote everything that's 4th-level to 3rd-level.
2017-10-11 10:48:22 +11:00
Ivan Lazar Miljenovic
ed3ace3066 Handle request/response bodies with empty titles 2017-10-06 13:19:04 +11:00
Ivan Lazar Miljenovic
0160f9c6d9 Update ChangeLog 2017-10-06 11:14:03 +11:00
Ivan Lazar Miljenovic
ddcb3560e0 Better haddocks for new documentation 2017-10-06 11:13:57 +11:00
Ivan Lazar Miljenovic
a693648044 A better name for ApiOptions
It's more about how rendering happens than options for the API.
2017-10-06 10:59:00 +11:00
Ivan Lazar Miljenovic
e3c1c2b464 Fix building on GHC 7.8.4 2017-10-06 10:58:00 +11:00
Ivan Lazar Miljenovic
354bee8d32 Remove unused uncurry3 function 2017-10-06 10:54:55 +11:00
Ivan Lazar Miljenovic
09896b5f39 Group mime-types together, and control how many get displayed
Closes #815
2017-10-05 16:29:43 +11:00
Ivan Lazar Miljenovic
41d75b4de8 Combine rendering of code samples for request/response bodies
This does mean that the "Example" portion for reqeust bodies is lost
though.
2017-10-05 16:29:43 +11:00
Ivan Lazar Miljenovic
4f8df0ebe2 Make sure code blocks are indented in markdown documentation
This relies on the behaviour of pandoc, and as such may not apply to
other Markdown renderers.

Before this change, you would have something like:

> - Example: `application/json`
>
> ```javascript
> "HELLO, HASKELLER"
> ```

When converting this to HTML, PDF, etc. the code block is _not_
contained within the bullet point.

With this change, the generated markdown looks like:

> - Example: `application/json`
>
>     ```javascript
> "HELLO, HASKELLER"
>     ```

With pandoc at least, this effectively indents the entire code block
to be under the bullet point, which is the intended effect.

Note that the code itself is _not_ indented (which might break other
Markdown renderers) as to do so would require splitting on newlines,
which may have unintended consequences when dealing with generated
values (may contain `\r\n`, etc.).
2017-10-05 16:29:43 +11:00