Maintainer | diagrams-discuss@googlegroups.com |
---|---|

Safe Haskell | Safe-Infered |

A module to re-export most of the functionality of the diagrams core and standard library.

- module Graphics.Rendering.Diagrams
- module Diagrams.Attributes
- module Diagrams.Align
- module Diagrams.Combinators
- module Diagrams.Segment
- module Diagrams.Path
- module Diagrams.CubicSpline
- module Diagrams.Transform
- module Diagrams.BoundingBox
- module Diagrams.TwoD
- module Diagrams.Animation
- module Diagrams.Util
- module Data.Colour.Names
- module Data.Semigroup
- module Data.VectorSpace
- module Data.AffineSpace
- module Data.Active
- class Functor f => Applicative f where
- (*>) :: Applicative f => forall a b. f a -> f b -> f b
- (<*) :: Applicative f => forall a b. f a -> f b -> f a
- (<$>) :: Functor f => (a -> b) -> f a -> f b
- (<$) :: Functor f => forall a b. a -> f b -> f a
- liftA :: Applicative f => (a -> b) -> f a -> f b
- liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
- liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d

# Core library

The core definitions of transformations, diagrams, backends, and so on.

module Graphics.Rendering.Diagrams

# Standard library

Attributes (color, line style, etc.) and styles.

module Diagrams.Attributes

Alignment of diagrams relative to their envelopes.

module Diagrams.Align

Combining multiple diagrams into one.

module Diagrams.Combinators

Linear and cubic bezier segments.

module Diagrams.Segment

Trails and paths.

module Diagrams.Path

Cubic splines.

module Diagrams.CubicSpline

Some additional transformation-related functions, like conjugation of transformations.

module Diagrams.Transform

Convenient definitions and utilities for working with good old-fashioned, axis-aligned bounding boxes.

module Diagrams.BoundingBox

A wide range of things (shapes, transformations, combinators) specific to creating two-dimensional diagrams.

module Diagrams.TwoD

Tools for making animations.

module Diagrams.Animation

Various utility definitions.

module Diagrams.Util

# Convenience re-exports

A large list of color names.

module Data.Colour.Names

Semigroups and monoids show up all over the place, so things from Data.Semigroup and Data.Monoid often come in handy.

module Data.Semigroup

For computing with vectors.

module Data.VectorSpace

For computing with points and vectors.

module Data.AffineSpace

For working with `Active`

(i.e. animated) things.

module Data.Active

class Functor f => Applicative f where

A functor with application, providing operations to

A minimal complete definition must include implementations of these functions satisfying the following laws:

*identity*-
`pure`

`id`

`<*>`

v = v *composition*-
`pure`

(.)`<*>`

u`<*>`

v`<*>`

w = u`<*>`

(v`<*>`

w) *homomorphism*-
`pure`

f`<*>`

`pure`

x =`pure`

(f x) *interchange*-
`u`

`<*>`

`pure`

y =`pure`

(`$`

y)`<*>`

u

The other methods have the following default definitions, which may be overridden with equivalent specialized implementations:

u`*>`

v =`pure`

(`const`

`id`

)`<*>`

u`<*>`

v u`<*`

v =`pure`

`const`

`<*>`

u`<*>`

v

As a consequence of these laws, the `Functor`

instance for `f`

will satisfy

`fmap`

f x =`pure`

f`<*>`

x

If `f`

is also a `Monad`

, it should satisfy

and
`pure`

= `return`

`(`

(which implies that `<*>`

) = `ap`

`pure`

and `<*>`

satisfy the
applicative functor laws).

pure :: a -> f a

Lift a value.

(<*>) :: f (a -> b) -> f a -> f b

Sequential application.

(*>) :: f a -> f b -> f b

Sequence actions, discarding the value of the first argument.

(<*) :: f a -> f b -> f a

Sequence actions, discarding the value of the second argument.

Applicative [] | |

Applicative IO | |

Applicative Active | |

Applicative ZipList | |

Applicative STM | |

Applicative Maybe | |

Applicative RGB | |

Applicative Option | |

Applicative NonEmpty | |

Applicative Sum | |

Applicative ((->) a) | |

Applicative (Either e) | |

Monoid a => Applicative ((,) a) | |

HasTrie a => Applicative (:->: a) | |

Applicative (ST s) | |

Monoid m => Applicative (Const m) | |

Monad m => Applicative (WrappedMonad m) | |

Applicative (ST s) | |

Applicative (Query v) | |

Applicative f => Applicative (AM f) | |

Applicative f => Applicative (WrappedApplicative f) | |

Apply f => Applicative (MaybeApply f) | |

Arrow a => Applicative (WrappedArrow a b) | |

(Functor m, Monad m) => Applicative (ErrorT e m) |

(*>) :: Applicative f => forall a b. f a -> f b -> f b

Sequence actions, discarding the value of the first argument.

(<*) :: Applicative f => forall a b. f a -> f b -> f a

Sequence actions, discarding the value of the second argument.

liftA :: Applicative f => (a -> b) -> f a -> f b

liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c

Lift a binary function to actions.

liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d

Lift a ternary function to actions.