mirror of
https://github.com/xmonad/xmonad.git
synced 2025-05-19 00:20:22 -07:00
X.Core: Simplify DerivingVia instances
Fixes: cd86480ff7ff30eb7685b6281ce3e891497d2661 Co-authored-by: L. S. Leary <LSLeary@users.noreply.github.com>
This commit is contained in:
parent
6e35910b62
commit
be8fd7fdc9
@ -167,7 +167,7 @@ newtype ScreenDetail = SD { screenRect :: Rectangle }
|
||||
--
|
||||
newtype X a = X (ReaderT XConf (StateT XState IO) a)
|
||||
deriving (Functor, Applicative, Monad, MonadFail, MonadIO, MonadState XState, MonadReader XConf)
|
||||
deriving (Semigroup, Monoid) via Ap (ReaderT XConf (StateT XState IO)) a
|
||||
deriving (Semigroup, Monoid) via Ap X a
|
||||
|
||||
instance Default a => Default (X a) where
|
||||
def = return def
|
||||
@ -175,7 +175,7 @@ instance Default a => Default (X a) where
|
||||
type ManageHook = Query (Endo WindowSet)
|
||||
newtype Query a = Query (ReaderT Window X a)
|
||||
deriving (Functor, Applicative, Monad, MonadReader Window, MonadIO)
|
||||
deriving (Semigroup, Monoid) via Ap (ReaderT Window X) a
|
||||
deriving (Semigroup, Monoid) via Ap Query a
|
||||
|
||||
runQuery :: Query a -> Window -> X a
|
||||
runQuery (Query m) = runReaderT m
|
||||
|
Loading…
x
Reference in New Issue
Block a user