vinyl-plus-0.1.1: Vinyl records utilities

Safe HaskellNone




class (i ~ TIndex a rs, b ~ Lookup a rs) => IxElem a rs i b where Source

This is a typeclass in the spirit of RElem that provides a lens for Rec whose values a tagged by an additional marker (often a Symbol). The methods in this typeclass are not intended to be used directly. Instead, import one of the four submodules, and use the functions it provides.


rlensBy' :: Functor g => Proxy# a -> (f b -> g (f b)) -> Rec (TaggedFunctor f) rs -> g (Rec (TaggedFunctor f) rs) Source

rgetBy' :: Proxy# a -> Rec (TaggedFunctor f) rs -> f b Source

rmodifyBy' :: Proxy# a -> (f b -> f b) -> Rec (TaggedFunctor f) rs -> Rec (TaggedFunctor f) rs Source


(~) ((,) k k1) r ((,) k k1 k2 v) => IxElem k k k ((:) ((,) k k) r rs) Z v Source 
((~) Nat (TIndex k k1 k2 ((:) ((,) k k1) s rs)) (S i), (~) k1 (Lookup k1 k k2 ((:) ((,) k k1) s rs)) v, IxElem k k1 k2 rs i v) => IxElem k k k ((:) ((,) k k) s rs) (S i) v Source 

rsetBy' :: IxElem k rs i v => Proxy# k -> f v -> Rec (TaggedFunctor f) rs -> Rec (TaggedFunctor f) rs Source