Fix broken docs (#52)
This commit is contained in:
parent
e3985bd86f
commit
14bb2caefc
@ -14,13 +14,13 @@ import HTTPure.HTTPureM as HTTPureM
|
|||||||
import HTTPure.Request as Request
|
import HTTPure.Request as Request
|
||||||
import HTTPure.Response as Response
|
import HTTPure.Response as Response
|
||||||
|
|
||||||
-- | The ResponseM type simply conveniently wraps up an HTTPure monad that
|
-- | The ServerM type simply conveniently wraps up an HTTPure monad that
|
||||||
-- | returns a Unit. This type is the return type of the HTTPure serve and
|
-- | returns a Unit. This type is the return type of the HTTPure serve and
|
||||||
-- | related methods.
|
-- | related methods.
|
||||||
type ServerM e = HTTPureM.HTTPureM e Unit
|
type ServerM e = HTTPureM.HTTPureM e Unit
|
||||||
|
|
||||||
-- | This function a method which takes a request and returns a ResponseM, an
|
-- | This function takes a method which takes a request and returns a ResponseM,
|
||||||
-- | HTTP request, and an HTTP response. It runs the request, extracts the
|
-- | an HTTP request, and an HTTP response. It runs the request, extracts the
|
||||||
-- | Response from the ResponseM, and sends the Response to the HTTP Response.
|
-- | Response from the ResponseM, and sends the Response to the HTTP Response.
|
||||||
handleRequest :: forall e.
|
handleRequest :: forall e.
|
||||||
(Request.Request -> Response.ResponseM e) ->
|
(Request.Request -> Response.ResponseM e) ->
|
||||||
@ -33,7 +33,7 @@ handleRequest router request response = do
|
|||||||
EffClass.liftEff $ router req >>= Response.send response
|
EffClass.liftEff $ router req >>= Response.send response
|
||||||
pure unit
|
pure unit
|
||||||
|
|
||||||
-- | Given an options object, an function mapping Request to ResponseM, and an
|
-- | Given an options object, a function mapping Request to ResponseM, and an
|
||||||
-- | HTTPureM containing effects to run on boot, creates and runs a HTTPure
|
-- | HTTPureM containing effects to run on boot, creates and runs a HTTPure
|
||||||
-- | server.
|
-- | server.
|
||||||
boot :: forall e.
|
boot :: forall e.
|
||||||
|
Loading…
Reference in New Issue
Block a user