diagrams-core-1.3.0.8: 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 Source #

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 (Query v n) Source # 

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) Source # 

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 #

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

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) Source # 

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) Source # 

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) Source # 

Methods

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

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

Methods

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

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