Frames-0.7.4.2: Data frames for working with tabular data files
Safe HaskellNone
LanguageHaskell2010

Frames.Rec

Synopsis

Documentation

type Record = FieldRec Source #

A record with unadorned values. This is Vinyl's Rec ElField. We give this type a name as it is used pervasively for records in Frames.

(&:) :: forall (s :: Symbol) a (rs :: [(Symbol, Type)]). KnownSymbol s => a -> Record rs -> Record ((s :-> a) ': rs) infixr 5 Source #

A cons function for building Record values.

type family RecordColumns t :: [(Symbol, Type)] where ... Source #

Equations

RecordColumns (Record ts) = ts 

recUncons :: forall (s :: Symbol) a (rs :: [(Symbol, Type)]). Record ((s :-> a) ': rs) -> (a, Record rs) Source #

Separate the first element of a Record from the rest of the row.

recMaybe :: forall (cs :: [(Symbol, Type)]). Rec (Maybe :. ElField) cs -> Maybe (Record cs) Source #

Undistribute Maybe from a Rec Maybe. This is just a specific usage of rtraverse, but it is quite common.

showFields :: forall (ts :: [(Symbol, Type)]). (RecMapMethod Show ElField ts, RecordToList ts) => Record ts -> [String] Source #

Show each field of a Record without its column name.

rgetField :: forall (t :: (Symbol, Type)) (s :: Symbol) a (rs :: [(Symbol, Type)]). (t ~ '(s, a), t rs) => Record rs -> a Source #

Get the value of a field of a Record. This is intended for use with TypeApplications, as compared to rgetv that is intended for use with OverloadedLabels.

rputField :: forall (t :: (Symbol, Type)) (s :: Symbol) a (rs :: [(Symbol, Type)]). (t ~ '(s, a), t rs, KnownSymbol s) => a -> Record rs -> Record rs Source #

Replace the value of a field of a Record. This is intended for use with TypeApplications, as compared to rputf that is intended for use with OverloadedLabels.