vinyl-0.5.3: 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

TestCoercion u f => TestCoercion [u] (Rec u f) Source # 

Methods

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

TestEquality u f => TestEquality [u] (Rec u f) Source # 

Methods

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

(Eq (f r), Eq (Rec a f rs)) => Eq (Rec a f ((:) a r rs)) Source # 

Methods

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

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

Eq (Rec u f ([] u)) Source # 

Methods

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

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

(Ord (f r), Ord (Rec a f rs)) => Ord (Rec a f ((:) a r rs)) Source # 

Methods

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

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

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

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

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

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

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

Ord (Rec u f ([] u)) Source # 

Methods

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

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

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

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

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

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

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

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

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

Methods

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

show :: Rec u f rs -> String #

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

(Monoid (f r), Monoid (Rec a f rs)) => Monoid (Rec a f ((:) a r rs)) Source # 

Methods

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

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

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

Monoid (Rec u f ([] u)) Source # 

Methods

mempty :: Rec u f [u] #

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

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

(Storable (f r), Storable (Rec a f rs)) => Storable (Rec a f ((:) a r rs)) Source # 

Methods

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

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

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

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

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

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

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

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

Storable (Rec u f ([] u)) Source # 

Methods

sizeOf :: Rec u f [u] -> Int #

alignment :: Rec u f [u] -> Int #

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

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

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

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

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

poke :: Ptr (Rec u f [u]) -> Rec u f [u] -> 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 (≅).