mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-23 07:23:48 -07:00
Expose instances to haddock
While haddock may have choked on -XGeneralizedNewtypeDeriving before, this is no longer the case. Also this doesn't change the results with a recent haddock (2.9.2)
This commit is contained in:
@@ -135,9 +135,7 @@ data ScreenDetail = SD { screenRect :: !Rectangle } deriving (Eq,Show, Read)
|
|||||||
-- instantiated on 'XConf' and 'XState' automatically.
|
-- instantiated on 'XConf' and 'XState' automatically.
|
||||||
--
|
--
|
||||||
newtype X a = X (ReaderT XConf (StateT XState IO) a)
|
newtype X a = X (ReaderT XConf (StateT XState IO) a)
|
||||||
#ifndef __HADDOCK__
|
|
||||||
deriving (Functor, Monad, MonadIO, MonadState XState, MonadReader XConf, Typeable)
|
deriving (Functor, Monad, MonadIO, MonadState XState, MonadReader XConf, Typeable)
|
||||||
#endif
|
|
||||||
|
|
||||||
instance Applicative X where
|
instance Applicative X where
|
||||||
pure = return
|
pure = return
|
||||||
@@ -149,9 +147,7 @@ instance (Monoid a) => Monoid (X a) where
|
|||||||
|
|
||||||
type ManageHook = Query (Endo WindowSet)
|
type ManageHook = Query (Endo WindowSet)
|
||||||
newtype Query a = Query (ReaderT Window X a)
|
newtype Query a = Query (ReaderT Window X a)
|
||||||
#ifndef __HADDOCK__
|
|
||||||
deriving (Functor, Monad, MonadReader Window, MonadIO)
|
deriving (Functor, Monad, MonadReader Window, MonadIO)
|
||||||
#endif
|
|
||||||
|
|
||||||
runQuery :: Query a -> Window -> X a
|
runQuery :: Query a -> Window -> X a
|
||||||
runQuery (Query m) w = runReaderT m w
|
runQuery (Query m) w = runReaderT m w
|
||||||
|
Reference in New Issue
Block a user