2 -- PVP: +-+------- breaking API changes
3 -- | | +----- non-breaking API additions
4 -- | | | +--- code changes with no API change
5 version: 0.1.1.20190410
7 synopsis: Symantic combinators for deriving clients or a server from an HTTP API
9 An extensible, typed and embedded Domain-Specific Language (DSL)
10 to build Web services using a write-an-API-then-derive-code-from-it approach
11 as in <https://hackage.haskell.org/package/servant servant>,
12 but with term-level combinators instead of type-level combinators.
14 In this approach, writting an API can be understood
15 like the writing of a printf's or scanf's format:
16 such that deriving a client is like calling printf on both this format
17 and arguments type-checking against the given format,
18 and deriving a server is like calling scanf on both this format
19 and handlers type-checking against the given format.
21 * For building an HTTP client (request building and response decoding)
22 based upon <https://hackage.haskell.org/package/http-client http-client>,
23 see <https://hackage.haskell.org/package/symantic-http-client symantic-http-client>.
24 * For building an HTTP server (request routing and response building)
25 based upon <https://hackage.haskell.org/package/warp warp>,
26 see <https://hackage.haskell.org/package/symantic-http-server symantic-http-server>.
27 * For streaming data (running effects (eg. in IO) during the transfer)
28 using <https://hackage.haskell.org/package/pipes pipes>,
29 see <https://hackage.haskell.org/package/symantic-http-pipes symantic-http-pipes>.
31 For learning how to use this library, you can read the demo example
32 in <https://hackage.haskell.org/package/symantic-http-demo symantic-http-demo>.
34 WARNING: Be aware that this library is young
35 (thus its interface can change without warnings and delays),
36 has no community explicitely committed to support it (thus can die without warning),
37 is poorly tested (thus even less ready for serious work),
38 and — last but not least — is yours as a common for the commons
39 (with the help of its <http://www.gnu.org/licenses GNU GPLv3> license).
41 Users of this library can be grateful to the <https://hackage.haskell.org/package/servant servant>'s contributors
42 whose work was helpful to have a concrete overview
43 of the functionnalities this library could attain,
44 and thank <http://okmij.org Oleg Kiselyov> whose (once again) mind-blowing (co-)work
45 on <http://okmij.org/ftp/typed-formatting/ typed formatting>
46 was helpful to overcome the limitation
47 of <http://okmij.org/ftp/tagless-final/ one-type-parameter symantics>.
48 Indeed the fundamental observation upon which this library is built
49 is that <http://okmij.org/ftp/tagless-final/ one-type-parameter symantics> (repr a)
50 (aka. Tagless-Final typed DSL — basically just a clever use of type classes and instances)
51 can be augmented with an extension type (repr (a -> k) k)
52 extending a function to the right — while forming a category.
53 Which makes term-level combinators able to add arguments to a function
54 within the type they will be instantiated to (repr),
55 such that this library's combinators
56 (that you can extend by just writing a new type class)
57 can be used to write an API instantiable as:
58 a function asking arguments to generate a client's request,
59 or a function asking handlers to generate a server's response,
60 or some documentation type, or any other type
61 for which you can write the type class instances
62 required by the API combinators you use.
66 stability: experimental
67 author: Julien Moutinho <julm+symantic-http@autogeree.net>
68 maintainer: Julien Moutinho <julm+symantic-http@autogeree.net>
69 bug-reports: Julien Moutinho <julm+symantic-http@autogeree.net>
74 tested-with: GHC==8.6.5
79 Source-Repository head
80 location: git://git.autogeree.net/symantic-http
89 default-language: Haskell2010
108 -Wincomplete-uni-patterns
109 -Wincomplete-record-updates
111 -- -fhide-source-paths
115 , http-api-data >= 0.4
121 , transformers >= 0.5