Skip to content

Commit 3826a63

Browse files
committed
Export state variable constructors. Add Functor instance for GettableStateVar. Bumped version number to 2.9.3.0. Fixes #60.
1 parent dc2d0d0 commit 3826a63

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Graphics/Rendering/OpenGL/GL/StateVar.hs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@
4747
module Graphics.Rendering.OpenGL.GL.StateVar (
4848
-- * Readable State Variables
4949
HasGetter(..),
50-
GettableStateVar, makeGettableStateVar,
50+
GettableStateVar(..), makeGettableStateVar,
5151
-- * Writable State Variables
5252
HasSetter(..),
53-
SettableStateVar, makeSettableStateVar,
53+
SettableStateVar(..), makeSettableStateVar,
5454
-- * General State Variables
55-
StateVar, makeStateVar,
55+
StateVar(..), makeStateVar,
5656
-- * Utility Functions
5757
($~), ($=!), ($~!)
5858
) where
@@ -80,6 +80,9 @@ newtype GettableStateVar a = GettableStateVar (IO a)
8080
instance HasGetter GettableStateVar where
8181
get (GettableStateVar g) = g
8282

83+
instance Functor GettableStateVar where
84+
fmap f (GettableStateVar g) = GettableStateVar (fmap f g)
85+
8386
-- | Construct a 'GettableStateVar' from an IO action.
8487
makeGettableStateVar :: IO a -> GettableStateVar a
8588
makeGettableStateVar = GettableStateVar

OpenGL.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: OpenGL
2-
version: 2.9.2.0
2+
version: 2.9.3.0
33
license: BSD3
44
license-file: LICENSE
55
maintainer: Sven Panne <svenpanne@gmail.com>, Jason Dagit <dagitj@gmail.com>

0 commit comments

Comments
 (0)