You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write an expression which depends on V (Point (V a)) = V a, such as "transform (translation zeroV)"
Prelude Diagrams.Prelude> :t transform (translation zeroV) . P
transform (translation zeroV) . P
:: (Data.MemoTrie.HasTrie (Data.Basis.Basis a),
Data.MemoTrie.HasTrie (Data.Basis.Basis (V (Point a))),
Data.Basis.HasBasis a,
Data.Basis.HasBasis (V (Point a))) =>
a -> Point a
Prelude Diagrams.Prelude> :m + Graphics.Rendering.Diagrams.Points
Prelude Diagrams.Prelude Graphics.Rendering.Diagrams.Points> :t transform (translation zeroV) . P
transform (translation zeroV) . P
:: (Data.MemoTrie.HasTrie (Data.Basis.Basis a),
Data.Basis.HasBasis a) =>
a -> Point a
The text was updated successfully, but these errors were encountered:
:1:9:
Couldn't match type V (Point (Double, Double))' with(t0, t1)'
In the expression: (x :: V (Point (Double, Double)))
In the expression: \ x -> (x :: V (Point (Double, Double)))
In the expression:
(\ x -> (x :: V (Point (Double, Double)))) (4, 5)
Prelude Diagrams.Prelude> :m +Graphics.Rendering.Diagrams.Points
Prelude Diagrams.Prelude Graphics.Rendering.Diagrams.Points> :type (\x -> (x :: V (Point (Double,Double)))) (4,5)
(\x -> (x :: V (Point (Double,Double)))) (4,5) :: (Double, Double)
It seems this is likely a GHC bug, but I'd like to keep the ticket open here until we figure out a minimal test case to file as a GHC bug (or find an existing ticket).
I first encountered this problem when I split out most of the content of Graphics.Rendering.Diagrams.Points into the vector-space-points package. Currently the V instance is the only thing in the module.
Note that other V instances are defined in other modules and are re-exported via Diagrams.Prelude just fine. It's a mystery why the instance for Point is not.
(Imported from http://code.google.com/p/diagrams/issues/detail?id=65. Original issue from mgsl...@gmail.com on January 23, 2012, 04:01:35 AM UTC)
What steps will reproduce the problem?
Prelude Diagrams.Prelude> :t transform (translation zeroV) . P
transform (translation zeroV) . P
:: (Data.MemoTrie.HasTrie (Data.Basis.Basis a),
Data.MemoTrie.HasTrie (Data.Basis.Basis (V (Point a))),
Data.Basis.HasBasis a,
Data.Basis.HasBasis (V (Point a))) =>
a -> Point a
Prelude Diagrams.Prelude> :m + Graphics.Rendering.Diagrams.Points
Prelude Diagrams.Prelude Graphics.Rendering.Diagrams.Points> :t transform (translation zeroV) . P
transform (translation zeroV) . P
:: (Data.MemoTrie.HasTrie (Data.Basis.Basis a),
Data.Basis.HasBasis a) =>
a -> Point a
The text was updated successfully, but these errors were encountered: