vinyl-utils-0.3.0.1: Utilities for vinyl

Data.Vinyl.Utils.Operator

Description

Operations on records parametrized with various kinds of functions.

Synopsis

# Documentation

operator :: (forall t. f t -> g t -> h t) -> Rec f rs -> Rec g rs -> Rec h rs Source #

Create an operator between records sharing their fields but differing in functors.

(/\$/) :: Functor f => Rec ((->) a) rs -> Rec (Const (f a)) rs -> Rec f rs Source #

Apply a record of (a -> x) functions to a constant type record to obtain a plain f-record.

(/$$/) :: Rec (Compose ((->) a) f) rs -> Rec (Const a) rs -> Rec f rs Source # Apply a record of (a -> f x) functions to a constant type record to obtain a plain f-record. (\\) :: Functor f => Rec (Op a) rs -> Rec f rs -> Rec (Const (f a)) rs Source # Apply a record of (x -> a) functions to a plain f-record to obtain a constant type record. (\$$\) :: Rec (Compose (Op a) f) rs -> Rec f rs -> Rec (Const a) rs Source #

Apply a record of (f x -> a) functions to a plain f-record to obtain a constant type record.

(\&&\) :: forall f rs. Applicative f => Rec Predicate rs -> Rec f rs -> f Bool Source #

Apply a predicate record to a plain f-record to obtain a boolean product inside the f functor.

(\||\) :: forall f rs. Applicative f => Rec Predicate rs -> Rec f rs -> f Bool Source #

Apply a predicate record to a plain f-record to obtain a boolean sum inside the f functor.