separated-0.3.2.1: A data type with elements separated by values

Safe HaskellNone
LanguageHaskell2010

Data.Separated.Before

Contents

Synopsis

Documentation

data Before s a Source #

An s that comes before an a

Constructors

Before s a 

Instances

Bitraversable Before Source #
bitraverse f g (Before s a) = Before <$> f s <*> g a

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Before a b -> f (Before c d) #

Bifoldable Before Source #
bifoldMap f g (Before s a) = f s <> g a

Methods

bifold :: Monoid m => Before m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Before a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Before a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Before a b -> c #

Bifunctor Before Source # 

Methods

bimap :: (a -> b) -> (c -> d) -> Before a c -> Before b d #

first :: (a -> b) -> Before a c -> Before b c #

second :: (b -> c) -> Before a b -> Before a c #

Swapped Before Source # 

Methods

swapped :: (Profunctor p, Functor f) => p (Before b a) (f (Before d c)) -> p (Before a b) (f (Before c d)) #

Functor (Before s) Source # 

Methods

fmap :: (a -> b) -> Before s a -> Before s b #

(<$) :: a -> Before s b -> Before s a #

Foldable (Before s) Source # 

Methods

fold :: Monoid m => Before s m -> m #

foldMap :: Monoid m => (a -> m) -> Before s a -> m #

foldr :: (a -> b -> b) -> b -> Before s a -> b #

foldr' :: (a -> b -> b) -> b -> Before s a -> b #

foldl :: (b -> a -> b) -> b -> Before s a -> b #

foldl' :: (b -> a -> b) -> b -> Before s a -> b #

foldr1 :: (a -> a -> a) -> Before s a -> a #

foldl1 :: (a -> a -> a) -> Before s a -> a #

toList :: Before s a -> [a] #

null :: Before s a -> Bool #

length :: Before s a -> Int #

elem :: Eq a => a -> Before s a -> Bool #

maximum :: Ord a => Before s a -> a #

minimum :: Ord a => Before s a -> a #

sum :: Num a => Before s a -> a #

product :: Num a => Before s a -> a #

Traversable (Before s) Source # 

Methods

traverse :: Applicative f => (a -> f b) -> Before s a -> f (Before s b) #

sequenceA :: Applicative f => Before s (f a) -> f (Before s a) #

mapM :: Monad m => (a -> m b) -> Before s a -> m (Before s b) #

sequence :: Monad m => Before s (m a) -> m (Before s a) #

Eq s => Eq1 (Before s) Source # 

Methods

liftEq :: (a -> b -> Bool) -> Before s a -> Before s b -> Bool #

Ord s => Ord1 (Before s) Source # 

Methods

liftCompare :: (a -> b -> Ordering) -> Before s a -> Before s b -> Ordering #

Show s => Show1 (Before s) Source # 

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Before s a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Before s a] -> ShowS #

Generic1 * (Before s) Source # 

Associated Types

type Rep1 (Before s) (f :: Before s -> *) :: k -> * #

Methods

from1 :: f a -> Rep1 (Before s) f a #

to1 :: Rep1 (Before s) f a -> f a #

(Eq a, Eq s) => Eq (Before s a) Source # 

Methods

(==) :: Before s a -> Before s a -> Bool #

(/=) :: Before s a -> Before s a -> Bool #

(Ord a, Ord s) => Ord (Before s a) Source # 

Methods

compare :: Before s a -> Before s a -> Ordering #

(<) :: Before s a -> Before s a -> Bool #

(<=) :: Before s a -> Before s a -> Bool #

(>) :: Before s a -> Before s a -> Bool #

(>=) :: Before s a -> Before s a -> Bool #

max :: Before s a -> Before s a -> Before s a #

min :: Before s a -> Before s a -> Before s a #

(Show a, Show s) => Show (Before s a) Source # 

Methods

showsPrec :: Int -> Before s a -> ShowS #

show :: Before s a -> String #

showList :: [Before s a] -> ShowS #

Generic (Before s a) Source # 

Associated Types

type Rep (Before s a) :: * -> * #

Methods

from :: Before s a -> Rep (Before s a) x #

to :: Rep (Before s a) x -> Before s a #

type Rep1 * (Before s) Source # 
type Rep1 * (Before s) = D1 * (MetaData "Before" "Data.Separated.Internal" "separated-0.3.2.1-E7YQiadtVn83kx2pgxVpuR" False) (C1 * (MetaCons "Before" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * s)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)))
type Rep (Before s a) Source # 
type Rep (Before s a) = D1 * (MetaData "Before" "Data.Separated.Internal" "separated-0.3.2.1-E7YQiadtVn83kx2pgxVpuR" False) (C1 * (MetaCons "Before" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * s)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a))))

Isos

before :: Iso (s, a) (t, b) (Before s a) (Before t b) Source #

Before s a is isomorphic to (s, a)

beforeAfter :: Iso (After a s) (After b t) (Before s a) (Before t b) Source #

Before s a is isomorphic to After a s

beforeAfter == from afterBefore