vinyl-utils-0.0.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 el f rs -> Rec el g rs -> Rec el h rs Source

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

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

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

(/$$/) :: Rec el (Compose ((->) a) f) rs -> Rec el (Const a) rs -> Rec el f rs Source

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

(\$\) :: Functor f => Rec el (Op a) rs -> Rec el f rs -> Rec el (Const (f a)) rs Source

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

(\$$\) :: Rec el (Compose (Op a) f) rs -> Rec el f rs -> Rec el (Const a) rs Source

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

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

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

(\||\) :: forall el f rs. Applicative f => Rec el Predicate rs -> Rec el 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.