From 3e505e9387ea498322eba4ff0ebef69c484e368e Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Thu, 23 Nov 2023 14:48:52 +0100 Subject: [PATCH] Compatibility with cond >= 0.5 (#13) --- scrive-prelude.cabal | 2 +- src/Prelude.hs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scrive-prelude.cabal b/scrive-prelude.cabal index 06fede9..665fdb0 100644 --- a/scrive-prelude.cabal +++ b/scrive-prelude.cabal @@ -1,6 +1,6 @@ cabal-version: 3.0 name: scrive-prelude -version: 1.0.2.0 +version: 1.0.2.1 author: Scrive AB maintainer: Scrive AB copyright: 2021 diff --git a/src/Prelude.hs b/src/Prelude.hs index 82fdb21..bd2ef76 100644 --- a/src/Prelude.hs +++ b/src/Prelude.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE PackageImports #-} {-# OPTIONS_GHC -fno-warn-orphans #-} @@ -167,6 +168,7 @@ import "base" Prelude hiding ) import qualified "base" Prelude as P hiding (fail) +#if !MIN_VERSION_cond(0,5,0) -- | Boolean algebra of functions. instance Boolean b => Boolean (a -> b) where true = const true @@ -177,6 +179,7 @@ instance Boolean b => Boolean (a -> b) where xor = liftA2 xor (-->) = liftA2 (-->) (<-->) = liftA2 (<-->) +#endif instance FromJSValue Text where fromJSValue = fmap T.pack . fromJSValue