AssociatedFile newtype
To prevent any further mistakes like 301aff34c4
This commit was sponsored by Francois Marier on Patreon.
This commit is contained in:
parent
2cd7496210
commit
c8e1e3dada
43 changed files with 179 additions and 138 deletions
|
@ -116,10 +116,10 @@ instance TCSerialized Direction where
|
|||
deserialize _ = Nothing
|
||||
|
||||
instance TCSerialized AssociatedFile where
|
||||
serialize (Just f) = f
|
||||
serialize Nothing = ""
|
||||
deserialize "" = Just Nothing
|
||||
deserialize f = Just $ Just f
|
||||
serialize (AssociatedFile (Just f)) = f
|
||||
serialize (AssociatedFile Nothing) = ""
|
||||
deserialize "" = Just (AssociatedFile Nothing)
|
||||
deserialize f = Just (AssociatedFile (Just f))
|
||||
|
||||
instance TCSerialized RemoteName where
|
||||
serialize n = n
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue