summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--[-rwxr-xr-x]Setup.lhs0
-rw-r--r--bool-extras.cabal9
-rw-r--r--src/Data/Bool/Extras.hs4
3 files changed, 8 insertions, 5 deletions
diff --git a/Setup.lhs b/Setup.lhs
index 6b32049..6b32049 100755..100644
--- a/Setup.lhs
+++ b/Setup.lhs
diff --git a/bool-extras.cabal b/bool-extras.cabal
index 06b1a9e..ea7b659 100644
--- a/bool-extras.cabal
+++ b/bool-extras.cabal
@@ -1,5 +1,5 @@
name: bool-extras
-version: 0.3.0
+version: 0.4.0
synopsis: A fold function for Bool
description: The `bool' function allows folding over boolean values.
.
@@ -32,7 +32,8 @@ category: Data
build-type: Simple
cabal-version: >= 1.6
extra-source-files: examples/*.hs
-hs-source-dirs: src
-exposed-modules: Data.Bool.Extras
-build-depends: base >= 3 && < 5
+library
+ build-depends: base >= 3 && < 5
+ hs-source-dirs: src
+ exposed-modules: Data.Bool.Extras
diff --git a/src/Data/Bool/Extras.hs b/src/Data/Bool/Extras.hs
index c625874..5371d2d 100644
--- a/src/Data/Bool/Extras.hs
+++ b/src/Data/Bool/Extras.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
-- | This module provides some convenient functions for dealing with Booleans.
--
-- The most important one being 'bool', a function that can be used in place of
@@ -27,6 +28,7 @@ import Control.Monad
import Data.Bool
import Data.Monoid
+#if !MIN_VERSION_base(4,7,0)
-- | Defines the fold over a boolean value.
--
-- Returns its first argument when applied to `False',
@@ -40,7 +42,7 @@ bool x _ False = x
bool _ y True = y
-- Expressed in terms of `cata':
-- bool = curry cata
-
+#endif
-- | Boolean operation for monoids.
--