Remove generic and flat instances

This commit is contained in:
2022-08-21 22:38:40 +01:00
parent 36c8befa9f
commit 7181046aa3
94 changed files with 312 additions and 423 deletions
+7 -6
View File
@@ -16,7 +16,7 @@ module Geometry.ConvexPoly (
import Control.Lens
import Data.Aeson
import Flat
import Data.Aeson.TH
import Geometry.Data
import Geometry.Intersect
import Geometry.LHS
@@ -30,12 +30,12 @@ data ConvexPoly = ConvexPoly
, _cpCen :: Point2
, _cpRad :: Float
}
deriving (Eq, Ord, Show, Read, Generic, Flat)
deriving (Eq, Ord, Show, Read)--, Generic) --Generic, Flat)
instance ToJSON ConvexPoly where
toEncoding = genericToEncoding defaultOptions
instance FromJSON ConvexPoly
--instance ToJSON ConvexPoly where
-- toEncoding = genericToEncoding defaultOptions
--
--instance FromJSON ConvexPoly
pointsToPoly :: [Point2] -> ConvexPoly
pointsToPoly xs =
@@ -89,3 +89,4 @@ pairPolyPointsIntersect a' b' (c' : d' : xs') = go c' a' b' (c' : d' : xs')
pairPolyPointsIntersect _ _ _ = False
makeLenses ''ConvexPoly
deriveJSON defaultOptions ''ConvexPoly