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:
Peter Simons
2019-09-21 20:55:17 +02:00
parent 23102a6d5c
commit 94662bffc6
2 changed files with 6 additions and 5 deletions

View File

@@ -23,6 +23,7 @@ module XMonad.Util.Invisible (
) where
import Control.Applicative
import Control.Monad.Fail
-- $usage
-- 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
-- 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
readsPrec _ s = [(fail "Read Invisible", s)]
instance (Functor m, Monad m, MonadFail m) => Read (Invisible m a) where
readsPrec _ s = [(Control.Monad.Fail.fail "Read Invisible", s)]
instance Monad m => Show (Invisible m a) where
show _ = ""

View File

@@ -36,7 +36,7 @@ cabal-version: >= 1.6
build-type: Simple
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
type: git
@@ -52,7 +52,7 @@ flag testing
default: False
library
build-depends: base >= 4.5 && < 5,
build-depends: base >= 4.9 && < 5,
bytestring >= 0.10 && < 0.11,
containers >= 0.5 && < 0.7,
directory,