-import Network.HTTP.Lucu.HttpVersion
-import Network.HTTP.Lucu.Interaction
-import Network.HTTP.Lucu.MultipartForm
-import Network.HTTP.Lucu.Parser
-import Network.HTTP.Lucu.Postprocess
-import Network.HTTP.Lucu.Request
-import Network.HTTP.Lucu.Response
-import Network.HTTP.Lucu.MIMEType
-import Network.HTTP.Lucu.Utils
-import Network.Socket hiding (accept)
-import Network.URI hiding (path)
-import OpenSSL.X509
-
--- |The 'Resource' monad. This monad implements
--- 'Control.Monad.Trans.MonadIO' so it can do any 'Prelude.IO'
--- actions.
-newtype Resource a = Resource { unRes :: ReaderT Interaction IO a }
-
-instance Functor Resource where
- fmap f c = Resource (fmap f (unRes c))
-
-instance Monad Resource where
- c >>= f = Resource (unRes c >>= unRes . f)
- return = Resource . return
- fail = Resource . fail
-
-instance MonadIO Resource where
- liftIO = Resource . liftIO
-
-
-runRes :: Resource a -> Interaction -> IO a
+import Network.HTTP.Lucu.HttpVersion
+import Network.HTTP.Lucu.Interaction
+import Network.HTTP.Lucu.MultipartForm
+import Network.HTTP.Lucu.Postprocess
+import Network.HTTP.Lucu.Request
+import Network.HTTP.Lucu.Response
+import Network.HTTP.Lucu.MIMEType
+import Network.HTTP.Lucu.Utils
+import Network.Socket hiding (accept)
+import Network.URI hiding (path)
+import OpenSSL.X509
+import Prelude.Unicode
+
+-- |The 'Resource' monad. This monad implements 'MonadIO' so it can do
+-- any 'IO' actions.
+newtype Resource a
+ = Resource {
+ unRes ∷ ReaderT Interaction IO a
+ }
+ deriving (Applicative, Functor, Monad, MonadIO)
+
+runRes ∷ Resource a → Interaction → IO a