@@ -1,14 +1,14 @@
11% WAI-KW.tex
2−\begin{hcarentry}[updated]{WAI}
2+\begin{hcarentry}{WAI}
33\label{wai}
44\report{Kazu Yamamoto}%11/16
55\participants{Michael Snoyman, Greg Weber}
66\status{stable}
77\makeheader
88
9−WAI (Web Application Interface) is an application interface
10−between web applications and handlers in Haskell.
11−The \texttt{Application} data type is defined as follows:
9+WAI (Web Application Interface) is an application interface between web
10+applications and handlers in Haskell. The \texttt{Application} data type is
11+defined as follows:
1212
1313\begin{verbatim}
1414type Application
@@ -17,29 +17,22 @@ type Application
1717 -> IO ResponseReceived
1818\end{verbatim}
1919
20−That is, a WAI application takes two arguments: a \texttt{Request} and
21−a function to send a \texttt{Response}.
22−So, the typical behavior of WAI application is
23−processing a request,
24−generating a response and
25−passing the response to the function.
26−
27−Historically speaking, this interface made possible to develop handlers
28−other than HTTP.
29−The WAI applications can run through FastCGI (wai-handler-fastcgi),
30−run as stand-alone (wai-handler-webkit), etc.
31−But the most popular handler is based on HTTP, of course.
32−The major HTTP handler for WAI is Warp which now provides
33−both HTTP/1.1 and HTTP/2. TLS (warp-tls) is also available.
34−New transports such as
35−WebSocket (wai-websocket) and Event Source (wai-extra)
36−can be implemented, too.
37−
38−It is possible to develop WAI applications directly.
39−For instance, Hoogle and Mighttpd2 take this way.
40−However, you may want to use web application frameworks
41−such as Apiary, MFlow, rest, Servant, Scotty, Spock,
42−Yesod, etc.
20+That is, a WAI application takes two arguments: a \texttt{Request} and a
21+function to send a \texttt{Response}. So, the typical behavior of WAI
22+application is processing a request, generating a response and passing the
23+response to the function.
24+
25+Historically speaking, this interface made possible to develop handlers other
26+than HTTP. The WAI applications can run through FastCGI
27+(wai-handler-fastcgi), run as stand-alone (wai-handler-webkit), etc. But the
28+most popular handler is based on HTTP, of course. The major HTTP handler for
29+WAI is Warp which now provides both HTTP/1.1 and HTTP/2. TLS (warp-tls) is
30+also available. New transports such as WebSocket (wai-websocket) and Event
31+Source (wai-extra) can be implemented, too.
32+
33+It is possible to develop WAI applications directly. For instance, Hoogle and
34+Mighttpd2 take this way. However, you may want to use web application
35+frameworks such as Apiary, MFlow, rest, Servant, Scotty, Spock, Yesod, etc.
4336
4437WAI also provides \texttt{Middleware}:
4538
@@ -47,7 +40,8 @@ WAI also provides \texttt{Middleware}:
4740type Middleware = Application -> Application
4841\end{verbatim}
4942
50−WAI middleware can inspect and transform a request, for example by automatically gzipping a response or logging a request (wai-extra).
43+WAI middleware can inspect and transform a request, for example by
44+automatically gzipping a response or logging a request (wai-extra).
5145
5246Since the last HCAR, no major changes were made.
5347