on master help sign in
Merge pull request #273 from DaveCTurner/master

Various documentation fixes

commitd6e889e6732ec01c471b0c5cac182c2ab85e27cc authorMichael Snoyman <michael@snoyman.com> dateTue 22 Jul 2014, 12:48 (12 years ago) parentdc92ea72a20fa2
4 files changed+13−13
wai/Network/Wai.hs+1−1 wai/Network/Wai/Internal.hs+6−6 warp/Network/Wai/Handler/Warp.hs+4−4 warp/Network/Wai/Handler/Warp/Settings.hs+2−2
wai/Network/Wai.hs+1−1
@@ -190,7 +190,7 @@ responseHeaders (ResponseBuilder _ hs _ ) = hs
190190responseHeaders (ResponseStream _ hs _ ) = hs
191191responseHeaders (ResponseRaw _ res) = responseHeaders res
192192
193−-- | Converting the body information in 'Response' to a @StreamingBody@.
193+-- | Converting the body information in 'Response' to a 'StreamingBody'.
194194responseToStream :: Response
195195 -> ( H.Status
196196 , H.ResponseHeaders
wai/Network/Wai/Internal.hs+6−6
@@ -30,9 +30,9 @@ data Request = Request {
3030 , rawPathInfo :: B.ByteString
3131 -- | If no query string was specified, this should be empty. This value
3232 -- /will/ include the leading question mark.
33− -- Do not modify this raw value- modify queryString instead.
33+ -- Do not modify this raw value - modify queryString instead.
3434 , rawQueryString :: B.ByteString
35− -- | A list of header (a pair of key and value) in an HTTP request.
35+ -- | A list of headers (a pair of key and value) in an HTTP request.
3636 , requestHeaders :: H.RequestHeaders
3737 -- | Was this request made over an SSL connection?
3838 --
@@ -40,17 +40,17 @@ data Request = Request {
4040 -- this request over SSL, but rather whether the current connection is SSL.
4141 -- The distinction lies with reverse proxies. In many cases, the client will
4242 -- connect to a load balancer over SSL, but connect to the WAI handler
43− -- without SSL. In such a case, @isSecure@ will be @False@, but from a user
43+ -- without SSL. In such a case, 'isSecure' will be 'False', but from a user
4444 -- perspective, there is a secure connection.
4545 , isSecure :: Bool
4646 -- | The client\'s host information.
4747 , remoteHost :: SockAddr
48− -- | Path info in individual pieces- the url without a hostname/port and
48+ -- | Path info in individual pieces - the URL without a hostname/port and
4949 -- without a query string, split on forward slashes.
5050 , pathInfo :: [Text]
51− -- | Parsed query string information
51+ -- | Parsed query string information.
5252 , queryString :: H.Query
53− -- | Get the next chunk of the body. Returns an empty bytestring when the
53+ -- | Get the next chunk of the body. Returns 'B.empty' when the
5454 -- body is fully consumed.
5555 , requestBody :: IO B.ByteString
5656 -- | A location for arbitrary data to be shared by applications and middleware.
warp/Network/Wai/Handler/Warp.hs+4−4
@@ -119,7 +119,7 @@ setHost x y = y { settingsHost = x }
119119setOnException :: (Maybe Request -> SomeException -> IO ()) -> Settings -> Settings
120120setOnException x y = y { settingsOnException = x }
121121
122−-- | A function to create `Response` when an exception occurs.
122+-- | A function to create a `Response` when an exception occurs.
123123--
124124-- Default: 500, text/plain, \"Something went wrong\"
125125--
@@ -127,7 +127,7 @@ setOnException x y = y { settingsOnException = x }
127127setOnExceptionResponse :: (SomeException -> Response) -> Settings -> Settings
128128setOnExceptionResponse x y = y { settingsOnExceptionResponse = x }
129129
130−-- | What to do when a connection is open. When 'False' is returned, the
130+-- | What to do when a connection is opened. When 'False' is returned, the
131131-- connection is closed immediately. Otherwise, the connection is going on.
132132-- Default: always returns 'True'.
133133--
@@ -135,7 +135,7 @@ setOnExceptionResponse x y = y { settingsOnExceptionResponse = x }
135135setOnOpen :: (SockAddr -> IO Bool) -> Settings -> Settings
136136setOnOpen x y = y { settingsOnOpen = x }
137137
138−-- | What to do when a connection is close. Default: do nothing.
138+-- | What to do when a connection is closed. Default: do nothing.
139139--
140140-- Since 2.1.0
141141setOnClose :: (SockAddr -> IO ()) -> Settings -> Settings
@@ -154,7 +154,7 @@ setTimeout x y = y { settingsTimeout = x }
154154setManager :: Manager -> Settings -> Settings
155155setManager x y = y { settingsManager = Just x }
156156
157−-- | Cache duratoin time of file descriptors in seconds. 0 means that the cache mechanism is not used. Default value: 10
157+-- | Cache duration time of file descriptors in seconds. 0 means that the cache mechanism is not used. Default value: 10
158158setFdCacheDuration :: Int -> Settings -> Settings
159159setFdCacheDuration x y = y { settingsFdCacheDuration = x }
160160
warp/Network/Wai/Handler/Warp/Settings.hs+2−2
@@ -22,9 +22,9 @@ import qualified Data.Text.Lazy.Encoding as TLE
2222-- | Various Warp server settings. This is purposely kept as an abstract data
2323-- type so that new settings can be added without breaking backwards
2424-- compatibility. In order to create a 'Settings' value, use 'defaultSettings'
25−-- and record syntax to modify individual records. For example:
25+-- and the various \'set\' functions to modify individual fields. For example:
2626--
27−-- > defaultSettings { settingsTimeout = 20 }
27+-- > setTimeout 20 defaultSettings
2828data Settings = Settings
2929 { settingsPort :: Int -- ^ Port to listen on. Default value: 3000
3030 , settingsHost :: HostPreference -- ^ Default value: HostIPv4