From 81cd9d4b158366c21149817d163ca865629ac72d Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Mon, 12 Dec 2022 12:33:18 -0500 Subject: [PATCH] refactor: delete unused TestTypes --- postgrest.cabal | 1 - test/spec/TestTypes.hs | 37 ------------------------------------- 2 files changed, 38 deletions(-) delete mode 100644 test/spec/TestTypes.hs diff --git a/postgrest.cabal b/postgrest.cabal index 08affd6c9..03bf2b4cc 100644 --- a/postgrest.cabal +++ b/postgrest.cabal @@ -220,7 +220,6 @@ test-suite spec Feature.RollbackSpec Feature.RpcPreRequestGucsSpec SpecHelper - TestTypes build-depends: base >= 4.9 && < 4.17 , aeson >= 2.0.3 && < 2.2 , aeson-qq >= 0.8.1 && < 0.9 diff --git a/test/spec/TestTypes.hs b/test/spec/TestTypes.hs deleted file mode 100644 index db1d4085b..000000000 --- a/test/spec/TestTypes.hs +++ /dev/null @@ -1,37 +0,0 @@ -module TestTypes ( - IncPK(..) -, CompoundPK(..) -) where - -import Data.Aeson ((.:)) -import qualified Data.Aeson as JSON - -import Protolude - -data IncPK = IncPK { - incId :: Int -, incNullableStr :: Maybe Text -, incStr :: Text -, incInsert :: Text -} deriving (Eq, Show) - -instance JSON.FromJSON IncPK where - parseJSON (JSON.Object r) = IncPK <$> - r .: "id" <*> - r .: "nullable_string" <*> - r .: "non_nullable_string" <*> - r .: "inserted_at" - parseJSON _ = mzero - -data CompoundPK = CompoundPK { - compoundK1 :: Int -, compoundK2 :: Text -, compoundExtra :: Maybe Int -} deriving (Eq, Show) - -instance JSON.FromJSON CompoundPK where - parseJSON (JSON.Object r) = CompoundPK <$> - r .: "k1" <*> - r .: "k2" <*> - r .: "extra" - parseJSON _ = mzero