S prípadovou štúdiou
module BTree ( BTree(Leaf,Node), mapBTree ) where
data BTree = ...
mapBTree ...
module BTree (BTree, mapBTree) where
module BTree (BTree(..), mapBTree) where
import Tree
import BTree ( BTree(Leaf,Node), mapBTree )
import qualified BTree ( BTree(Leaf,Node), mapBTree )
myTree = BTree.Node (BTree.Leaf 1) (BTree.Leaf 2)
secondTree = BTree.mapBTree (+1) myTree
import qualified Data.Map as M
data Board = ...
data Config = Config Int Int Int
data Tile = Open Int | Closed | Marked | Exploded
data Pos = Pos Int Int
data Move = MarkTile Pos | OpenTile Pos
data MoveResult = Playing | Solved | Failed
tileState :: Board -> Pos -> Tile
gameMove :: Board -> Move -> (MoveResult, Board)
play :: Config -> Solver -> IO Bool
type Solver = Board -> IO Move
createBoard :: Config -> Board
createBoard :: RandomGen g => g -> Config -> Board