Create GOL.Space
This commit is contained in:
parent
96cccfe750
commit
d3046d4b97
9
GOL/Space.hs
Normal file
9
GOL/Space.hs
Normal file
|
@ -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)
|
|
@ -7,7 +7,9 @@ build-type: Simple
|
||||||
cabal-version: >= 1.8
|
cabal-version: >= 1.8
|
||||||
|
|
||||||
executable main
|
executable main
|
||||||
build-depends: base,
|
main-is: Main.hs
|
||||||
comonad,
|
build-depends: base,
|
||||||
Yampa
|
comonad,
|
||||||
main-is: Main.hs
|
Yampa,
|
||||||
|
adjunctions
|
||||||
|
default-extensions: MultiParamTypeClasses
|
Loading…
Reference in a new issue