diagrams/diagrams-core — pull request #41 by cmears (2013-08-14 01:48:19+00:00)
Title: Add lookupName function.

Example of use:

```haskell
-- If a straight line was drawn between two named subdiagrams, but
-- stopped at the edge of each subdiagram, where would the endpoints be?
connectionPoints n1 n2 d = do
b1 <- lookupName n1 d
b2 <- lookupName n2 d
let v = location b2 .-. location b1
midpoint = location b1 .+^ (v/2)
p1 = fromJust $ traceP midpoint (-v) b1
p2 = fromJust $ traceP midpoint v b2
return (p1,p2)
````

(We also need to export it in diagrams-lib.)