2021-12-20 15:25:54 -05:00
|
|
|
{-# LANGUAGE AllowAmbiguousTypes #-}
|
|
|
|
{-# LANGUAGE FlexibleContexts #-}
|
|
|
|
{-# LANGUAGE MultiParamTypeClasses #-}
|
|
|
|
{-# LANGUAGE TypeFamilies #-}
|
|
|
|
|
2021-12-20 14:24:16 -05:00
|
|
|
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)
|