Skip to content

Instantly share code, notes, and snippets.

@co-dan co-dan/error
Created Aug 18, 2013

Embed
What would you like to do?
src/Diagrams/Trail.hs:150:1:
Can't make a derived instance of `Transformable (SegTree v)'
(even with cunning newtype deriving):
it is not type-safe to use GeneralizedNewtypeDeriving on this class;
the last parameter of `Transformable' is at role N
In the stand-alone deriving instance for
`(HasLinearMap v, InnerSpace v, OrderedField (Scalar v)) =>
Transformable (SegTree v)'
--- Diagrams.Core.Transform:
-- | Type class for things @t@ which can be transformed.
class HasLinearMap (V t) => Transformable t where
-- | Apply a transformation to an object.
transform :: Transformation (V t) -> t -> t
--- Diagrams.Trail
newtype SegTree v = SegTree
{ getSegTree :: FingerTree (SegMeasure v) (Segment Closed v) }
deriving (Eq, Ord, Show)
-- But!
-- V (SegTree v) can be different from V (FingerTree (SegMeasure v) (Segment Closed v)) because of newtypes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.