diagrams-core-1.4.0.1: Core libraries for diagrams EDSL

Copyright(c) 2011-2015 diagrams-core team (see LICENSE)
LicenseBSD-style (see LICENSE)
Maintainerdiagrams-discuss@googlegroups.com
Safe HaskellNone
LanguageHaskell2010

Diagrams.Core.Query

Description

The Query module defines a type for "queries" on diagrams, which are functions from points in a vector space to some monoid.

Synopsis

Documentation

newtype Query v n m #

A query is a function that maps points in a vector space to values in some monoid. Queries naturally form a monoid, with two queries being combined pointwise.

The idea for annotating diagrams with monoidal queries came from the graphics-drawingcombinators package, http://hackage.haskell.org/package/graphics-drawingcombinators.

Constructors

Query 

Fields

Instances

Functor v => Corepresentable (Query v) # 

Associated Types

type Corep (Query v :: * -> * -> *) :: * -> * #

Methods

cotabulate :: (Corep (Query v) d -> c) -> Query v d c #

Functor v => Profunctor (Query v) # 

Methods

dimap :: (a -> b) -> (c -> d) -> Query v b c -> Query v a d #

lmap :: (a -> b) -> Query v b c -> Query v a c #

rmap :: (b -> c) -> Query v a b -> Query v a c #

(#.) :: Coercible * c b => (b -> c) -> Query v a b -> Query v a c #

(.#) :: Coercible * b a => Query v b c -> (a -> b) -> Query v a c #

Functor v => Closed (Query v) # 

Methods

closed :: Query v a b -> Query v (x -> a) (x -> b) #

Functor v => Costrong (Query v) # 

Methods

unfirst :: Query v (a, d) (b, d) -> Query v a b #

unsecond :: Query v (d, a) (d, b) -> Query v a b #

Functor v => Cosieve (Query v) (Point v) # 

Methods

cosieve :: Query v a b -> Point v a -> b #

Monad (Query v n) # 

Methods

(>>=) :: Query v n a -> (a -> Query v n b) -> Query v n b #

(>>) :: Query v n a -> Query v n b -> Query v n b #

return :: a -> Query v n a #

fail :: String -> Query v n a #

Functor (Query v n) # 

Methods

fmap :: (a -> b) -> Query v n a -> Query v n b #

(<$) :: a -> Query v n b -> Query v n a #

Applicative (Query v n) # 

Methods

pure :: a -> Query v n a #

(<*>) :: Query v n (a -> b) -> Query v n a -> Query v n b #

(*>) :: Query v n a -> Query v n b -> Query v n b #

(<*) :: Query v n a -> Query v n b -> Query v n a #

Distributive (Query v n) # 

Methods

distribute :: Functor f => f (Query v n a) -> Query v n (f a) #

collect :: Functor f => (a -> Query v n b) -> f a -> Query v n (f b) #

distributeM :: Monad m => m (Query v n a) -> Query v n (m a) #

collectM :: Monad m => (a -> Query v n b) -> m a -> Query v n (m b) #

Representable (Query v n) # 

Associated Types

type Rep (Query v n :: * -> *) :: * #

Methods

tabulate :: (Rep (Query v n) -> a) -> Query v n a #

index :: Query v n a -> Rep (Query v n) -> a #

Semigroup m => Semigroup (Query v n m) # 

Methods

(<>) :: Query v n m -> Query v n m -> Query v n m #

sconcat :: NonEmpty (Query v n m) -> Query v n m #

stimes :: Integral b => b -> Query v n m -> Query v n m #

Monoid m => Monoid (Query v n m) # 

Methods

mempty :: Query v n m #

mappend :: Query v n m -> Query v n m -> Query v n m #

mconcat :: [Query v n m] -> Query v n m #

Wrapped (Query v n m) # 

Associated Types

type Unwrapped (Query v n m) :: * #

Methods

_Wrapped' :: Iso' (Query v n m) (Unwrapped (Query v n m)) #

(Additive v, Num n) => HasOrigin (Query v n m) # 

Methods

moveOriginTo :: Point (V (Query v n m)) (N (Query v n m)) -> Query v n m -> Query v n m #

(Additive v, Num n) => Transformable (Query v n m) # 

Methods

transform :: Transformation (V (Query v n m)) (N (Query v n m)) -> Query v n m -> Query v n m #

Rewrapped (Query v a m) (Query v' a' m') # 
type Corep (Query v) # 
type Corep (Query v) = Point v
type Rep (Query v n) # 
type Rep (Query v n) = Point v n
type Unwrapped (Query v n m) # 
type Unwrapped (Query v n m) = Point v n -> m
type N (Query v n m) # 
type N (Query v n m) = n
type V (Query v n m) # 
type V (Query v n m) = v