Attempt to make CWorld correct instance of Store
This commit is contained in:
@@ -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 -}
|
||||
|
||||
Reference in New Issue
Block a user