| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Vinyl.Notation
Synopsis
- (<+>) :: forall {k} (f :: k -> Type) (as :: [k]) (bs :: [k]). Rec f as -> Rec f bs -> Rec f (as ++ bs)
- (<<*>>) :: forall {u} (rs :: [u]) (f :: u -> Type) (g :: u -> Type). RApply rs => Rec (Lift (->) f g) rs -> Rec f rs -> Rec g rs
- (<<$>>) :: forall {u} (rs :: [u]) f g. RMap rs => (forall (x :: u). f x -> g x) -> Rec f rs -> Rec g rs
- (<<&>>) :: forall {u} (rs :: [u]) f g. RMap rs => Rec f rs -> (forall (x :: u). f x -> g x) -> Rec g rs
- data Rec (a :: u -> Type) (b :: [u]) where
- type (∈) (r :: k) (rs :: [k]) = RElem r rs (RIndex r rs)
- type (⊆) (rs :: [k]) (ss :: [k]) = RSubset rs ss (RImage rs ss)
- type (≅) (rs :: [k]) (ss :: [k]) = REquivalent rs ss (RImage rs ss) (RImage ss rs)
- type (<:) (rs :: [k]) (ss :: [k]) = rs ⊆ ss
- type (:~:) (rs :: [k]) (ss :: [k]) = rs ≅ ss
Documentation
(<+>) :: forall {k} (f :: k -> Type) (as :: [k]) (bs :: [k]). Rec f as -> Rec f bs -> Rec f (as ++ bs) infixr 5 Source #
A shorthand for rappend.
(<<*>>) :: forall {u} (rs :: [u]) (f :: u -> Type) (g :: u -> Type). RApply rs => Rec (Lift (->) f g) rs -> Rec f rs -> Rec g rs infixl 8 Source #
A shorthand for rapply.
(<<$>>) :: forall {u} (rs :: [u]) f g. RMap rs => (forall (x :: u). f x -> g x) -> Rec f rs -> Rec g rs infixl 8 Source #
A shorthand for rmap.
(<<&>>) :: forall {u} (rs :: [u]) f g. RMap rs => Rec f rs -> (forall (x :: u). f x -> g x) -> Rec g rs Source #
An inverted shorthand for rmap.
data Rec (a :: u -> Type) (b :: [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
| (:&) :: forall {u} (a :: u -> Type) (r :: u) (rs :: [u]). !(a r) -> !(Rec a rs) -> Rec a (r ': rs) infixr 7 |
Instances
| RecSubset (Rec :: (k -> Type) -> [k] -> Type) ('[] :: [k]) (ss :: [k]) ('[] :: [Nat]) Source # | |||||
Defined in Data.Vinyl.Lens Methods rsubsetC :: forall g (f :: k -> Type). (Functor g, RecSubsetFCtx (Rec :: (k -> Type) -> [k] -> Type) f) => (Rec f ('[] :: [k]) -> g (Rec f ('[] :: [k]))) -> Rec f ss -> g (Rec f ss) Source # rcastC :: forall (f :: k -> Type). RecSubsetFCtx (Rec :: (k -> Type) -> [k] -> Type) f => Rec f ss -> Rec f ('[] :: [k]) Source # rreplaceC :: forall (f :: k -> Type). RecSubsetFCtx (Rec :: (k -> Type) -> [k] -> Type) f => Rec f ('[] :: [k]) -> Rec f ss -> Rec f ss Source # | |||||
| (RElem r ss i, RSubset rs ss is) => RecSubset (Rec :: (k -> Type) -> [k] -> Type) (r ': rs :: [k]) (ss :: [k]) (i ': is) Source # | |||||
Defined in Data.Vinyl.Lens Methods rsubsetC :: forall g (f :: k -> Type). (Functor g, RecSubsetFCtx (Rec :: (k -> Type) -> [k] -> Type) f) => (Rec f (r ': rs) -> g (Rec f (r ': rs))) -> Rec f ss -> g (Rec f ss) Source # rcastC :: forall (f :: k -> Type). RecSubsetFCtx (Rec :: (k -> Type) -> [k] -> Type) f => Rec f ss -> Rec f (r ': rs) Source # rreplaceC :: forall (f :: k -> Type). RecSubsetFCtx (Rec :: (k -> Type) -> [k] -> Type) f => Rec f (r ': rs) -> Rec f ss -> Rec f ss Source # | |||||
| RecElem (Rec :: (a -> Type) -> [a] -> Type) (r :: a) (r' :: a) (r ': rs :: [a]) (r' ': rs :: [a]) 'Z Source # | |||||
Defined in Data.Vinyl.Lens Methods rlensC :: (Functor g, RecElemFCtx (Rec :: (a -> Type) -> [a] -> Type) f) => (f r -> g (f r')) -> Rec f (r ': rs) -> g (Rec f (r' ': rs)) Source # rgetC :: (RecElemFCtx (Rec :: (a -> Type) -> [a] -> Type) f, r ~ r') => Rec f (r ': rs) -> f r Source # rputC :: RecElemFCtx (Rec :: (a -> Type) -> [a] -> Type) f => f r' -> Rec f (r ': rs) -> Rec f (r' ': rs) Source # | |||||
| (RIndex r (s ': rs) ~ 'S i, RecElem (Rec :: (a -> Type) -> [a] -> Type) r r' rs rs' i) => RecElem (Rec :: (a -> Type) -> [a] -> Type) (r :: a) (r' :: a) (s ': rs :: [a]) (s ': rs' :: [a]) ('S i) Source # | |||||
Defined in Data.Vinyl.Lens Methods rlensC :: (Functor g, RecElemFCtx (Rec :: (a -> Type) -> [a] -> Type) f) => (f r -> g (f r')) -> Rec f (s ': rs) -> g (Rec f (s ': rs')) Source # rgetC :: (RecElemFCtx (Rec :: (a -> Type) -> [a] -> Type) f, r ~ r') => Rec f (s ': rs) -> f r Source # rputC :: RecElemFCtx (Rec :: (a -> Type) -> [a] -> Type) f => f r' -> Rec f (s ': rs) -> Rec f (s ': rs') Source # | |||||
| TestCoercion f => TestCoercion (Rec f :: [u] -> Type) Source # | |||||
Defined in Data.Vinyl.Core | |||||
| TestEquality f => TestEquality (Rec f :: [u] -> Type) Source # | |||||
Defined in Data.Vinyl.Core | |||||
| ReifyConstraint NFData f xs => NFData (Rec f xs) Source # | |||||
Defined in Data.Vinyl.Core | |||||
| (Monoid (f r), Monoid (Rec f rs)) => Monoid (Rec f (r ': rs)) Source # | |||||
| Monoid (Rec f ('[] :: [u])) Source # | |||||
| (Semigroup (f r), Semigroup (Rec f rs)) => Semigroup (Rec f (r ': rs)) Source # | |||||
| Semigroup (Rec f ('[] :: [u])) Source # | |||||
| (Storable (f r), Storable (Rec f rs)) => Storable (Rec f (r ': rs)) Source # | |||||
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 () # | |||||
| Storable (Rec f ('[] :: [u])) Source # | |||||
Defined in Data.Vinyl.Core Methods sizeOf :: Rec f ('[] :: [u]) -> Int # alignment :: Rec f ('[] :: [u]) -> Int # peekElemOff :: Ptr (Rec f ('[] :: [u])) -> Int -> IO (Rec f ('[] :: [u])) # pokeElemOff :: Ptr (Rec f ('[] :: [u])) -> Int -> Rec f ('[] :: [u]) -> IO () # peekByteOff :: Ptr b -> Int -> IO (Rec f ('[] :: [u])) # pokeByteOff :: Ptr b -> Int -> Rec f ('[] :: [u]) -> IO () # peek :: Ptr (Rec f ('[] :: [u])) -> IO (Rec f ('[] :: [u])) # poke :: Ptr (Rec f ('[] :: [u])) -> Rec f ('[] :: [u]) -> IO () # | |||||
| Generic (Rec f rs) => Generic (Rec f (r ': rs)) Source # | |||||
Defined in Data.Vinyl.Core Associated Types
| |||||
| Generic (Rec f ('[] :: [u])) Source # | |||||
Defined in Data.Vinyl.Core Associated Types
| |||||
| (RMap rs, ReifyConstraint Show f rs, RecordToList rs) => Show (Rec f rs) Source # | Records may be shown insofar as their points may be shown.
| ||||
| (Eq (f r), Eq (Rec f rs)) => Eq (Rec f (r ': rs)) Source # | |||||
| Eq (Rec f ('[] :: [u])) Source # | |||||
| (Ord (f r), Ord (Rec f rs)) => Ord (Rec f (r ': rs)) Source # | |||||
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 # | |||||
Defined in Data.Vinyl.Core Methods compare :: Rec f ('[] :: [u]) -> Rec f ('[] :: [u]) -> Ordering # (<) :: Rec f ('[] :: [u]) -> Rec f ('[] :: [u]) -> Bool # (<=) :: Rec f ('[] :: [u]) -> Rec f ('[] :: [u]) -> Bool # (>) :: Rec f ('[] :: [u]) -> Rec f ('[] :: [u]) -> Bool # (>=) :: Rec f ('[] :: [u]) -> Rec f ('[] :: [u]) -> Bool # max :: Rec f ('[] :: [u]) -> Rec f ('[] :: [u]) -> Rec f ('[] :: [u]) # min :: Rec f ('[] :: [u]) -> Rec f ('[] :: [u]) -> Rec f ('[] :: [u]) # | |||||
| type RecSubsetFCtx (Rec :: (k -> Type) -> [k] -> Type) (f :: k -> Type) Source # | |||||
Defined in Data.Vinyl.Lens | |||||
| type RecSubsetFCtx (Rec :: (k -> Type) -> [k] -> Type) (f :: k -> Type) Source # | |||||
Defined in Data.Vinyl.Lens | |||||
| type RecElemFCtx (Rec :: (a -> Type) -> [a] -> Type) (f :: a -> Type) Source # | |||||
Defined in Data.Vinyl.Lens | |||||
| type RecElemFCtx (Rec :: (a -> Type) -> [a] -> Type) (f :: a -> Type) Source # | |||||
Defined in Data.Vinyl.Lens | |||||
| type Rep (Rec f (r ': rs)) Source # | |||||
Defined in Data.Vinyl.Core type Rep (Rec f (r ': rs)) = C1 ('MetaCons ":&" ('InfixI 'RightAssociative 7) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (f r)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rep (Rec f rs))) | |||||
| type Rep (Rec f ('[] :: [u])) Source # | |||||
Defined in Data.Vinyl.Core | |||||
type (∈) (r :: k) (rs :: [k]) = RElem r rs (RIndex r rs) Source #
A shorthand for RElem which supplies its index.
type (⊆) (rs :: [k]) (ss :: [k]) = RSubset rs ss (RImage rs ss) Source #
A shorthand for RSubset which supplies its image.
type (≅) (rs :: [k]) (ss :: [k]) = REquivalent rs ss (RImage rs ss) (RImage ss rs) Source #
A shorthand for REquivalent which supplies its images.