~alcinnz/fontconfig-pure

ref: a1837e5cba51dad2199502f9fc5e88c1184ca8c7 fontconfig-pure/lib/Graphics/Text/Font/Choose/LangSet.hs -rw-r--r-- 444 bytes
a1837e5c — Adrian Cochrane Fix C code, it compiles now! 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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!