    {-# OPTIONS_HADDOCK hide #-}
    --------------------------------------------------------------------------------
    -- |
    -- Module      :  Graphics.Rendering.OpenGL.GL.GLboolean
    -- Copyright   :  (c) Sven Panne 2002-2019
    -- License     :  BSD3
    --
    -- Maintainer  :  Sven Panne <svenpanne@gmail.com>
    -- Stability   :  stable
    -- Portability :  portable
    --
    -- This is a purely internal module for (un-)marshaling GLboolean.
    --
    --------------------------------------------------------------------------------

    module Graphics.Rendering.OpenGL.GL.GLboolean (
       marshalGLboolean, unmarshalGLboolean
    ) where

    import Graphics.GL

    --------------------------------------------------------------------------------

    marshalGLboolean :: Num a => Bool -> a
    marshalGLboolean :: forall a. Num a => Bool -> a
    marshalGLboolean Bool
    x = GLboolean -> a
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (GLboolean -> a) -> GLboolean -> a
    forall a b. (a -> b) -> a -> b
    $ case Bool
    x of
       Bool
    False -> GLboolean
    GL_FALSE
       Bool
    True -> GLboolean
    GL_TRUE

    unmarshalGLboolean :: (Eq a, Num a) => a -> Bool
    unmarshalGLboolean :: forall a. (Eq a, Num a) => a -> Bool
    unmarshalGLboolean = (a -> a -> Bool
    forall a. Eq a => a -> a -> Bool
    /= GLboolean -> a
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral GLboolean
    GL_FALSE)