FieldTrip 0.2.4 → 0.2.6
raw patch · 4 files changed
+6/−34 lines, 4 filesdep ~OpenGLdep ~base
Dependency ranges changed: OpenGL, base
Files
- FieldTrip.cabal +5/−3
- src/Graphics/FieldTrip/Color.hs +1/−10
- src/Graphics/FieldTrip/Vector2.hs +0/−12
- src/Graphics/FieldTrip/Vector3.hs +0/−9
FieldTrip.cabal view
@@ -1,5 +1,5 @@ Name: FieldTrip-Version: 0.2.4+Version: 0.2.6 Synopsis: Functional 3D Category: graphics Description:@@ -11,14 +11,16 @@ Author: Conal Elliott and Andy Gill Maintainer: conal@conal.net, andygill@ku.edu Homepage: http://haskell.org/haskellwiki/FieldTrip-Package-Url: http://code.haskell.org/f3d+Package-Url: http://code.haskell.org/FieldTrip+Bug-Reports: http://trac.haskell.org/FieldTrip+ Copyright: (c) 2007-2008 by Conal Elliott and Andy Gill License: BSD3 Stability: experimental build-type: Simple Hs-Source-Dirs: src Extensions: -Build-Depends: base, old-time, OpenGL, GLUT, TypeCompose, MemoTrie, vector-space >= 0.5.7, graphicsFormats+Build-Depends: base<=4, old-time, OpenGL>=2.2.3.0, GLUT, TypeCompose, MemoTrie, vector-space >= 0.5.7, graphicsFormats Exposed-Modules: Graphics.FieldTrip Graphics.FieldTrip.Misc
src/Graphics/FieldTrip/Color.hs view
@@ -31,6 +31,7 @@ import Graphics.FieldTrip.Misc + -- | Our color type (with alpha) type Col = Color4 R @@ -115,16 +116,6 @@ => InnerSpace (Color4 r) where Color4 r g b a <.> Color4 r' g' b' a' = r<.>r' ^+^ g<.>g' ^+^ b<.>b' ^+^ a<.>a'--instance Functor Color4 where- fmap f (Color4 r g b a) = Color4 (f r) (f g) (f b) (f a)---- instance Applicative Color4 where--- pure = grey--- Color4 f h k l <*> Color4 r g b a = Color4 (f r) (h g) (k b) (l a)---- I don't know how to define 'pure' above without requiring Num on the--- parameter, which then breaks the required unrestricted polymorphism.
src/Graphics/FieldTrip/Vector2.hs view
@@ -26,8 +26,6 @@ , vector2D, unvector2D ) where -import Control.Applicative- import Graphics.Rendering.OpenGL.GL.CoordTrans (Vector2(..)) import Data.VectorSpace@@ -65,16 +63,6 @@ theta = atan (y/x) -- in case (==) is not defined, as in (a:>b) -- if x == 0 then 0 else atan (y/x) --instance Functor Vector2 where- fmap f (Vector2 x y) = Vector2 (f x) (f y)--instance Applicative Vector2 where- pure x = Vector2 x x- Vector2 f g <*> Vector2 x y = Vector2 (f x) (g y)----- TODO: is UndecidableInstances still necessary? instance AdditiveGroup u => AdditiveGroup (Vector2 u) where zeroV = Vector2 zeroV zeroV
src/Graphics/FieldTrip/Vector3.hs view
@@ -26,8 +26,6 @@ , vector3D, unvector3D, cross3 ) where -import Control.Applicative- import Graphics.Rendering.OpenGL (Vector3(..)) import Data.VectorSpace@@ -85,13 +83,6 @@ theta = atan (y/x) -- in case (==) is not defined, as in (a:>b) -- if x == 0 then 0 else atan (y/x) phi = acos (z / rho)--instance Functor Vector3 where- fmap f (Vector3 x y z) = Vector3 (f x) (f y) (f z)--instance Applicative Vector3 where- pure x = Vector3 x x x- Vector3 f g h <*> Vector3 x y z = Vector3 (f x) (g y) (h z) instance AdditiveGroup u => AdditiveGroup (Vector3 u) where