A peer-to-peer stack for code collaboration
Do not use newtype FromToJSON derivation. (#590)
James Haydon0f2ccc03a46c
diff --git a/src/Radicle/Daemon/HttpApi.hs b/src/Radicle/Daemon/HttpApi.hsindex 643eb65..d58d2f7 100644--- a/src/Radicle/Daemon/HttpApi.hs+++ b/src/Radicle/Daemon/HttpApi.hs@@ -88,7 +88,10 @@ instance ToHttpApiData MachineId wheretoUrlPiece (MachineId id) = idnewtype QueryRequestF a = QueryRequest { expression :: a }- deriving (Functor, Foldable, Traversable, Generic, A.ToJSON, A.FromJSON)+ deriving (Functor, Foldable, Traversable, Generic)++instance A.ToJSON a => A.ToJSON (QueryRequestF a)+instance A.FromJSON a => A.FromJSON (QueryRequestF a)type QueryRequest = QueryRequestF Value@@ -96,7 +99,10 @@ instance FromRad Ann.WithPos QueryRequestinstance ToRad Ann.WithPos QueryRequestnewtype QueryResponseF v = QueryResponse { result :: v }- deriving (Functor, Foldable, Traversable, Generic, A.ToJSON, A.FromJSON)+ deriving (Functor, Foldable, Traversable, Generic)++instance A.ToJSON a => A.ToJSON (QueryResponseF a)+instance A.FromJSON a => A.FromJSON (QueryResponseF a)type QueryResponse = QueryResponseF Value@@ -104,7 +110,10 @@ instance FromRad Ann.WithPos QueryResponseinstance ToRad Ann.WithPos QueryResponsenewtype SendRequestF v = SendRequest { expressions :: [v] }- deriving (Functor, Foldable, Traversable, Generic, A.ToJSON, A.FromJSON)+ deriving (Functor, Foldable, Traversable, Generic)++instance A.ToJSON a => A.ToJSON (SendRequestF a)+instance A.FromJSON a => A.FromJSON (SendRequestF a)type SendRequest = SendRequestF Value@@ -113,7 +122,10 @@ instance ToRad Ann.WithPos SendRequestnewtype SendResponseF v = SendResponse{ results :: [v]- } deriving (Functor, Foldable, Traversable, Generic, A.ToJSON, A.FromJSON)+ } deriving (Functor, Foldable, Traversable, Generic)++instance A.ToJSON a => A.ToJSON (SendResponseF a)+instance A.FromJSON a => A.FromJSON (SendResponseF a)type SendResponse = SendResponseF Value