]> Git — Sourcephile - haskell/symantic-http.git/blob - symantic-http/symantic-http.cabal
e40435482917f60ade85e6114ee9378f198e0641
[haskell/symantic-http.git] / symantic-http / symantic-http.cabal
1 name: symantic-http
2 -- PVP: +-+------- breaking API changes
3 -- | | +----- non-breaking API additions
4 -- | | | +--- code changes with no API change
5 version: 0.1.1.20190410
6 category: Protocol
7 synopsis: Symantic combinators for deriving clients or a server from an HTTP API
8 description:
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.
13 .
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.
20 .
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>.
30 .
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>.
33 .
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).
40 .
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.
63 extra-doc-files:
64 license: GPL-3
65 license-file: COPYING
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>
70 -- homepage:
71
72 build-type: Simple
73 cabal-version: 1.24
74 tested-with: GHC==8.4.4
75 extra-source-files:
76 stack.yaml
77 extra-tmp-files:
78
79 Source-Repository head
80 location: git://git.autogeree.net/symantic-http
81 type: git
82
83 Library
84 exposed-modules:
85 Symantic.HTTP
86 Symantic.HTTP.API
87 Symantic.HTTP.MIME
88 Symantic.HTTP.URI
89 default-language: Haskell2010
90 default-extensions:
91 AllowAmbiguousTypes
92 DataKinds
93 FlexibleContexts
94 FlexibleInstances
95 InstanceSigs
96 LambdaCase
97 MultiParamTypeClasses
98 NamedFieldPuns
99 NoImplicitPrelude
100 RecordWildCards
101 ScopedTypeVariables
102 TupleSections
103 TypeApplications
104 TypeFamilies
105 TypeOperators
106 ghc-options:
107 -Wall
108 -Wincomplete-uni-patterns
109 -Wincomplete-record-updates
110 -fno-warn-tabs
111 -- -fhide-source-paths
112 build-depends:
113 base >= 4.10 && < 5
114 , bytestring >= 0.10
115 , http-api-data >= 0.4
116 , http-media >= 0.7
117 , http-types >= 0.12
118 , network-uri >= 2.6
119 , stm >= 2.4.5
120 , text >= 1.2
121 , transformers >= 0.5