From 94662bffc6385c43da8941e09542a6b3d443ed70 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sat, 21 Sep 2019 20:55:17 +0200 Subject: [PATCH] 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. --- XMonad/Util/Invisible.hs | 7 ++++--- xmonad-contrib.cabal | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/XMonad/Util/Invisible.hs b/XMonad/Util/Invisible.hs index 2fa8b2bd..e1523166 100644 --- a/XMonad/Util/Invisible.hs +++ b/XMonad/Util/Invisible.hs @@ -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 _ = "" diff --git a/xmonad-contrib.cabal b/xmonad-contrib.cabal index 5591cdb4..754004f4 100644 --- a/xmonad-contrib.cabal +++ b/xmonad-contrib.cabal @@ -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,