Skip to content

Commit

Permalink
express Transformable instances in terms of instance for Measure
Browse files Browse the repository at this point in the history
  • Loading branch information
byorgey committed Mar 29, 2014
1 parent 337dfba commit f61a0bd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Diagrams/TwoD/Arrow.hs
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,7 @@ instance AttributeClass HeadSize
type instance V HeadSize = R2

instance Transformable HeadSize where
transform t (HeadSize (Last (Local w))) =
HeadSize (Last (Local (avgScale t * w)))
transform _ l = l
transform t (HeadSize (Last w)) = HeadSize (Last (transform t w))

instance Default HeadSize where
def = HeadSize (Last (Output 20))
Expand All @@ -315,9 +313,7 @@ instance AttributeClass TailSize
type instance V TailSize = R2

instance Transformable TailSize where
transform t (TailSize (Last (Local w))) =
TailSize (Last (Local (avgScale t * w)))
transform _ l = l
transform t (TailSize (Last w)) = TailSize (Last (transform t w))

instance Default TailSize where
def = TailSize (Last (Output 20))
Expand Down

0 comments on commit f61a0bd

Please sign in to comment.