fix[PrettySerialize Set]: missed beginFields
This commit is contained in:
parent
4e50d20d6d
commit
a7bff630fc
1 changed files with 4 additions and 3 deletions
|
@ -210,9 +210,10 @@ deriving via Generically (Compose a b c) instance (PrettySerialize (a (b c))) =>
|
|||
instance (Typeable a, PrettySerialize a) => PrettySerialize (Set a) where
|
||||
serializer :: Set a -> Serializer ()
|
||||
serializer set = do
|
||||
inDatatypeOf set $ do
|
||||
namedField "elements" $ do
|
||||
serializer $ Set.toList set
|
||||
inDatatypeOf set $ do -- set type name
|
||||
beginFields Nothing $ do -- skip constructor name
|
||||
namedField "elements" $ do -- emit field
|
||||
serializer $ Set.toList set
|
||||
|
||||
class ExtractMappings a where
|
||||
type KeyType a :: Type
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue