| Copyright | (c) Marcin Mrotek, 2014 |
|---|---|
| License | BSD3 |
| Maintainer | marcin.jan.mrotek@gmail.com |
| Safe Haskell | None |
| Language | Haskell2010 |
| Extensions |
|
Data.Vinyl.Upcast
Description
Documentation
slice :: (Functor f, Overwrite xs ys, xs <: ys) => (Rec el g ys -> f (Rec el g ys)) -> Rec el g xs -> f (Rec el g xs) Source
A lens from a record to a portion of it.
Wrapper for Rec with a different Monoid instance. Instead of lifting mappend, it acts on (f (el $ r)) directly, to support temporarily turning records into monoids by changing functors.