ObjectName-1.0.0.0/0000755000175000001440000000000011227135346012701 5ustar panneusersObjectName-1.0.0.0/LICENSE0000644000175000001440000000271511227135346013713 0ustar panneusersCopyright (c) 2009, Sven Panne All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ObjectName-1.0.0.0/src/0000755000175000001440000000000011227135346013470 5ustar panneusersObjectName-1.0.0.0/src/Data/0000755000175000001440000000000011227135346014341 5ustar panneusersObjectName-1.0.0.0/src/Data/ObjectName.hs0000644000175000001440000000226611227135346016712 0ustar panneusers-------------------------------------------------------------------------------- -- | -- Module : Data.ObjectName -- Copyright : (c) Sven Panne 2009 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : sven.panne@aedion.de -- Stability : stable -- Portability : portable -- -- Object names are explicitly handled identifiers for API objects, e.g. a -- texture object name in OpenGL or a buffer object name in OpenAL. -- -------------------------------------------------------------------------------- module Data.ObjectName ( ObjectName(..) ) where -- | An 'ObjectName' is an explicitly handled identifier for API objects, e.g. a -- texture object name in OpenGL or a buffer object name in OpenAL. class ObjectName a where -- | Generate a given number of object names, which are guaranteed to be -- unused. By generating the names, they become used. genObjectNames :: Int -> IO [a] -- | Make the given object names available again, declaring them as unused. deleteObjectNames:: [a] -> IO () -- | Test if the given object name is currently in use, i.e. test if it has -- been generated, but not been deleted so far. isObjectName :: a -> IO Bool ObjectName-1.0.0.0/Setup.hs0000644000175000001440000000005611227135346014336 0ustar panneusersimport Distribution.Simple main = defaultMain ObjectName-1.0.0.0/ObjectName.cabal0000644000175000001440000000114411227135346015674 0ustar panneusersname: ObjectName version: 1.0.0.0 license: BSD3 license-file: LICENSE maintainer: Sven Panne bug-reports: mailto:hopengl@haskell.org homepage: http://www.haskell.org/HOpenGL/ category: Data synopsis: Explicitly handled object names description: This tiny package contains the class ObjectName, which corresponds to the general notion of explicitly handled identifiers for API objects, e.g. a texture object name in OpenGL or a buffer object name in OpenAL. build-type: Simple exposed-modules: Data.ObjectName hs-Source-Dirs: src ghc-options: -Wall build-depends: base >= 3 && < 5