From b514ab6ccd6b46515a01da1091ebc24031d48c22 Mon Sep 17 00:00:00 2001
From: Jens Nolte <git@queezle.net>
Date: Tue, 21 Sep 2021 19:52:00 +0200
Subject: [PATCH] Map Requests and Events to Up and Down in IsSite

Analog to how low-level messages are mapped.
---
 src/Quasar/Wayland/Protocol/Core.hs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/Quasar/Wayland/Protocol/Core.hs b/src/Quasar/Wayland/Protocol/Core.hs
index a00af4c..1cca486 100644
--- a/src/Quasar/Wayland/Protocol/Core.hs
+++ b/src/Quasar/Wayland/Protocol/Core.hs
@@ -191,12 +191,16 @@ class (
   interfaceName :: String
 
 class IsSide (s :: Side) where
+  type Up s i
+  type Down s i
   type WireUp s i
   type WireDown s i
   initialId :: Word32
   maximumId :: Word32
 
 instance IsSide 'Client where
+  type Up 'Client i = Requests i
+  type Down 'Client i = Events i
   type WireUp 'Client i = WireRequest i
   type WireDown 'Client i = WireEvent i
   -- Id #1 is reserved for wl_display
@@ -204,6 +208,8 @@ instance IsSide 'Client where
   maximumId = 0xfeffffff
 
 instance IsSide 'Server where
+  type Up 'Server i = Events i
+  type Down 'Server i = Requests i
   type WireUp 'Server i = WireEvent i
   type WireDown 'Server i = WireRequest i
   initialId = 0xff000000
-- 
GitLab