vinyl-0.8.1.1: Extensible Records

Safe HaskellNone
LanguageHaskell2010

Data.Vinyl.Notation

Synopsis

Documentation

(<+>) :: Rec f as -> Rec f bs -> Rec f (as ++ bs) infixr 5 Source #

A shorthand for rappend.

(<<*>>) :: Rec (Lift (->) f g) rs -> Rec f rs -> Rec g rs infixl 8 Source #

A shorthand for rapply.

(<<$>>) :: (forall x. f x -> g x) -> Rec f rs -> Rec g rs infixl 8 Source #

A shorthand for rmap.

(<<&>>) :: Rec f rs -> (forall x. f x -> g x) -> Rec g rs Source #

An inverted shorthand for rmap.

data Rec :: (u -> *) -> [u] -> * where Source #

A record is parameterized by a universe u, an interpretation f and a list of rows rs. The labels or indices of the record are given by inhabitants of the kind u; the type of values at any label r :: u is given by its interpretation f r :: *.

Constructors

(:&) :: !(f r) -> !(Rec f rs) -> Rec f (r ': rs) infixr 7 
Instances
RecElem (Rec :: (a -> *) -> [a] -> *) (r :: a) (r ': rs :: [a]) Z Source # 
Instance details

Defined in Data.Vinyl.Lens

Methods

rlens :: Functor g => sing r -> (f r -> g (f r)) -> Rec f (r ': rs) -> g (Rec f (r ': rs)) Source #

rget :: sing r -> Rec f (r ': rs) -> f r Source #

rput :: f r -> Rec f (r ': rs) -> Rec f (r ': rs) Source #

(RIndex r (s ': rs) ~ S i, RElem r rs i) => RecElem (Rec :: (a -> *) -> [a] -> *) (r :: a) (s ': rs :: [a]) (S i) Source # 
Instance details

Defined in Data.Vinyl.Lens

Methods

rlens :: Functor g => sing r -> (f r -> g (f r)) -> Rec f (s ': rs) -> g (Rec f (s ': rs)) Source #

rget :: sing r -> Rec f (s ': rs) -> f r Source #

rput :: f r -> Rec f (s ': rs) -> Rec f (s ': rs) Source #

TestCoercion f => TestCoercion (Rec f :: [u] -> *) Source # 
Instance details

Defined in Data.Vinyl.Core

Methods

testCoercion :: Rec f a -> Rec f b -> Maybe (Coercion a b) #

TestEquality f => TestEquality (Rec f :: [u] -> *) Source # 
Instance details

Defined in Data.Vinyl.Core

Methods

testEquality :: Rec f a -> Rec f b -> Maybe (a :~: b) #

RecSubset (Rec :: (k -> *) -> [k] -> *) ([] :: [k]) (ss :: [k]) ([] :: [Nat]) Source # 
Instance details

Defined in Data.Vinyl.Lens

Methods

rsubset :: Functor g => (Rec f [] -> g (Rec f [])) -> Rec f ss -> g (Rec f ss) Source #

rcast :: Rec f ss -> Rec f [] Source #

rreplace :: Rec f [] -> Rec f ss -> Rec f ss Source #

(RElem r ss i, RSubset rs ss is) => RecSubset (Rec :: (k -> *) -> [k] -> *) (r ': rs :: [k]) (ss :: [k]) (i ': is) Source # 
Instance details

Defined in Data.Vinyl.Lens

Methods

rsubset :: Functor g => (Rec f (r ': rs) -> g (Rec f (r ': rs))) -> Rec f ss -> g (Rec f ss) Source #

rcast :: Rec f ss -> Rec f (r ': rs) Source #

rreplace :: Rec f (r ': rs) -> Rec f ss -> Rec f ss Source #

(Eq (f r), Eq (Rec f rs)) => Eq (Rec f (r ': rs)) Source # 
Instance details

Defined in Data.Vinyl.Core

Methods

(==) :: Rec f (r ': rs) -> Rec f (r ': rs) -> Bool #

(/=) :: Rec f (r ': rs) -> Rec f (r ': rs) -> Bool #

Eq (Rec f ([] :: [u])) Source # 
Instance details

Defined in Data.Vinyl.Core

Methods

(==) :: Rec f [] -> Rec f [] -> Bool #

(/=) :: Rec f [] -> Rec f [] -> Bool #

(Ord (f r), Ord (Rec f rs)) => Ord (Rec f (r ': rs)) Source # 
Instance details

Defined in Data.Vinyl.Core

Methods

compare :: Rec f (r ': rs) -> Rec f (r ': rs) -> Ordering #

(<) :: Rec f (r ': rs) -> Rec f (r ': rs) -> Bool #

(<=) :: Rec f (r ': rs) -> Rec f (r ': rs) -> Bool #

(>) :: Rec f (r ': rs) -> Rec f (r ': rs) -> Bool #

(>=) :: Rec f (r ': rs) -> Rec f (r ': rs) -> Bool #

max :: Rec f (r ': rs) -> Rec f (r ': rs) -> Rec f (r ': rs) #

min :: Rec f (r ': rs) -> Rec f (r ': rs) -> Rec f (r ': rs) #

Ord (Rec f ([] :: [u])) Source # 
Instance details

Defined in Data.Vinyl.Core

Methods

compare :: Rec f [] -> Rec f [] -> Ordering #

(<) :: Rec f [] -> Rec f [] -> Bool #

(<=) :: Rec f [] -> Rec f [] -> Bool #

(>) :: Rec f [] -> Rec f [] -> Bool #

(>=) :: Rec f [] -> Rec f [] -> Bool #

max :: Rec f [] -> Rec f [] -> Rec f [] #

min :: Rec f [] -> Rec f [] -> Rec f [] #

RecAll f rs Show => Show (Rec f rs) Source #

Records may be shown insofar as their points may be shown. reifyConstraint is used to great effect here.

Instance details

Defined in Data.Vinyl.Core

Methods

showsPrec :: Int -> Rec f rs -> ShowS #

show :: Rec f rs -> String #

showList :: [Rec f rs] -> ShowS #

(Monoid (f r), Monoid (Rec f rs)) => Semigroup (Rec f (r ': rs)) Source # 
Instance details

Defined in Data.Vinyl.Core

Methods

(<>) :: Rec f (r ': rs) -> Rec f (r ': rs) -> Rec f (r ': rs) #

sconcat :: NonEmpty (Rec f (r ': rs)) -> Rec f (r ': rs) #

stimes :: Integral b => b -> Rec f (r ': rs) -> Rec f (r ': rs) #

Semigroup (Rec f ([] :: [u])) Source # 
Instance details

Defined in Data.Vinyl.Core

Methods

(<>) :: Rec f [] -> Rec f [] -> Rec f [] #

sconcat :: NonEmpty (Rec f []) -> Rec f [] #

stimes :: Integral b => b -> Rec f [] -> Rec f [] #

(Monoid (f r), Monoid (Rec f rs)) => Monoid (Rec f (r ': rs)) Source # 
Instance details

Defined in Data.Vinyl.Core

Methods

mempty :: Rec f (r ': rs) #

mappend :: Rec f (r ': rs) -> Rec f (r ': rs) -> Rec f (r ': rs) #

mconcat :: [Rec f (r ': rs)] -> Rec f (r ': rs) #

Monoid (Rec f ([] :: [u])) Source # 
Instance details

Defined in Data.Vinyl.Core

Methods

mempty :: Rec f [] #

mappend :: Rec f [] -> Rec f [] -> Rec f [] #

mconcat :: [Rec f []] -> Rec f [] #

(Storable (f r), Storable (Rec f rs)) => Storable (Rec f (r ': rs)) Source # 
Instance details

Defined in Data.Vinyl.Core

Methods

sizeOf :: Rec f (r ': rs) -> Int #

alignment :: Rec f (r ': rs) -> Int #

peekElemOff :: Ptr (Rec f (r ': rs)) -> Int -> IO (Rec f (r ': rs)) #

pokeElemOff :: Ptr (Rec f (r ': rs)) -> Int -> Rec f (r ': rs) -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Rec f (r ': rs)) #

pokeByteOff :: Ptr b -> Int -> Rec f (r ': rs) -> IO () #

peek :: Ptr (Rec f (r ': rs)) -> IO (Rec f (r ': rs)) #

poke :: Ptr (Rec f (r ': rs)) -> Rec f (r ': rs) -> IO () #

Storable (Rec f ([] :: [u])) Source # 
Instance details

Defined in Data.Vinyl.Core

Methods

sizeOf :: Rec f [] -> Int #

alignment :: Rec f [] -> Int #

peekElemOff :: Ptr (Rec f []) -> Int -> IO (Rec f []) #

pokeElemOff :: Ptr (Rec f []) -> Int -> Rec f [] -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Rec f []) #

pokeByteOff :: Ptr b -> Int -> Rec f [] -> IO () #

peek :: Ptr (Rec f []) -> IO (Rec f []) #

poke :: Ptr (Rec f []) -> Rec f [] -> IO () #

type (∈) r rs = RElem r rs (RIndex r rs) Source #

A shorthand for RElem which supplies its index.

type (⊆) rs ss = RSubset rs ss (RImage rs ss) Source #

A shorthand for RSubset which supplies its image.

type (≅) rs ss = REquivalent rs ss (RImage rs ss) (RImage ss rs) Source #

A shorthand for REquivalent which supplies its images.

type (<:) rs ss = rs ss Source #

A non-unicode equivalent of (⊆).

type (:~:) rs ss = rs ss Source #

A non-unicode equivalent of (≅).