Attempt to make CWorld correct instance of Store

This commit is contained in:
2022-08-20 15:53:37 +01:00
parent e1a555ea02
commit 8571ab9254
89 changed files with 570 additions and 19 deletions
+15 -6
View File
@@ -2,6 +2,7 @@
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{- |
@@ -10,12 +11,14 @@ The warnings have been disabled.
-}
module Dodge.Data.PathGraph where
import LinearHelp
import Control.Lens
import Data.Aeson
import Data.Graph.Inductive
import Data.Map.Strict (Map)
import qualified Data.Set as Set
import Data.Store
import Data.Store.TH
import GHC.Generics
import Geometry.Data
import TH.Derive
@@ -65,9 +68,15 @@ instance (FromJSON a, FromJSON b) => FromJSON (Gr a b)
makeLenses ''PathGraph
makeLenses ''PathEdge
$( $( derive
[d|
instance Store a => Deriving (Store (Gr a))
|]
)
)
{- FOURMOLU_DISABLE -}
$($(derive [d|
instance Deriving (Store EdgeObstacle)
|]))
$($(derive [d|
instance Deriving (Store PathEdge)
|]))
$($(derive [d|
instance Deriving (Store (Gr Point2 PathEdge))
|]))
{- FOURMOLU_ENABLE -}