Skip to content

Commit

Permalink
Export state variable constructors. Add Functor instance for Gettable…
Browse files Browse the repository at this point in the history
…StateVar. Bumped version number to 2.9.3.0. Fixes #60.
  • Loading branch information
svenpanne committed Oct 21, 2014
1 parent dc2d0d0 commit 3826a63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions Graphics/Rendering/OpenGL/GL/StateVar.hs
Expand Up @@ -47,12 +47,12 @@
module Graphics.Rendering.OpenGL.GL.StateVar (
-- * Readable State Variables
HasGetter(..),
GettableStateVar, makeGettableStateVar,
GettableStateVar(..), makeGettableStateVar,
-- * Writable State Variables
HasSetter(..),
SettableStateVar, makeSettableStateVar,
SettableStateVar(..), makeSettableStateVar,
-- * General State Variables
StateVar, makeStateVar,
StateVar(..), makeStateVar,
-- * Utility Functions
($~), ($=!), ($~!)
) where
Expand Down Expand Up @@ -80,6 +80,9 @@ newtype GettableStateVar a = GettableStateVar (IO a)
instance HasGetter GettableStateVar where
get (GettableStateVar g) = g

instance Functor GettableStateVar where
fmap f (GettableStateVar g) = GettableStateVar (fmap f g)

-- | Construct a 'GettableStateVar' from an IO action.
makeGettableStateVar :: IO a -> GettableStateVar a
makeGettableStateVar = GettableStateVar
Expand Down
2 changes: 1 addition & 1 deletion OpenGL.cabal
@@ -1,5 +1,5 @@
name: OpenGL
version: 2.9.2.0
version: 2.9.3.0
license: BSD3
license-file: LICENSE
maintainer: Sven Panne <svenpanne@gmail.com>, Jason Dagit <dagitj@gmail.com>
Expand Down

0 comments on commit 3826a63

Please sign in to comment.