module Graphics.Text.Font.Choose.LangSet where
import Data.Set (Set)
import qualified Data.Set as S
import Data.MessagePack (MessagePack(..))
type LangSet = Set String
newtype LangSet' = LangSet' { unLangSet :: LangSet }
instance MessagePack LangSet' where
toObject = toObject . S.toList . unLangSet
fromObject msg = LangSet' <$> S.fromList <$> fromObject msg
-- TODO: Implement language bindings! But first: Datamodel everything!