~alcinnz/fontconfig-pure

ref: e21707cbfcfa7ca64988c599b160d867debaf9a9 fontconfig-pure/Graphics/Text/Font/Choose/Result.hs -rw-r--r-- 306 bytes
e21707cb — Adrian Cochrane First! 2 years ago
                                                                                
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