Safe Haskell | None |
---|---|
Language | Haskell2010 |
Functions useful for interactively exploring and experimenting with a data set.
- pipePreview :: (MonadIO m, Show b) => Producer a m () -> Int -> Pipe a b m () -> m ()
- select :: fs ⊆ rs => proxy fs -> Record rs -> Record fs
- lenses :: (fs ⊆ rs, Functor f) => proxy fs -> (Record fs -> f (Record fs)) -> Record rs -> f (Record rs)
- recToList :: (AsVinyl rs, AllAre a (UnColumn rs)) => Record rs -> [a]
- pr :: QuasiQuoter
- pr1 :: QuasiQuoter
Documentation
pipePreview :: (MonadIO m, Show b) => Producer a m () -> Int -> Pipe a b m () -> m () Source #
preview src n f
prints out the first n
results of piping
src
through f
.
select :: fs ⊆ rs => proxy fs -> Record rs -> Record fs Source #
select (Proxy::Proxy [A,B,C])
extracts columns A
, B
, and
C
, from a larger record. Note, this is just a way of pinning down
the type of a usage of rcast
.
lenses :: (fs ⊆ rs, Functor f) => proxy fs -> (Record fs -> f (Record fs)) -> Record rs -> f (Record rs) Source #
lenses (Proxy::Proxy [A,B,C])
provides a lens onto columns A
,
B
, and C
. This is just a way of pinning down the type of
rsubset
.
pr :: QuasiQuoter Source #
A proxy value quasiquoter; a way of passing types as
values. [pr|T|]
will splice an expression Proxy::Proxy T
, while
[pr|A,B,C|]
will splice in a value of Proxy :: Proxy
[A,B,C]
. If we have a record type with Name
and Age
among
other fields, we can write select
[pr|Name,Age|]@ for a function
that extracts those fields from a larger record.