2017-05-25 19:12:29 +00:00
|
|
|
module HTTPure.HTTPureM
|
2017-07-14 06:28:57 +00:00
|
|
|
( HTTPureM
|
2017-07-18 05:25:14 +00:00
|
|
|
, HTTPureEffects
|
2017-05-25 19:12:29 +00:00
|
|
|
) where
|
|
|
|
|
2017-07-10 10:17:13 +00:00
|
|
|
import Control.Monad.Eff as Eff
|
2017-07-18 05:25:14 +00:00
|
|
|
import Control.Monad.Eff.Exception as Exception
|
|
|
|
import Control.Monad.ST as ST
|
2017-07-10 10:17:13 +00:00
|
|
|
import Node.HTTP as HTTP
|
|
|
|
|
2017-07-18 05:25:14 +00:00
|
|
|
-- | A row of types that are used by an HTTPure server.
|
|
|
|
type HTTPureEffects e =
|
|
|
|
( http :: HTTP.HTTP
|
|
|
|
, st :: ST.ST String
|
|
|
|
, exception :: Exception.EXCEPTION
|
|
|
|
| e
|
|
|
|
)
|
|
|
|
|
2017-07-14 06:28:57 +00:00
|
|
|
-- | The `HTTPureM` monad represents effects run by an HTTPure server. It takes
|
|
|
|
-- | an effects row parameter which enumerates all other side-effects performed
|
|
|
|
-- | while carrying out the server actions.
|
2017-07-18 05:25:14 +00:00
|
|
|
type HTTPureM e t = Eff.Eff (HTTPureEffects e) t
|