diagrams/diagrams-lib — pull request #186 by bergey (2014-05-16 16:16:07+00:00)
Title: Direction type

This branch introduces a new direction type, distinguished from Angles and Vectors. This was discussed a bit in [on trello](https://trello.com/c/yMLrUh1o/194-add-special-intensional-representation-for-angle-preserving-transformations-in-r2) and probably elsewhere.

I changed the semantics of the arc-generating functions substantially, because the old semantics depended on distinguishing the direction 0 from the direction `fullTurn`. I'm tempted to go farther, and eliminate the CW / CCW functions, since a start direction and a (positive or negative) `Angle` seems to cover all the options. Or we could go back to taking two `Direction`s, but give up on defining circles. Or interpret `arc xDir (xDir.+^fullTurn)` specially. @fryguybob what do you think?

I definitely need to test the arrow code more before this can be merged.

Right now, this branch builds, but trying to build `diagrams-svg` or other packages linking to it fails with linker errors. Is that just for me, or can others reproduce?

```
# ghc-7.6.3 cabal install core/ lib/ svg/ contrib/
Loading package diagrams-lib-1.1.0.1 ... linking ... ghc: /home/bergey/code/diagrams/.cabal-sandbox/lib/x86_64-linux-ghc-7.6.3/diagrams-lib-1.1.0.1/libHSdiagrams-lib-1.1.0.1.a: unknown symbol `diagramszmlibzm1zi1zi0zi1_DiagramsziDirection_Direction_closure'

# ghc-7.8
Loading package diagrams-lib-1.1.0.1 ... : can't load .so/.DLL for: /home/bergey/code/diagrams/.cabal-sandbox/lib/x86_64-linux-ghc-7.8.2/diagrams-lib-1.1.0.1/libHSdiagrams-lib-1.1.0.1-ghc7.8.2.so (/home/bergey/code/diagrams/.cabal-sandbox/lib/x86_64-linux-ghc-7.8.2/diagrams-lib-1.1.0.1/libHSdiagrams-lib-1.1.0.1-ghc7.8.2.so: undefined symbol: diagramszmlibzm1zi1zi0zi1_DiagramsziDirection_Direction_con_info)
```