Commit graph

2227 commits

Author SHA1 Message Date
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
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
Gaël Deest
579a372eb9 Enable all tested-with GHC versions 2021-03-17 23:22:20 +01:00
Gaël Deest
f9dd1f691f Try installing GHCJS via HVR's PPA 2021-03-17 23:22:20 +01:00
akhesacaro
9357583459 removing DerivingStrategies extension (not compatible ghc < 8.2.1) 2021-03-17 23:22:20 +01:00
akhesacaro
08b5e86536 (<>) needs the import of Data.Semigroup (ghc 8.2.2) 2021-03-17 23:22:20 +01:00
akhesacaro
86eb25018e removing DerivingVia extension (not compatible ghc < 8.6.1) 2021-03-17 23:22:20 +01:00
Gaël Deest
133ed94442 Re-enable doctests on CI 2021-03-17 23:22:20 +01:00
Gaël Deest
613dcf9ed5 Basic GitHub actions-based CI
- Setup a basic CI based on GitHub actions, with a somewhat limited build matrix.
- Disable cookbook/testing, because servant-quickcheck doesn't build anymore.
- Disable servant-docs on Cabal build, because of some test failures
  - The order of some JSON fields seems to be reversed in the output, need investigation.
- Fix test failures in servant-http-streams when `localhost` points to an IPv6 address rather than 127.0.0.1.
2021-03-17 23:22:20 +01:00
Gaël Deest
f1b5a64466 Remove Travis / haskell-ci configuration
Also remove mention about re-generating .travis.yml in README
2021-03-17 23:22:20 +01:00
Bodigrim
27173c9223
Allow bytestring-0.11 (#1386) 2020-12-16 11:04:49 +01:00
Ondřej Súkup
1f701aa97d
Update upper bound limit for http-client (#1384) 2020-12-11 22:52:32 +01:00
Ondřej Súkup
7412ac3472
Update upper bound limit of base64-bytestring (#1383) 2020-12-11 21:15:27 +01:00
Philipp Balzarek
7675e725d2
Bump base64-bytestring limit to 1.3 (#1382) 2020-12-11 00:32:16 +01:00
fisx
6ebb9e419e
Fix overlapping MimeRender instances (#1376) 2020-12-09 23:08:54 +01:00
fisx
505e6d346b
Merge pull request #1377 from haskell-servant/housekeeping
Housekeeping
2020-12-09 23:07:47 +01:00
Matthias Fischmann
fe849b27bf
bump stack.yaml resolver. 2020-12-06 16:04:02 +01:00
Matthias Fischmann
2f20c32704
Don't warn about necessary, expected type errors. 2020-12-06 16:03:19 +01:00
Intolerable
a8f584f80b
add HasLink instance for UVerb (#1370) 2020-12-06 14:19:35 +01:00
Alexey Kuleshevich
08579ca003
Update upper bounds for QuickCheck (#1375) 2020-12-05 20:49:11 +01:00
Domen Kožar
0bda65e315
links: import toUrlPiece to make it clear where it comes from 2020-12-05 17:00:03 +01:00
Arian van Putten
f7dc40ca8d
servant-client-core: depend on 0.18.2 (#1366) 2020-11-25 15:06:45 +03:00
Maxim Koltsov
57badc7c74
Add UVerb cookbook to cookbook build (#1365) 2020-11-22 18:08:01 +03:00
Maxim Koltsov
0ad2bd221a
Prepare 0.18.2 release (#1364) 2020-11-22 17:51:32 +03:00
Andrey Prokopenko
ce638027a8
Remove extra parameter from haddock section of Fragment instances (#1362) 2020-11-22 11:08:32 +01:00
Felix Yan
aa4f54e92e
Correct a typo in UVerb.hs (#1363) 2020-11-22 11:08:11 +01:00
Felix Yan
1d0b34df50
Allow QuickCheck 2.14 (#1359)
Builds fine and all tests pass.
2020-11-22 11:07:54 +01:00
Andrey Prokopenko
da0c83d318
Add URI fragment as a separate combinator (#1324) 2020-11-18 21:57:20 +03:00
Arian van Putten
339eec6a90
Fix overlapping instance for WithStatus (#1361)
We do not need the `ToJSON` instance for `WithStatus`
it would cause an overlap between:

```
ToJSON a => MimeRender JSON a
```

and

```
forall cty a.  MimeRendercty  a =>  MimeRender cty (WithStatus a)
```
and Servant just needs the `MimeRender` typeclass for it to work

* Add some more docs to the UVerb module

* cookbook/uverb: Change GHC versions

CI was complaining some version did not exist. Trying to bump
Also added 8.10.1

* doc/cookbook/uverb: Remove 8.4.4 from tested versions

CI was running into a cabal bug for some reason
2020-11-18 17:33:03 +01:00
Maxim Koltsov
8e2a654e0e
Merge pull request #1355 from haskell-servant/fix-constraints
Update inter-library version constraints
2020-11-05 11:16:14 +03:00
Maxim Koltsov
4c72c08830
Update inter-library version constraints 2020-11-05 10:48:38 +03:00
Maxim Koltsov
c95faa53fe
Merge pull request #1354 from haskell-servant/bump-versions
Bump versions
2020-11-04 22:28:15 +03:00
Maxim Koltsov
bd698cad3b
Bump version in preparation for new release 2020-11-04 17:06:51 +03:00
Maxim Koltsov
9e4a97eb78
Loosen upper bound on wai-extra 2020-11-04 15:11:15 +03:00
fisx
c1105899f4
union verbs (#1314) 2020-10-31 20:45:46 +01:00
fisx
64f3543034
bump "tested-with" ghc versions. (#1350) 2020-10-25 14:24:06 +01:00
Domen Kožar
81ce30302c
Merge pull request #1351 from haskell-servant/arianvp-patch-1
Update FUNDING.yml
2020-10-20 11:56:43 +02:00
Arian van Putten
6a66ca6d65
Update FUNDING.yml
I have a Github Sponsors account now. so people can sponsor me directly on Github.
2020-10-14 10:43:57 +02:00