Frames-0.7.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.

(&:) :: KnownSymbol s => a -> Record rs -> Record ((s :-> a) ': rs) infixr 5 Source #

A cons function for building Record values.

type family RecordColumns t where ... Source #

Equations

RecordColumns (Record ts) = ts 

recUncons :: Record ((s :-> a) ': rs) -> (a, Record rs) Source #

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

recMaybe :: 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 :: (RecMapMethod Show ElField ts, RecordToList ts) => Record ts -> [String] Source #

Show each field of a Record without its column name.

rgetField :: forall t s a rs. (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 s a rs. (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.