MIT licensed by Daniel Firth
Maintained by [email protected]
This version can be pinned in stack with:vinyl-loeb-0.0.1.0@sha256:588556958ff484aa4bb5c9fb2f52e6306952b5598c02bb19242148a3182a4461,890

Module documentation for 0.0.1.0

Depends on 2 packages(full list with versions):

vinyl-loeb

This package defines a version of loeb’s theorem for vinyl.

rloeb :: RMap xs => Rec ((->) (Rec f xs) :. f) xs  -> Rec f xs
rloeb x = go where go = rmap (($ go) . getCompose) x

This can be used to fill up an extensible record lazily using data from the result of the record itself.

type F = [Text, Text]

k :: Rec Thunk F -> Text
k (Thunk f :& _) = f <> "bar"

f :: Rec ((->) (Rec Thunk F) :. Thunk) F
f = (Compose $ const $ Thunk $ "foo") :& Compose (Thunk . k) :& RNil

-- > rloeb f
-- {"foo", "foobar"}

Changes

Changelog for vinyl-loeb

v0.0.1.0

  • Add rloeb.