~alcinnz/fontconfig-pure

ref: 1abac8a15549eca8eb56b16f2bb22ba9a09a7cd9 fontconfig-pure/lib/Graphics/Text/Font/Choose/StrSet.hs -rw-r--r-- 360 bytes
1abac8a1 — Adrian Cochrane Constrain public API. 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
module Graphics.Text.Font.Choose.StrSet(StrSet(..), module S) where

import Data.Set (Set)
import qualified Data.Set as S

import Data.MessagePack (MessagePack(..))

newtype StrSet = StrSet { unStrSet :: Set String }

instance MessagePack StrSet where
    toObject = toObject . S.toList . unStrSet
    fromObject msg = StrSet <$> S.fromList <$> fromObject msg