Skip to content

Commit

Permalink
Manually written Transformable instance for SegTree
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Frumin committed Aug 16, 2013
1 parent c10448a commit 34b8929
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Diagrams/Trail.hs
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,10 @@ deriving instance (OrderedField (Scalar v), InnerSpace v)
=> Monoid (SegTree v)
deriving instance (OrderedField (Scalar v), InnerSpace v)
=> FT.Measured (SegMeasure v) (SegTree v)
deriving instance (HasLinearMap v, InnerSpace v, OrderedField (Scalar v))
=> Transformable (SegTree v)

instance (HasLinearMap v, InnerSpace v, OrderedField (Scalar v))
=> Transformable (SegTree v) where
transform t = SegTree . transform t . getSegTree

type instance Codomain (SegTree v) = v

Expand Down

1 comment on commit 34b8929

@byorgey
Copy link
Member

@byorgey byorgey commented on 34b8929 Nov 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incidentally, Richard thinks this might be fixed in time for the 7.8 release, i.e. we can go back to deriving the Transformable instance. We should try to remember to check.

Please sign in to comment.