Go back to JSON encoding

This commit is contained in:
2022-08-21 21:23:59 +01:00
parent dd62e30026
commit f1ef75f511
95 changed files with 9 additions and 586 deletions
-5
View File
@@ -6,16 +6,12 @@
module MaybeHelp where
import TH.Derive
import Data.Store
import Control.Lens
import Data.Aeson
import Data.Binary
import Flat
data Maybe' a = Just' {__Just' :: a} | Nothing'
deriving (Eq, Ord, Show, Read, Generic, Flat)
instance (Binary a => Binary (Maybe' a))
instance ToJSON a => ToJSON (Maybe' a) where
toEncoding = genericToEncoding defaultOptions
@@ -44,4 +40,3 @@ toggleJust Nothing = Just ()
toggleJust _ = Nothing
makeLenses ''Maybe'
$($(derive [d| instance Store a => Deriving (Store (Maybe' a)) |]))