No longer use Data.Bool for GHC 7.6 users
This commit is contained in:
parent
dfb45eb66a
commit
161d1b0e24
5 changed files with 17 additions and 8 deletions
|
@ -16,6 +16,7 @@ module Lets.Data (
|
||||||
, Identity(..)
|
, Identity(..)
|
||||||
, AlongsideLeft(..)
|
, AlongsideLeft(..)
|
||||||
, AlongsideRight(..)
|
, AlongsideRight(..)
|
||||||
|
, bool
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Applicative(Applicative(..))
|
import Control.Applicative(Applicative(..))
|
||||||
|
@ -178,3 +179,15 @@ data AlongsideRight f a b =
|
||||||
instance Functor f => Functor (AlongsideRight f a) where
|
instance Functor f => Functor (AlongsideRight f a) where
|
||||||
fmap f (AlongsideRight x) =
|
fmap f (AlongsideRight x) =
|
||||||
AlongsideRight (fmap (\(a, b) -> (a, f b)) x)
|
AlongsideRight (fmap (\(a, b) -> (a, f b)) x)
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
bool ::
|
||||||
|
a
|
||||||
|
-> a
|
||||||
|
-> Bool
|
||||||
|
-> a
|
||||||
|
bool f _ False =
|
||||||
|
f
|
||||||
|
bool _ t True =
|
||||||
|
t
|
||||||
|
|
|
@ -38,13 +38,12 @@ module Lets.GetSetLens (
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Applicative(Applicative((<*>)))
|
import Control.Applicative(Applicative((<*>)))
|
||||||
import Data.Bool(bool)
|
|
||||||
import Data.Char(toUpper)
|
import Data.Char(toUpper)
|
||||||
import Data.Map(Map)
|
import Data.Map(Map)
|
||||||
import qualified Data.Map as Map(insert, delete, lookup)
|
import qualified Data.Map as Map(insert, delete, lookup)
|
||||||
import Data.Set(Set)
|
import Data.Set(Set)
|
||||||
import qualified Data.Set as Set(insert, delete, member)
|
import qualified Data.Set as Set(insert, delete, member)
|
||||||
import Lets.Data(Person(Person), Locality(Locality), Address(Address))
|
import Lets.Data(Person(Person), Locality(Locality), Address(Address), bool)
|
||||||
import Prelude hiding (product)
|
import Prelude hiding (product)
|
||||||
|
|
||||||
-- $setup
|
-- $setup
|
||||||
|
|
|
@ -74,7 +74,6 @@ module Lets.Lens (
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Applicative(Applicative((<*>), pure))
|
import Control.Applicative(Applicative((<*>), pure))
|
||||||
import Data.Bool(bool)
|
|
||||||
import Data.Char(toUpper)
|
import Data.Char(toUpper)
|
||||||
import Data.Foldable(Foldable(foldMap))
|
import Data.Foldable(Foldable(foldMap))
|
||||||
import Data.Functor((<$>))
|
import Data.Functor((<$>))
|
||||||
|
@ -83,7 +82,7 @@ import qualified Data.Map as Map(insert, delete, lookup)
|
||||||
import Data.Monoid(Monoid)
|
import Data.Monoid(Monoid)
|
||||||
import qualified Data.Set as Set(Set, insert, delete, member)
|
import qualified Data.Set as Set(Set, insert, delete, member)
|
||||||
import Data.Traversable(Traversable(traverse))
|
import Data.Traversable(Traversable(traverse))
|
||||||
import Lets.Data(AlongsideLeft(AlongsideLeft, getAlongsideLeft), AlongsideRight(AlongsideRight, getAlongsideRight), Identity(Identity, getIdentity), Const(Const, getConst), Tagged(Tagged, getTagged), IntOr(IntOrIs, IntOrIsNot), IntAnd(IntAnd), Person(Person), Locality(Locality), Address(Address))
|
import Lets.Data(AlongsideLeft(AlongsideLeft, getAlongsideLeft), AlongsideRight(AlongsideRight, getAlongsideRight), Identity(Identity, getIdentity), Const(Const, getConst), Tagged(Tagged, getTagged), IntOr(IntOrIs, IntOrIsNot), IntAnd(IntAnd), Person(Person), Locality(Locality), Address(Address), bool)
|
||||||
import Lets.Choice(Choice(left, right))
|
import Lets.Choice(Choice(left, right))
|
||||||
import Lets.Profunctor(Profunctor(dimap))
|
import Lets.Profunctor(Profunctor(dimap))
|
||||||
import Prelude hiding (product)
|
import Prelude hiding (product)
|
||||||
|
|
|
@ -42,13 +42,12 @@ module Lets.OpticPolyLens (
|
||||||
, modifyIntandLengthEven
|
, modifyIntandLengthEven
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Data.Bool(bool)
|
|
||||||
import Data.Char(toUpper)
|
import Data.Char(toUpper)
|
||||||
import Data.Map(Map)
|
import Data.Map(Map)
|
||||||
import qualified Data.Map as Map(insert, delete, lookup)
|
import qualified Data.Map as Map(insert, delete, lookup)
|
||||||
import Data.Set(Set)
|
import Data.Set(Set)
|
||||||
import qualified Data.Set as Set(insert, delete, member)
|
import qualified Data.Set as Set(insert, delete, member)
|
||||||
import Lets.Data(AlongsideLeft(AlongsideLeft, getAlongsideLeft), AlongsideRight(AlongsideRight, getAlongsideRight), Identity(Identity, getIdentity), Const(Const, getConst), IntAnd(IntAnd), Person(Person), Locality(Locality), Address(Address))
|
import Lets.Data(AlongsideLeft(AlongsideLeft, getAlongsideLeft), AlongsideRight(AlongsideRight, getAlongsideRight), Identity(Identity, getIdentity), Const(Const, getConst), IntAnd(IntAnd), Person(Person), Locality(Locality), Address(Address), bool)
|
||||||
import Prelude hiding (product)
|
import Prelude hiding (product)
|
||||||
|
|
||||||
-- $setup
|
-- $setup
|
||||||
|
|
|
@ -45,14 +45,13 @@ module Lets.StoreLens (
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Applicative(Applicative((<*>)))
|
import Control.Applicative(Applicative((<*>)))
|
||||||
import Data.Bool(bool)
|
|
||||||
import Data.Char(toUpper)
|
import Data.Char(toUpper)
|
||||||
import Data.Functor((<$>))
|
import Data.Functor((<$>))
|
||||||
import Data.Map(Map)
|
import Data.Map(Map)
|
||||||
import qualified Data.Map as Map(insert, delete, lookup)
|
import qualified Data.Map as Map(insert, delete, lookup)
|
||||||
import Data.Set(Set)
|
import Data.Set(Set)
|
||||||
import qualified Data.Set as Set(insert, delete, member)
|
import qualified Data.Set as Set(insert, delete, member)
|
||||||
import Lets.Data(Store(Store), Person(Person), Locality(Locality), Address(Address))
|
import Lets.Data(Store(Store), Person(Person), Locality(Locality), Address(Address), bool)
|
||||||
import Prelude hiding (product)
|
import Prelude hiding (product)
|
||||||
|
|
||||||
-- $setup
|
-- $setup
|
||||||
|
|
Loading…
Reference in a new issue