Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- rappend :: Rec f as -> Rec f bs -> Rec f (as ++ bs)
- rtraverse :: Applicative h => (forall (x :: u). f x -> h (g x)) -> Rec f rs -> h (Rec g rs)
- rdel :: CanDelete r rs => Rec f rs -> Rec f (RDelete r rs)
- type CanDelete r rs = (RElem r rs (RIndex r rs), RDelete r rs ⊆ rs)
- type AllCols c ts = AllConstrained c (UnColumn ts)
- type family UnColumn (ts :: [(Symbol, *)]) where ...
- class StripFieldNames (ts :: [(Symbol, Type)]) where
- mapMono :: (AllAre a (Unlabeled ts), StripFieldNames ts, StripFieldNames (ReplaceAllSnd b ts), ReplaceAll b (Unlabeled ts) ~ Unlabeled (ReplaceAllSnd b ts)) => (a -> b) -> Rec ElField ts -> Rec ElField (ReplaceAllSnd b ts)
- type family ColFun f x where ...
- class ColumnHeaders (cs :: [(Symbol, *)])
- columnHeaders :: ColumnHeaders cs => proxy (Rec f cs) -> [String]
Documentation
rtraverse :: Applicative h => (forall (x :: u). f x -> h (g x)) -> Rec f rs -> h (Rec g rs) #
A record may be traversed with respect to its interpretation functor. This can be used to yank (some or all) effects from the fields of the record to the outside of the record.
type CanDelete r rs = (RElem r rs (RIndex r rs), RDelete r rs ⊆ rs) Source #
A constraint that a field can be deleted from a record.
type AllCols c ts = AllConstrained c (UnColumn ts) Source #
Enforce a constraint on the payload type of each column.
type family UnColumn (ts :: [(Symbol, *)]) where ... Source #
Strip the column information from each element of a list of types.
class StripFieldNames (ts :: [(Symbol, Type)]) where #
Facilities for removing and replacing the type-level label, or column name, part of a record.
stripNames :: Rec ElField ts -> Rec Identity (Unlabeled ts) #
stripNames' :: Functor f => Rec (f :. ElField) ts -> Rec f (Unlabeled ts) #
withNames :: Rec Identity (Unlabeled ts) -> Rec ElField ts #
withNames' :: Functor f => Rec f (Unlabeled ts) -> Rec (f :. ElField) ts #
Instances
StripFieldNames ([] :: [(Symbol, Type)]) | |
Defined in Data.Vinyl.Derived | |
(KnownSymbol s, StripFieldNames ts) => StripFieldNames ((,) s t ': ts) | |
Defined in Data.Vinyl.Derived stripNames :: Rec ElField ((s, t) ': ts) -> Rec Identity (Unlabeled ((s, t) ': ts)) # stripNames' :: Functor f => Rec (f :. ElField) ((s, t) ': ts) -> Rec f (Unlabeled ((s, t) ': ts)) # withNames :: Rec Identity (Unlabeled ((s, t) ': ts)) -> Rec ElField ((s, t) ': ts) # withNames' :: Functor f => Rec f (Unlabeled ((s, t) ': ts)) -> Rec (f :. ElField) ((s, t) ': ts) # |
mapMono :: (AllAre a (Unlabeled ts), StripFieldNames ts, StripFieldNames (ReplaceAllSnd b ts), ReplaceAll b (Unlabeled ts) ~ Unlabeled (ReplaceAllSnd b ts)) => (a -> b) -> Rec ElField ts -> Rec ElField (ReplaceAllSnd b ts) Source #
Map a function across a homogeneous Rec
of named values. This
is a thin wrapper over mapMonoV
.
type family ColFun f x where ... Source #
A type function to convert a 'Rec f' to a 'Rec (g :. f)'. ColFun
f (Record rs) = Rec (f :. ElField) rs
.
class ColumnHeaders (cs :: [(Symbol, *)]) Source #
Instances
ColumnHeaders ([] :: [(Symbol, Type)]) Source # | |
Defined in Frames.RecF columnHeaders :: proxy (Rec f []) -> [String] Source # | |
(ColumnHeaders cs, KnownSymbol s) => ColumnHeaders ((s :-> c) ': cs) Source # | |
Defined in Frames.RecF |
columnHeaders :: ColumnHeaders cs => proxy (Rec f cs) -> [String] Source #
Return the column names for a record.