]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Resource/Internal.hs
Haddock overhaul
[Lucu.git] / Network / HTTP / Lucu / Resource / Internal.hs
index a1ad95674aefc46e360dd86d221c061439137f4a..e8aa3ef6b555da151896040e3d9640e25e9cec6f 100644 (file)
@@ -90,9 +90,9 @@ data ResourceDef = ResourceDef {
     -- resource path. If 'resGet' is Nothing, the system responds
     -- \"405 Method Not Allowed\" for GET requests.
     --
-    -- It also runs for HEAD request if the 'resHead' is Nothing. In
-    -- this case 'output' and such like don't actually write a
-    -- response body.
+    -- It also runs for HEAD request if the 'resHead' is 'Nothing'. In
+    -- that case 'putChunk' and such don't actually write a response
+    -- body.
     , resGet              ∷ !(Maybe (Resource ()))
     -- |A 'Resource' to be run when a HEAD request comes for the
     -- resource path. If 'resHead' is Nothing, the system runs
@@ -257,7 +257,7 @@ getRequest = niRequest <$> getInteraction
 -- > main = let tree = mkResTree [ (["foo"], resFoo) ]
 -- >        in runHttpd defaultConfig tree []
 -- >
--- > resFoo = ResourceDef {
+-- > resFoo = emptyResource {
 -- >     resIsGreedy = True
 -- >   , resGet = Just $ do requestURI   <- getRequestURI
 -- >                        resourcePath <- getResourcePath
@@ -266,7 +266,6 @@ getRequest = niRequest <$> getInteraction
 -- >                        -- resourcePath       == ["foo"]
 -- >                        -- pathInfo           == ["bar", "baz"]
 -- >                        ...
--- >   , ...
 -- >   }
 getResourcePath ∷ Resource [Strict.ByteString]
 getResourcePath = niResourcePath <$> getInteraction
@@ -362,7 +361,7 @@ deleteHeader name
                    writeTVar niResponseHasCType False
 
 -- |Run a 'Builder' to construct a chunk, and write it to the response
--- body. It is safe to apply this function to a 'Builder' producing an
+-- body. It can be safely applied to a 'Builder' producing an
 -- infinitely long stream of octets.
 --
 -- Note that you must first declare the response header