packages feed

lio-simple 0.0.1.1 → 0.0.2.0

raw patch · 4 files changed

+7/−7 lines, 4 files

Files

LIO/Web/Simple.hs view
@@ -49,7 +49,7 @@   -- | Controller with 'LIO' as the underlying monad.-type LIOController l = ControllerT (LIO l)+type LIOController l s = ControllerT s (LIO l)  -- | Parses a HTML form from the request body. It returns a list of 'Param's as -- well as a list of 'File's, which are pairs mapping the name of a /file/ form@@ -78,6 +78,6 @@   req <- request   liftLIO . ioTCB $ L8.fromChunks `fmap` (requestBody req $$ CL.consume) -instance Label l => MonadLIO l (ControllerT (LIO l) r) where+instance Label l => MonadLIO l (ControllerT r (LIO l)) where   liftLIO act = ControllerT $ \st ->        liftLIO act >>= \r -> return (Right r, st)
LIO/Web/Simple/Auth.hs view
@@ -74,11 +74,11 @@ -- | Execute action with the current user's name. Otherwise, request -- that the user authenticate. withUserOrLogin :: Monad m -                => (S8.ByteString -> ControllerT m r a)-                -> ControllerT m r a+                => (S8.ByteString -> ControllerT r m a)+                -> ControllerT r m a withUserOrLogin act = currentUser >>= \muser ->   maybe (respond requestLogin) act muser  -- | Get the current user.-currentUser :: Monad m => ControllerT m r (Maybe S8.ByteString)+currentUser :: Monad m => ControllerT r m (Maybe S8.ByteString) currentUser = requestHeader "X-User"
LIO/Web/Simple/DCLabel.hs view
@@ -16,6 +16,6 @@ import safe LIO.DCLabel import safe LIO.Web.Simple -type DCController = LIOController DCLabel+type DCController a      = LIOController DCLabel a type SimpleDCApplication = SimpleLIOApplication CNF DCLabel type SimpleDCMiddleware  = SimpleLIOMiddleware CNF DCLabel
lio-simple.cabal view
@@ -1,5 +1,5 @@ name:                lio-simple-version:             0.0.1.1+version:             0.0.2.0 synopsis:            LIO support for the Simple web framework description: