From bdaebbb0d0fbcbdd947c3ff4a40bead9aac47980 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Tue, 20 Dec 2022 10:53:23 +1300 Subject: [PATCH] Document FcValue language bindings. --- Graphics/Text/Font/Choose/Value.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Graphics/Text/Font/Choose/Value.hs b/Graphics/Text/Font/Choose/Value.hs index 8591bd2..eb1639c 100644 --- a/Graphics/Text/Font/Choose/Value.hs +++ b/Graphics/Text/Font/Choose/Value.hs @@ -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 -- 2.30.2