on master help sign in
Use markdown-unlit instead of pandoc-unlit for WAI example

(pandoc-unlit is deprecated)

commit0fdfaecc982e7f5fe19fa4621e1a633e029dd12a authorSimon Hengel <sol@typeful.net> dateSat 13 Oct 2012, 08:39 (14 years ago) parent833e773
2 files changed+5−5
wai/.ghci+1−1 wai/README.md+4−4
wai/.ghci+1−1
@@ -1 +1 @@
1−:set -i../warp -i../warp/dist/build/autogen/ -pgmL pandoc-unlit
1+:set -i../warp -i../warp/dist/build/autogen/ -pgmL markdown-unlit
wai/README.md+4−4
@@ -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)