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(..)
|
||||
, AlongsideLeft(..)
|
||||
, AlongsideRight(..)
|
||||
, bool
|
||||
) where
|
||||
|
||||
import Control.Applicative(Applicative(..))
|
||||
|
@ -178,3 +179,15 @@ data AlongsideRight f a b =
|
|||
instance Functor f => Functor (AlongsideRight f a) where
|
||||
fmap f (AlongsideRight 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
|
||||
|
||||
import Control.Applicative(Applicative((<*>)))
|
||||
import Data.Bool(bool)
|
||||
import Data.Char(toUpper)
|
||||
import Data.Map(Map)
|
||||
import qualified Data.Map as Map(insert, delete, lookup)
|
||||
import Data.Set(Set)
|
||||
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)
|
||||
|
||||
-- $setup
|
||||
|
|
|
@ -74,7 +74,6 @@ module Lets.Lens (
|
|||
) where
|
||||
|
||||
import Control.Applicative(Applicative((<*>), pure))
|
||||
import Data.Bool(bool)
|
||||
import Data.Char(toUpper)
|
||||
import Data.Foldable(Foldable(foldMap))
|
||||
import Data.Functor((<$>))
|
||||
|
@ -83,7 +82,7 @@ import qualified Data.Map as Map(insert, delete, lookup)
|
|||
import Data.Monoid(Monoid)
|
||||
import qualified Data.Set as Set(Set, insert, delete, member)
|
||||
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.Profunctor(Profunctor(dimap))
|
||||
import Prelude hiding (product)
|
||||
|
|
|
@ -42,13 +42,12 @@ module Lets.OpticPolyLens (
|
|||
, modifyIntandLengthEven
|
||||
) where
|
||||
|
||||
import Data.Bool(bool)
|
||||
import Data.Char(toUpper)
|
||||
import Data.Map(Map)
|
||||
import qualified Data.Map as Map(insert, delete, lookup)
|
||||
import Data.Set(Set)
|
||||
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)
|
||||
|
||||
-- $setup
|
||||
|
|
|
@ -45,14 +45,13 @@ module Lets.StoreLens (
|
|||
) where
|
||||
|
||||
import Control.Applicative(Applicative((<*>)))
|
||||
import Data.Bool(bool)
|
||||
import Data.Char(toUpper)
|
||||
import Data.Functor((<$>))
|
||||
import Data.Map(Map)
|
||||
import qualified Data.Map as Map(insert, delete, lookup)
|
||||
import Data.Set(Set)
|
||||
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)
|
||||
|
||||
-- $setup
|
||||
|
|
Loading…
Reference in a new issue