diagrams/diagrams-lib — pull request #150 by bergey (2014-01-27 15:22:45+00:00)
Title: Remove Num instance for Angle

I think this should have been part of https://github.com/diagrams/diagrams-lib/pull/140. In that PR I introduced a bunch of bugs which @byorgey had to fix. (https://github.com/diagrams/diagrams-lib/commit/abff5968359e983088a313158c186f5e4d4595a3, https://github.com/diagrams/diagrams-lib/commit/174f7b4dcaa74ed9b7c1adfc2c50bb2d87cd90e7, https://github.com/diagrams/diagrams-lib/commit/10cae4c1f14dd3d1c8f47eb422ea05705c88fb1b) With the changes in this PR, such buggy code will not type check.

With the old Angle class, we used the Num instance for the `1/2 :: Turn` syntax. We don't need that now, so it leaks the internal representation: `rotate (1/2)` is the same as `rotate (1/2 @@ rad)`, but we shouldn't ever do that. Multiplication of Angles was always a bad idea.

If this looks good to folks, I'll make the corresponding changes in other packages.