Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quasar-wayland
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-wayland
Commits
697e1c89
Commit
697e1c89
authored
3 years ago
by
Jens Nolte
Browse files
Options
Downloads
Patches
Plain Diff
Move getUp/getDown out of class
parent
47edb0e9
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/Quasar/Wayland/Protocol/Core.hs
+8
-6
8 additions, 6 deletions
src/Quasar/Wayland/Protocol/Core.hs
with
8 additions
and
6 deletions
src/Quasar/Wayland/Protocol/Core.hs
+
8
−
6
View file @
697e1c89
...
@@ -172,19 +172,14 @@ class (
...
@@ -172,19 +172,14 @@ class (
class
IsSide
(
s
::
Side
)
where
class
IsSide
(
s
::
Side
)
where
type
Up
s
i
type
Up
s
i
type
Down
s
i
type
Down
s
i
getDown
::
forall
m
i
.
IsInterface
i
=>
Object
s
m
i
->
Opcode
->
Get
(
Down
s
i
)
instance
IsSide
'Client
where
instance
IsSide
'Client
where
type
Up
'Client
i
=
Request
i
type
Up
'Client
i
=
Request
i
type
Down
'Client
i
=
Event
i
type
Down
'Client
i
=
Event
i
getDown
::
forall
m
i
.
IsInterface
i
=>
Object
'Client
m
i
->
Opcode
->
Get
(
Down
'Client
i
)
getDown
=
getMessage
@
(
Down
'Client
i
)
instance
IsSide
'Server
where
instance
IsSide
'Server
where
type
Up
'Server
i
=
Event
i
type
Up
'Server
i
=
Event
i
type
Down
'Server
i
=
Request
i
type
Down
'Server
i
=
Request
i
getDown
::
forall
m
i
.
IsInterface
i
=>
Object
'Server
m
i
->
Opcode
->
Get
(
Down
'Server
i
)
getDown
=
getMessage
@
(
Down
'Server
i
)
--- | Empty class, used to combine constraints
--- | Empty class, used to combine constraints
...
@@ -197,6 +192,13 @@ class (
...
@@ -197,6 +192,13 @@ class (
=>
IsInterfaceSide
(
s
::
Side
)
i
=>
IsInterfaceSide
(
s
::
Side
)
i
getDown
::
forall
s
m
i
.
IsInterfaceSide
s
i
=>
Object
s
m
i
->
Opcode
->
Get
(
Down
s
i
)
getDown
=
getMessage
@
(
Down
s
i
)
putUp
::
forall
s
i
.
IsInterfaceSide
s
i
=>
Up
s
i
->
Put
putUp
=
putMessage
@
(
Up
s
i
)
class
IsInterfaceSide
s
i
=>
IsInterfaceHandler
s
m
i
a
where
class
IsInterfaceSide
s
i
=>
IsInterfaceHandler
s
m
i
a
where
handleMessage
::
a
->
Object
s
m
i
->
Down
s
i
->
ProtocolAction
s
m
()
handleMessage
::
a
->
Object
s
m
i
->
Down
s
i
->
ProtocolAction
s
m
()
...
@@ -409,7 +411,7 @@ feedInput bytes = protocolStep do
...
@@ -409,7 +411,7 @@ feedInput bytes = protocolStep do
inboxDecoder
=
pushChunk
st
.
inboxDecoder
bytes
inboxDecoder
=
pushChunk
st
.
inboxDecoder
bytes
}
}
sendMessage
::
(
IsSide
s
,
MonadCatch
m
)
=>
Object
s
m
i
->
Up
s
i
->
ProtocolStep
s
m
()
sendMessage
::
(
Is
Interface
Side
s
i
,
MonadCatch
m
)
=>
Object
s
m
i
->
Up
s
i
->
ProtocolStep
s
m
()
sendMessage
object
message
=
protocolStep
do
sendMessage
object
message
=
protocolStep
do
undefined
message
undefined
message
runCallbacks
runCallbacks
...
...
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