Remove generic and flat instances
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user