Skip to content
Snippets Groups Projects
Commit b44e2bae authored by Jens Nolte's avatar Jens Nolte
Browse files

Add Semigroup and Monoid instances to Awaitable

parent d648e229
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,12 @@ instance Monad Awaitable where
Left ex -> pure $ Left ex
Right x -> runAwaitable (fn x)
instance Semigroup r => Semigroup (Awaitable r) where
x <> y = liftA2 (<>) x y
instance Monoid r => Monoid (Awaitable r) where
mempty = pure mempty
completedAwaitable :: Either SomeException r -> Awaitable r
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment