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