~alcinnz/fontconfig-pure

ref: 77762b284a375f7e9a862e31e68d7a4417278d5b fontconfig-pure/Graphics/Text/Font/Choose/Result.hs -rw-r--r-- 306 bytes
77762b28 — Adrian Cochrane Draft bindings for FcConfig! 2 years ago
                                                                                
e21707cb Adrian Cochrane
1
2
3
4
5
6
7
8
9
module Graphics.Text.Font.Choose.Result (Result(..), resultFromPointer) where

import Foreign.Storable (peek)

data Result = Match | NoMatch | TypeMismatch | ResultNoId | OutOfMemory
    deriving (Eq, Show, Read, Enum)

resultFromPointer :: Ptr Int -> IO Result
resultFromPointer res = toEnum <$> peek res