caramia-0.7.2.2: High-level OpenGL bindings

Safe HaskellSafe
LanguageHaskell2010

Graphics.Caramia.Prelude

Description

This module is used as the prelude module inside Caramia.

Synopsis

Documentation

safeFromIntegral :: forall a b. (Num a, Integral a, Num b, Integral b) => a -> b Source

Similar to fromIntegral but raises a user error if the source integer cannot be represented in the target type.

This cannot turn an integral into a non-integral type.

showT :: Show a => a -> Text Source

Same as show but the result will be a Text, not String.

atomicModifyIORef_' :: IORef a -> (a -> a) -> IO () Source

Same as atomicModifyIORef' but does not return a value.