Created
August 18, 2013 07:57
-
-
Save co-dan/6260479 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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