]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Httpd.hs
hlint
[Lucu.git] / Network / HTTP / Lucu / Httpd.hs
index 883a9a651f4999a893811670ebb114badc5e4bad..c127250d9ededf0a1770c43a6e3d3097e937232c 100644 (file)
@@ -21,6 +21,7 @@ import Network.HTTP.Lucu.RequestReader
 import Network.HTTP.Lucu.Resource.Tree
 import Network.HTTP.Lucu.ResponseWriter
 import Network.HTTP.Lucu.SocketLike as SL
+import Prelude.Unicode
 
 -- |This is the entry point of Lucu httpd. It listens to a socket and
 -- waits for clients. 'runHttpd' never stops by itself so the only way
@@ -29,6 +30,7 @@ import Network.HTTP.Lucu.SocketLike as SL
 -- Example:
 --
 -- > {-# LANGUAGE OverloadedStrings #-}
+-- > {-# LANGUAGE QuasiQuotes #-}
 -- > module Main where
 -- > import Network.HTTP.Lucu
 -- > 
@@ -41,7 +43,7 @@ import Network.HTTP.Lucu.SocketLike as SL
 -- > helloWorld :: ResourceDef
 -- > helloWorld = emptyResource {
 -- >                resGet
--- >                  = Just $ do setContentType $ parseMIMEType "text/plain"
+-- >                  = Just $ do setContentType [mimeType| text/plain |]
 -- >                              putChunk "Hello, world!"
 -- >              }
 runHttpd ∷ Config → ResTree → [FallbackHandler] → IO ()
@@ -75,8 +77,8 @@ runHttpd cnf tree fbs
       launchListener so
           = do p ← SL.socketPort so
                -- FIXME: Don't throw away the thread ID as we can't
-               -- kill it later then. [1]
-               void $ forkIO $ httpLoop p so
+               -- kill it later then.
+               void  forkIO $ httpLoop p so
 
       listenOn ∷ Family → HostName → ServiceName → IO Socket
       listenOn fam host srv