hgeometry-combinatorial-0.12.0.0: Data structures, and Data types.
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageHaskell2010

Data.Ext

Description

A pair-like data type to represent a core type that has extra information as well.

Synopsis

Documentation

data core :+ extra infixr 1 Source #

Our Ext type that represents the core datatype core extended with extra information of type extra.

Constructors

core :+ extra infixr 1 

Instances

Instances details
Bifunctor (:+) Source # 
Instance details

Defined in Data.Ext

Methods

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

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

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

Bitraversable (:+) Source # 
Instance details

Defined in Data.Ext

Methods

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

Bifoldable (:+) Source # 
Instance details

Defined in Data.Ext

Methods

bifold :: Monoid m => (m :+ m) -> m #

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

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

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

Biapplicative (:+) Source # 
Instance details

Defined in Data.Ext

Methods

bipure :: a -> b -> a :+ b #

(<<*>>) :: ((a -> b) :+ (c -> d)) -> (a :+ c) -> b :+ d #

biliftA2 :: (a -> b -> c) -> (d -> e -> f) -> (a :+ d) -> (b :+ e) -> c :+ f #

(*>>) :: (a :+ b) -> (c :+ d) -> c :+ d #

(<<*) :: (a :+ b) -> (c :+ d) -> a :+ b #

Bitraversable1 (:+) Source # 
Instance details

Defined in Data.Ext

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> (a :+ c) -> f (b :+ d) #

bisequence1 :: Apply f => (f a :+ f b) -> f (a :+ b) #

Bifoldable1 (:+) Source # 
Instance details

Defined in Data.Ext

Methods

bifold1 :: Semigroup m => (m :+ m) -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> (a :+ b) -> m #

Biapply (:+) Source # 
Instance details

Defined in Data.Ext

Methods

(<<.>>) :: ((a -> b) :+ (c -> d)) -> (a :+ c) -> b :+ d #

(.>>) :: (a :+ b) -> (c :+ d) -> c :+ d #

(<<.) :: (a :+ b) -> (c :+ d) -> a :+ b #

(Bounded core, Bounded extra) => Bounded (core :+ extra) Source # 
Instance details

Defined in Data.Ext

Methods

minBound :: core :+ extra #

maxBound :: core :+ extra #

(Eq core, Eq extra) => Eq (core :+ extra) Source # 
Instance details

Defined in Data.Ext

Methods

(==) :: (core :+ extra) -> (core :+ extra) -> Bool #

(/=) :: (core :+ extra) -> (core :+ extra) -> Bool #

(Ord core, Ord extra) => Ord (core :+ extra) Source # 
Instance details

Defined in Data.Ext

Methods

compare :: (core :+ extra) -> (core :+ extra) -> Ordering #

(<) :: (core :+ extra) -> (core :+ extra) -> Bool #

(<=) :: (core :+ extra) -> (core :+ extra) -> Bool #

(>) :: (core :+ extra) -> (core :+ extra) -> Bool #

(>=) :: (core :+ extra) -> (core :+ extra) -> Bool #

max :: (core :+ extra) -> (core :+ extra) -> core :+ extra #

min :: (core :+ extra) -> (core :+ extra) -> core :+ extra #

(Read core, Read extra) => Read (core :+ extra) Source # 
Instance details

Defined in Data.Ext

Methods

readsPrec :: Int -> ReadS (core :+ extra) #

readList :: ReadS [core :+ extra] #

readPrec :: ReadPrec (core :+ extra) #

readListPrec :: ReadPrec [core :+ extra] #

(Show core, Show extra) => Show (core :+ extra) Source # 
Instance details

Defined in Data.Ext

Methods

showsPrec :: Int -> (core :+ extra) -> ShowS #

show :: (core :+ extra) -> String #

showList :: [core :+ extra] -> ShowS #

Generic (core :+ extra) Source # 
Instance details

Defined in Data.Ext

Associated Types

type Rep (core :+ extra) :: Type -> Type #

Methods

from :: (core :+ extra) -> Rep (core :+ extra) x #

to :: Rep (core :+ extra) x -> core :+ extra #

(Semigroup core, Semigroup extra) => Semigroup (core :+ extra) Source # 
Instance details

Defined in Data.Ext

Methods

(<>) :: (core :+ extra) -> (core :+ extra) -> core :+ extra #

sconcat :: NonEmpty (core :+ extra) -> core :+ extra #

stimes :: Integral b => b -> (core :+ extra) -> core :+ extra #

(Arbitrary c, Arbitrary e) => Arbitrary (c :+ e) Source # 
Instance details

Defined in Data.Ext

Methods

arbitrary :: Gen (c :+ e) #

shrink :: (c :+ e) -> [c :+ e] #

(ToJSON core, ToJSON extra) => ToJSON (core :+ extra) Source # 
Instance details

Defined in Data.Ext

Methods

toJSON :: (core :+ extra) -> Value #

toEncoding :: (core :+ extra) -> Encoding #

toJSONList :: [core :+ extra] -> Value #

toEncodingList :: [core :+ extra] -> Encoding #

(FromJSON core, FromJSON extra) => FromJSON (core :+ extra) Source # 
Instance details

Defined in Data.Ext

Methods

parseJSON :: Value -> Parser (core :+ extra) #

parseJSONList :: Value -> Parser [core :+ extra] #

(NFData core, NFData extra) => NFData (core :+ extra) Source # 
Instance details

Defined in Data.Ext

Methods

rnf :: (core :+ extra) -> () #

type Rep (core :+ extra) Source # 
Instance details

Defined in Data.Ext

type Rep (core :+ extra) = D1 ('MetaData ":+" "Data.Ext" "hgeometry-combinatorial-0.12.0.0-VIzkyOvE5y1mf3MPLhQ6V" 'False) (C1 ('MetaCons ":+" ('InfixI 'RightAssociative 1) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 core) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 extra)))

_core :: (core :+ extra) -> core Source #

Access the core of an extended value.

_extra :: (core :+ extra) -> extra Source #

Access the extra part of an extended value.

core :: Lens (core :+ extra) (core' :+ extra) core core' Source #

Lens access to the core of an extended value.

extra :: Lens (core :+ extra) (core :+ extra') extra extra' Source #

Lens access to the extra part of an extended value.

ext :: a -> a :+ () Source #

Tag a value with the unit type.