diagrams/diagrams-lib — pull request #212 by cchalmers (2014-08-29 14:05:33+00:00)
Title: Port to linear

Extra changes I made along the way:

- get rid of unnecessary `Backend` constraints.
- general Cartesian functions (`unitX`, `scalingY` etc.) depends on the classes (`R1`, `R2`, `R3`) so same functions can be used for R2 and R3
- SizeSpec2D iso: `spec2D :: Iso' (SizeSpec2D n) (Maybe n, Maybe n)`
- `Traced` instance for `BoundingBox`
- `halfTurn`, `quarterTurn` added (similar to `fullTurn`)
- `fromOrthogonal`, `fromSymmetric` added (similar to `fromLinear`)

Some things I'd like to change:

- change `view` to `boxEnvelope` or something similar to prevent clash with `lens`
- No `Diagrams.Prelude.ThreeD`. Have R3 functions in `Diagrams.Prelude` (in anticipation of projections)

I'm thinking of renaming type families to `F` for the container and `A` for the number type and have alias `V t = F t (A t)`. The associated type variables would also change, so it's `Point f a`, `Diagram b f a` etc. This makes it more consistent with `linear` and the `V` type has the same behaviour. Any thoughts?