~alcinnz/fontconfig-pure

bdaebbb0d0fbcbdd947c3ff4a40bead9aac47980 — Adrian Cochrane 2 years ago f238fc9
Document FcValue language bindings.
1 files changed, 2 insertions(+), 0 deletions(-)

M Graphics/Text/Font/Choose/Value.hs
M Graphics/Text/Font/Choose/Value.hs => Graphics/Text/Font/Choose/Value.hs +2 -0
@@ 20,6 20,7 @@ import GHC.Generics (Generic)
import Data.Hashable (Hashable)
import Graphics.Text.Font.Choose.Result (throwNull, Error(ErrTypeMismatch))

-- | A dynamic type system for `Pattern`s.
data Value = ValueVoid
    | ValueInt Int
    | ValueDouble Double


@@ 33,6 34,7 @@ data Value = ValueVoid

instance Hashable Value

-- | Coerces compiletime types to runtime types.
class ToValue x where
    toValue :: x -> Value
    fromValue :: Value -> Maybe x