freetype2-0.2.0: Haskell bindings for FreeType 2 library

Safe HaskellSafe
LanguageHaskell98

FreeType.Exception.Internal

Synopsis

Documentation

ftError :: String -> IO FT_Error -> IO () Source #

An internal function for throwing FtErrors

class AutoError a b where Source #

Methods

autoError :: String -> a -> b Source #

    autoError name f = a b c ... ->
      ftError name $ f a b c ...
  
Instances
AutoError (b -> c) (b -> d) => AutoError (a -> b -> c) (a -> b -> d) Source # 
Instance details

Defined in FreeType.Exception.Internal

Methods

autoError :: String -> (a -> b -> c) -> a -> b -> d Source #

AutoError (a -> IO FT_Error) (a -> IO ()) Source # 
Instance details

Defined in FreeType.Exception.Internal

Methods

autoError :: String -> (a -> IO FT_Error) -> a -> IO () Source #

class AutoAllocaError a b where Source #

Methods

autoAllocaError :: String -> a -> b Source #

    autoAllocaError name f = a b c ->
      alloca $ ptr -> do
        ftError name $ f a b c ... ptr
        peek ptr
  
Instances
Storable a => AutoAllocaError (Ptr a -> IO FT_Error) (IO a) Source # 
Instance details

Defined in FreeType.Exception.Internal

Methods

autoAllocaError :: String -> (Ptr a -> IO FT_Error) -> IO a Source #

AutoAllocaError (b -> c) (b -> d) => AutoAllocaError (a -> b -> c) (a -> b -> d) Source # 
Instance details

Defined in FreeType.Exception.Internal

Methods

autoAllocaError :: String -> (a -> b -> c) -> a -> b -> d Source #

Storable b => AutoAllocaError (a -> Ptr b -> IO FT_Error) (a -> IO b) Source # 
Instance details

Defined in FreeType.Exception.Internal

Methods

autoAllocaError :: String -> (a -> Ptr b -> IO FT_Error) -> a -> IO b Source #