mirror of
https://code.naskya.net/repos/ndqEd
synced 2025-03-20 15:14:54 +09:00
S2S sharer inbox: Handle Offer{Ticket} yay!
This commit is contained in:
parent
2abb6a44a4
commit
68bdaf65a7
5 changed files with 140 additions and 17 deletions
src/Control/Monad/Trans/Except
|
@ -15,6 +15,7 @@
|
|||
|
||||
module Control.Monad.Trans.Except.Local
|
||||
( fromMaybeE
|
||||
, verifyNothingE
|
||||
)
|
||||
where
|
||||
|
||||
|
@ -23,3 +24,7 @@ import Control.Monad.Trans.Except
|
|||
fromMaybeE :: Monad m => Maybe a -> e -> ExceptT e m a
|
||||
fromMaybeE Nothing t = throwE t
|
||||
fromMaybeE (Just x) _ = return x
|
||||
|
||||
verifyNothingE :: Monad m => Maybe a -> e -> ExceptT e m ()
|
||||
verifyNothingE Nothing _ = return ()
|
||||
verifyNothingE (Just _) e = throwE e
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue