I have found some problems with connectPerim' function in Haskell Diagrams. This function connects perimeters of two figures in selected parts of perimeters (this time figures perimeter is divided into 12 parts and the number before "/" means which part is selected to connect). connectPerim' :: (Renderable (Path R2) b, IsName n1, IsName n2) => ArrowOpts -> n1 -> n2 -> Angle -> Angle -> Diagram b R2 -> Diagram b R2 For example:
# connectPerim' singleHeadArrow "2" "1" (6/12 :: Turn) (0/12 :: Turn)
I would like to put both Angle parameters ((6/12 :: Turn) and (0/12 :: Turn)) into new variable, but I am able only to put those parameters into separate variables. for example
arrowRight1 = (6/12 :: Turn)
arrowRight2 = (0/12 :: Turn)
# connectPerim' singleHeadArrow "2" "1" arrowRight1 arrowRight2
Is it possible to combine those Angle parameters to one variable? If it is could You give an example? Thank You in advance!
You can create an alternative version of
connectPerim'
which accepts two angles as a single tuple:An equivalent and more elegant definition, using uncurry:
Usage: