Safe Haskell | None |
---|---|
Language | Haskell2010 |
Frames.Rec
Synopsis
- type Record = FieldRec
- (&:) :: forall (s :: Symbol) a (rs :: [(Symbol, Type)]). KnownSymbol s => a -> Record rs -> Record ((s :-> a) ': rs)
- type family RecordColumns t :: [(Symbol, Type)] where ...
- recUncons :: forall (s :: Symbol) a (rs :: [(Symbol, Type)]). Record ((s :-> a) ': rs) -> (a, Record rs)
- recMaybe :: forall (cs :: [(Symbol, Type)]). Rec (Maybe :. ElField) cs -> Maybe (Record cs)
- showFields :: forall (ts :: [(Symbol, Type)]). (RecMapMethod Show ElField ts, RecordToList ts) => Record ts -> [String]
- rgetField :: forall (t :: (Symbol, Type)) (s :: Symbol) a (rs :: [(Symbol, Type)]). (t ~ '(s, a), t ∈ rs) => Record rs -> a
- rputField :: forall (t :: (Symbol, Type)) (s :: Symbol) a (rs :: [(Symbol, Type)]). (t ~ '(s, a), t ∈ rs, KnownSymbol s) => a -> Record rs -> Record rs
Documentation
(&:) :: 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 #
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
.