From 3a5d965333bb2d7a115e4de05d88ada48fd1d677 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sun, 4 Feb 2024 15:20:53 -0700 Subject: Overhaul how Wml is implemented. This adds a new "KeyFeed" monad which is reminiscent of a parsec-type monad. This allows keys like 'g' to be mapped using a subbind and the actual WML part be handled in the catch-all handler. This also significantly cleans up the typing and complexity of the Wml implementation. --- src/Rahm/Desktop/Common.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Rahm/Desktop/Common.hs') diff --git a/src/Rahm/Desktop/Common.hs b/src/Rahm/Desktop/Common.hs index 125d651..ae4f531 100644 --- a/src/Rahm/Desktop/Common.hs +++ b/src/Rahm/Desktop/Common.hs @@ -20,6 +20,7 @@ module Rahm.Desktop.Common pointerWindow, getDisplayAndRoot, Location (..), + Xish(..), ) where @@ -246,3 +247,9 @@ duplWindow = runQuery $ do (a : (init -> as)) -> X.safeSpawn a as _ -> return () Left err -> logs Info "%s" (err :: String) + +class (Monad m) => Xish m where + liftFromX :: X a -> m a + +instance Xish X where + liftFromX = id -- cgit