From d3046d4b97deba48397d7cb9d76759677c9a146a Mon Sep 17 00:00:00 2001 From: kiana-S Date: Mon, 20 Dec 2021 14:24:16 -0500 Subject: [PATCH] Create GOL.Space --- GOL/Space.hs | 9 +++++++++ conways-game-of-life.cabal | 10 ++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 GOL/Space.hs diff --git a/GOL/Space.hs b/GOL/Space.hs new file mode 100644 index 0000000..52a7fa7 --- /dev/null +++ b/GOL/Space.hs @@ -0,0 +1,9 @@ +module GOL.Space where + +import Data.Functor.Rep + +class (Representable f, Rep f ~ s) => Space s f where + neighbors :: s -> [s] + +class (Space (Int, Int) f) => DisplayableSpace f where + size :: (Int, Int) \ No newline at end of file diff --git a/conways-game-of-life.cabal b/conways-game-of-life.cabal index 47c6008..af5e877 100644 --- a/conways-game-of-life.cabal +++ b/conways-game-of-life.cabal @@ -7,7 +7,9 @@ build-type: Simple cabal-version: >= 1.8 executable main - build-depends: base, - comonad, - Yampa - main-is: Main.hs \ No newline at end of file + main-is: Main.hs + build-depends: base, + comonad, + Yampa, + adjunctions + default-extensions: MultiParamTypeClasses \ No newline at end of file