@@ -6,7 +6,7 @@ Getting started
66
77You want a minimal example? Here it is!
88
9−~~~ {.haskell .literate}
9+~~~ {.haskell}
1010{-# LANGUAGE OverloadedStrings #-}
1111import Network.Wai
1212import Network.HTTP.Types
@@ -50,7 +50,7 @@ We can modify our previous example to serve static content. For this create a fi
5050
5151Now we redefine `responseBody` to refer to that file:
5252
53−~~~ {.haskell .literate}
53+~~~ {.haskell}
5454app2 :: Application
5555app2 _ = return index
5656
@@ -72,7 +72,7 @@ An `Application` maps `Request`s to `Response`s:
7272
7373Depending on the path info provided with each `Request` we can serve different `Response`s:
7474
75−~~~ {.haskell .literate}
75+~~~ {.haskell}
7676app3 :: Application
7777app3 request = case rawPathInfo request of
7878 "/" -> return index
@@ -97,7 +97,7 @@ Doing without overloaded strings
9797
9898For the sake of efficiency, WAI uses the [bytestring] package. We used GHCs [overloaded strings] to almost hide this fact. But we can easily do without. What follows is a more verbose definition of `notFound`, that works without GHC extensions:
9999
100−~~~ {.haskell}
100+~~~ {.haskell .ignore}
101101import qualified Data.ByteString.Char8 as B8
102102import qualified Data.ByteString.Lazy.Char8 as LB8
103103import Data.CaseInsensitive (mk)