Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qbar
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
Container Registry
Model registry
Operate
Environments
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
jktr
qbar
Commits
dd550005
Verified
Commit
dd550005
authored
5 years ago
by
Legy (Beini)
Browse files
Options
Downloads
Patches
Plain Diff
Add a liftBarIO function and make MonadBarIO more generic
parent
a921390c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/QBar/Core.hs
+7
-5
7 additions, 5 deletions
src/QBar/Core.hs
with
7 additions
and
5 deletions
src/QBar/Core.hs
+
7
−
5
View file @
dd550005
...
...
@@ -87,13 +87,15 @@ newtype BarUpdateChannel = BarUpdateChannel (IO ())
type
BarUpdateEvent
=
Event
.
Event
class
MonadBarIO
m
where
ask
Bar
::
m
Bar
class
(
Monad
m
)
=>
MonadBarIO
m
where
lift
Bar
IO
::
Bar
IO
a
->
m
a
instance
MonadBarIO
BarIO
where
ask
Bar
=
lift
ask
instance
MonadBarIO
(
Proxy
a'
a
b'
b
BarIO
)
where
ask
Bar
=
lift
ask
Bar
lift
Bar
IO
=
id
instance
(
MonadBarIO
m
)
=>
MonadBarIO
(
Proxy
a'
a
b'
b
m
)
where
lift
Bar
IO
=
lift
.
lift
Bar
IO
askBar
::
MonadBarIO
m
=>
m
Bar
askBar
=
liftBarIO
$
lift
ask
mkBlockState
::
BlockOutput
->
BlockState
mkBlockState
blockOutput
=
Just
(
blockOutput
,
Nothing
)
...
...
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