about summary refs log tree commit diff
path: root/src/Xanthous/Entities/Entities.hs-boot
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2020-01-03T17·41-0500
committerGriffin Smith <root@gws.fyi>2020-01-03T17·41-0500
commit1b88921bc36e5da1ade5c52827d057dc2be65bc5 (patch)
treed731dffc16929213becf34105406b56906118a07 /src/Xanthous/Entities/Entities.hs-boot
parentc4351d46ef13da5fbe2048bb3506f9549b61f437 (diff)
Decouple Gormlak AI from creatures
Decouple the definition of the Gormlak AI from the creature type itself
using generic lenses and a "HasVisionRadius" typeclass, to begin to
untangle the hs-boot web of circular dependencies. This
actually *increases* the number of hs-boot files from 1 to 2, but both
of the source imports that use them are single-instance (unlike gormlak
AI which I would expect to grow linearly with the growth of the game),
plus at least one should be able to go away once we remove collision
from the game lenses module and move it into something defined in the
entity class itself.
Diffstat (limited to 'src/Xanthous/Entities/Entities.hs-boot')
-rw-r--r--src/Xanthous/Entities/Entities.hs-boot14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Xanthous/Entities/Entities.hs-boot b/src/Xanthous/Entities/Entities.hs-boot
new file mode 100644
index 000000000000..519a862c6a5a
--- /dev/null
+++ b/src/Xanthous/Entities/Entities.hs-boot
@@ -0,0 +1,14 @@
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+module Xanthous.Entities.Entities where
+
+import Test.QuickCheck
+import Data.Aeson
+import Xanthous.Game.State (SomeEntity, GameState, Entity)
+
+instance Arbitrary SomeEntity
+instance Function SomeEntity
+instance CoArbitrary SomeEntity
+instance FromJSON SomeEntity
+instance Entity SomeEntity
+
+instance FromJSON GameState