vinyl-utils-0.1.0.0: Utilities for vinyl

Copyright(c) Marcin Mrotek, 2014
LicenseBSD3
Maintainermarcin.jan.mrotek@gmail.com
Safe HaskellNone
LanguageHaskell2010
Extensions
  • MonoLocalBinds
  • ScopedTypeVariables
  • TypeFamilies
  • ConstraintKinds
  • PolyKinds
  • DataKinds
  • TypeSynonymInstances
  • FlexibleContexts
  • FlexibleInstances
  • MultiParamTypeClasses
  • KindSignatures
  • RankNTypes
  • TypeOperators
  • ExplicitNamespaces
  • ExplicitForAll

Data.Vinyl.Utils.Operator

Description

 

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.

p :: (a -> Bool) -> Predicate a Source

Shorthand for creation of predicates.