Skip to content

Commit 604aa2e

Browse files
committed
Use the Half type from the half package. Bumped version to 2.6.0.0.
1 parent f6598ee commit 604aa2e

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2.6.0.0
2+
-------
3+
* Use the `Half` type from the `half` package.
4+
15
2.5.5.0
26
-------
37
* Added retrieval of version info and extensions.

OpenGLRaw.cabal

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: OpenGLRaw
2-
version: 2.5.5.0
2+
version: 2.6.0.0
33
synopsis: A raw binding for the OpenGL graphics system
44
description:
55
OpenGLRaw is a raw Haskell binding for the OpenGL 4.5 graphics system and
@@ -602,12 +602,12 @@ library
602602
cbits/HsOpenGLRaw.c
603603
hs-source-dirs: src
604604
build-depends:
605-
base >= 4 && < 5,
606-
bytestring >= 0.9 && < 0.11,
607-
containers >= 0.3 && < 0.6,
605+
base >= 4 && < 5,
606+
bytestring >= 0.9 && < 0.11,
607+
containers >= 0.3 && < 0.6,
608608
half >= 0.2.2.1 && < 0.3,
609-
text >= 0.1 && < 1.3,
610-
transformers >= 0.2 && < 0.5
609+
text >= 0.1 && < 1.3,
610+
transformers >= 0.2 && < 0.5
611611
default-language: Haskell2010
612612
ghc-options: -Wall
613613
other-extensions: CPP

RegistryProcessor/src/Main.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ printForeign sigMap = do
161161
SI.hPutStrLn h "import Foreign.C.Types"
162162
SI.hPutStrLn h "import Foreign.Ptr"
163163
SI.hPutStrLn h $ "import " ++ moduleNameFor ["Types"]
164+
SI.hPutStrLn h "import Numeric.Half"
164165
SI.hPutStrLn h ""
165166
mapM_ (SI.hPutStrLn h . uncurry makeImportDynamic) (M.assocs sigMap)
166167

src/Graphics/Rendering/OpenGL/Raw/Foreign.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ module Graphics.Rendering.OpenGL.Raw.Foreign where
1919
import Foreign.C.Types
2020
import Foreign.Ptr
2121
import Graphics.Rendering.OpenGL.Raw.Types
22+
import Numeric.Half
2223

2324
foreign import CALLCONV "dynamic" dyn201
2425
:: FunPtr (GLDEBUGPROC -> Ptr a -> IO ())

src/Graphics/Rendering/OpenGL/Raw/Types.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ import Data.Int
6363
import Data.Word
6464
import Foreign.C.Types
6565
import Foreign.Ptr
66+
import Numeric.Half
6667

6768
--------------------------------------------------------------------------------
6869

@@ -121,7 +122,7 @@ type GLsync = Ptr ()
121122
type GLbitfield = CUInt
122123

123124
-- | 16bit half-precision floating-point value encoded in an unsigned scalar.
124-
type GLhalf = CUShort
125+
type GLhalf = Half
125126

126127
-- | 32bit floating-point value.
127128
type GLfloat = CFloat
@@ -167,9 +168,9 @@ type GLintptrARB = CPtrdiff
167168

168169
type GLsizeiptrARB = CPtrdiff
169170

170-
type GLhalfARB = CUShort
171+
type GLhalfARB = Half
171172

172-
type GLhalfNV = CUShort
173+
type GLhalfNV = Half
173174

174175
type GLDEBUGPROCAMD = FunPtr GLDEBUGPROCAMDFunc
175176

0 commit comments

Comments
 (0)