Commit Graph

109 Commits

Author SHA1 Message Date
Oleg Grenrus
22ec980f6e Update hlint.yaml and fix some hints in servant and servant-server 2018-01-26 17:38:57 +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
Michael Sloan
7e0ad51b62 Use (a :: *) on phantom type variables for kinder type checking #887 2018-01-17 21:16:21 -08:00
Gershom
db13077ccb wall clean and compat 2017-11-06 11:55:27 -05:00
Gershom
38e87397e7 add tests, fix to make tests work 2017-11-04 00:10:29 -04:00
Gershom
0c77a2b4b0 make client endpoint give polymorphic result 2017-10-24 17:26:18 -07:00
Gershom
e75a3cc37b streaming client actually streams 2017-10-24 17:12:21 -07:00
Gershom
9a2ac6f4dd HasClient instance for Stream 2017-10-20 15:09:11 -04:00
Gershom
d4168aa3ae first round of changes 2017-10-19 17:41:49 -04:00
Gershom
c5e04514f9 initial checkin 2017-10-18 18:43:43 -04:00
Catherine Galkina
262453b0d1 Add multiline Description example 2017-06-19 16:39:05 +03:00
Catherine Galkina
2e59a82d01 Add Description and Summary combinators 2017-06-08 17:35:24 +03:00
Catherine Galkina
505ca457cc Lower Sub and Alternative infix precedence to 4 and 3 respectively 2017-06-02 18:11:05 +03:00
Oleg Grenrus
b6cfd64b5a GHC-8.2 readyness 2017-05-24 08:02:57 +03:00
David Turner
249a8386a5 Derive Enum on EmptyAPI 2017-05-16 16:04:25 +00:00
David Turner
021bcd9e23 Document that EmptyAPI is, morally speaking, the unit of :<|> 2017-05-16 16:03:25 +00:00
David Turner
2c6aca0fc6 Add to ComprehensiveAPI 2017-05-16 10:26:06 +00:00
David Turner
d02c7668ee Add EmptyAPI type 2017-05-16 10:05:24 +00:00
Oleg Grenrus
57696dcd6f Merge pull request #671 from reactormonk/typeerror
TypeError annotations for AllCTRender
2017-05-14 19:38:46 +03:00
Simon Hafner
bbc872e154 Fixed unticked-promoted-constructors 2017-05-14 16:26:25 +02:00
Al Zohali
b806339200 fix minor typos 2017-03-19 23:49:52 +03:00
Oleg Grenrus
dc4b4be42e Improve formatting of haddock 2017-01-19 19:04:36 +02:00
Oleg Grenrus
58e931f48a Resolve todos 2017-01-19 11:26:50 +02:00
Oleg Grenrus
7793b52d23 Change JSON content type to add the charset 2017-01-18 13:40:18 +02:00
Simon Hafner
b3be590dad TypeError annotations for AllCTRender 2017-01-16 23:16:27 +01:00
Oleg Grenrus
c7c6c054a5 Add Logic subsection to the export list 2017-01-16 14:36:51 +02:00
Oleg Grenrus
3c83f615ca Write explicit export list in Servant.API.TypeLevel 2017-01-16 13:54:00 +02:00
Oleg Grenrus
6cf3188907 Fix doctests 2017-01-16 13:43:24 +02:00
Julian K. Arni
931e67f347 Loads of documetation and doctests. 2017-01-16 13:20:39 +02:00
Julian K. Arni
02e4281d51 Custom type errors 2017-01-16 13:20:39 +02:00
Julian K. Arni
92b1196830 Redundant import fixes 2017-01-16 13:20:39 +02:00
Nickolay Kudasov
b836f13dea Remove Elem from servant-foreign 2017-01-16 13:20:39 +02:00
Nickolay Kudasov
e9b281f3cc Add IsIn and IsSubAPI constraints 2017-01-16 13:20:39 +02:00
Nickolay Kudasov
09c8464a5a Move type-level operations from Utils.Links to API.TypeLevel 2017-01-16 13:20:37 +02:00
Oleg Grenrus
4d4bc8e9f4 Pass contentType to the mimeUnrender variant 2017-01-01 20:05:12 +02:00
Oleg Grenrus
3fec1a086a Use TupleSections, not list comprehensions 2016-11-10 21:22:01 +02:00
Oleg Grenrus
148bb15635 Make MINIMAL contentType | contentTypes 2016-11-10 21:21:15 +02:00
Oleg Grenrus
bf66b2b1ff Allow multiple content-types for single Accept 2016-11-10 21:21:15 +02:00
Julian K. Arni
9ad2efe862 Review fixes 2016-10-24 17:15:29 +02:00
Julian K. Arni
ed82056052 Add noHeader function.
Which allows not adding a header where a signature declares one, making
    response headers optional.
2016-10-21 14:36:14 +02:00
Julian K. Arni
501212e6b9 Review fixes 2016-09-12 20:40:03 -03:00
Julian K. Arni
0870b3b2f5 Remove FromFormUrlEncoded and ToFormUrlEncoded.
In favor of FromForm and ToForm from the new version of http-api-data.
2016-09-12 18:34:18 -03:00
Julian K. Arni
76e74f9d5a Add instances for IsSecure 2016-09-07 18:36:13 -03:00
Alex Mason
dbab31508e Comma style is hard 2016-09-02 23:59:36 +10:00
Alex Mason
a991cbe77c Revert version bump, update changelog 2016-09-02 23:53:18 +10:00
Alex Mason
9b5a564f3c Remove dependency on bytestring-conversion 2016-09-02 23:14:45 +10:00
Alex Mason
a1b23018f9 Replace use of ToByteString with HttpApiData for GetHeaders, fixes servant/#581
* Version bump because this changes the API for GetHeaders
2016-09-02 19:47:32 +10:00
Sönke Hahn
23493d982d add Raw to ComprehensiveAPI (and add ComprehensiveAPIWithoutRaw) 2016-08-17 23:36:30 +02:00
Arian van Putten
b714640110 Add CaptureAll to ComprehensiveAPI 2016-07-11 14:47:05 +01:00
Jonathan Lange
a616a8d689 Add CaptureAll to the API definitions 2016-07-11 14:46:31 +01:00