Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quasar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jens Nolte
quasar
Commits
93ea492e
Commit
93ea492e
authored
3 years ago
by
Jens Nolte
Browse files
Options
Downloads
Patches
Plain Diff
Add stronger constraints for MonadAsync/MonadAwait
Co-authored-by:
Jan Beinke
<
git@janbeinke.com
>
parent
f7aba7a2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Quasar/Async.hs
+1
-1
1 addition, 1 deletion
src/Quasar/Async.hs
src/Quasar/Awaitable.hs
+1
-1
1 addition, 1 deletion
src/Quasar/Awaitable.hs
src/Quasar/Disposable.hs
+2
-2
2 additions, 2 deletions
src/Quasar/Disposable.hs
with
4 additions
and
4 deletions
src/Quasar/Async.hs
+
1
−
1
View file @
93ea492e
...
...
@@ -25,7 +25,7 @@ import Quasar.Disposable
import
Quasar.Prelude
class
(
MonadAwait
m
,
MonadResourceManager
m
,
Monad
Catch
m
)
=>
MonadAsync
m
where
class
(
MonadAwait
m
,
MonadResourceManager
m
,
Monad
Mask
m
)
=>
MonadAsync
m
where
-- | TODO
async
::
m
r
->
m
(
Task
r
)
async
action
=
asyncWithUnmask
(
$
action
)
...
...
This diff is collapsed.
Click to expand it.
src/Quasar/Awaitable.hs
+
1
−
1
View file @
93ea492e
...
...
@@ -72,7 +72,7 @@ class IsAwaitable r a | a -> r where
class
Monad
m
=>
MonadAwait
m
where
class
(
Monad
Catch
m
,
MonadPlus
m
)
=>
MonadAwait
m
where
await
::
IsAwaitable
r
a
=>
a
->
m
r
instance
MonadAwait
IO
where
...
...
This diff is collapsed.
Click to expand it.
src/Quasar/Disposable.hs
+
2
−
2
View file @
93ea492e
...
...
@@ -210,10 +210,10 @@ class HasResourceManager a where
instance
HasResourceManager
ResourceManager
where
getResourceManager
=
id
class
MonadIO
m
=>
MonadResourceManager
m
where
class
(
MonadMask
m
,
MonadIO
m
)
=>
MonadResourceManager
m
where
askResourceManager
::
m
ResourceManager
instance
MonadIO
m
=>
MonadResourceManager
(
ReaderT
ResourceManager
m
)
where
instance
(
MonadMask
m
,
MonadIO
m
)
=>
MonadResourceManager
(
ReaderT
ResourceManager
m
)
where
askResourceManager
=
ask
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment