]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Request.hs
Optimized as possible as I can.
[Lucu.git] / Network / HTTP / Lucu / Request.hs
index f8b1c93504bd34cacba81fb6b9c100547fd36025..bc1c317ddeea266ff2fa87275c5370a6fc078c81 100644 (file)
@@ -1,7 +1,12 @@
+-- #prune
+
+-- |Definition of things related on HTTP request.
+--
+-- In general you don't have to use this module directly.
 module Network.HTTP.Lucu.Request
     ( Method(..)
     , Request(..)
-    , requestP -- Parser Request
+    , requestP
     )
     where
 
@@ -13,6 +18,8 @@ import           Network.HTTP.Lucu.Parser
 import           Network.HTTP.Lucu.Parser.Http
 import           Network.URI
 
+-- |This is the definition of HTTP request methods, which shouldn't
+-- require any description.
 data Method = OPTIONS
             | GET
             | HEAD
@@ -21,16 +28,16 @@ data Method = OPTIONS
             | DELETE
             | TRACE
             | CONNECT
-            | ExtensionMethod String
+            | ExtensionMethod !String
               deriving (Eq, Show)
 
-
+-- |This is the definition of HTTP reqest.
 data Request
     = Request {
-        reqMethod  :: Method
-      , reqURI     :: URI
-      , reqVersion :: HttpVersion
-      , reqHeaders :: Headers
+        reqMethod  :: !Method
+      , reqURI     :: !URI
+      , reqVersion :: !HttpVersion
+      , reqHeaders :: !Headers
       }
     deriving (Show, Eq)