mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-06 15:01:53 -07:00
XMonad.Util.Invisible: fix build with GHC 8.8.1
This change needs base-4.9.0.0 or later so that we can include Control.Monad.Fail. We could jump through hoops to support older compilers still, but it feels like it's not worthwhile.
This commit is contained in:
@@ -23,6 +23,7 @@ module XMonad.Util.Invisible (
|
|||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Applicative
|
import Control.Applicative
|
||||||
|
import Control.Monad.Fail
|
||||||
|
|
||||||
-- $usage
|
-- $usage
|
||||||
-- A wrapper data type to store layout state that shouldn't be persisted across
|
-- A wrapper data type to store layout state that shouldn't be persisted across
|
||||||
@@ -30,10 +31,10 @@ import Control.Applicative
|
|||||||
-- Invisible derives trivial definitions for Read and Show, so the wrapped data
|
-- Invisible derives trivial definitions for Read and Show, so the wrapped data
|
||||||
-- type need not do so.
|
-- type need not do so.
|
||||||
|
|
||||||
newtype Invisible m a = I (m a) deriving (Monad, Applicative, Functor)
|
newtype Invisible m a = I (m a) deriving (Monad, MonadFail, Applicative, Functor)
|
||||||
|
|
||||||
instance (Functor m, Monad m) => Read (Invisible m a) where
|
instance (Functor m, Monad m, MonadFail m) => Read (Invisible m a) where
|
||||||
readsPrec _ s = [(fail "Read Invisible", s)]
|
readsPrec _ s = [(Control.Monad.Fail.fail "Read Invisible", s)]
|
||||||
|
|
||||||
instance Monad m => Show (Invisible m a) where
|
instance Monad m => Show (Invisible m a) where
|
||||||
show _ = ""
|
show _ = ""
|
||||||
|
@@ -36,7 +36,7 @@ cabal-version: >= 1.6
|
|||||||
build-type: Simple
|
build-type: Simple
|
||||||
bug-reports: https://github.com/xmonad/xmonad-contrib/issues
|
bug-reports: https://github.com/xmonad/xmonad-contrib/issues
|
||||||
|
|
||||||
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.1, GHC==8.2.2, GHC==8.4.3, GHC==8.6.1
|
tested-with: GHC==8.0.1, GHC==8.2.2, GHC==8.4.3, GHC==8.6.1
|
||||||
|
|
||||||
source-repository head
|
source-repository head
|
||||||
type: git
|
type: git
|
||||||
@@ -52,7 +52,7 @@ flag testing
|
|||||||
default: False
|
default: False
|
||||||
|
|
||||||
library
|
library
|
||||||
build-depends: base >= 4.5 && < 5,
|
build-depends: base >= 4.9 && < 5,
|
||||||
bytestring >= 0.10 && < 0.11,
|
bytestring >= 0.10 && < 0.11,
|
||||||
containers >= 0.5 && < 0.7,
|
containers >= 0.5 && < 0.7,
|
||||||
directory,
|
directory,
|
||||||
|
Reference in New Issue
Block a user