-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | hsdip - a Diplomacy parser/renderer -- -- hsdip - a Diplomacy parser/renderer @package hsdip @version 0.1 module Diplomacy data Power Austria :: Power England :: Power France :: Power Germany :: Power Italy :: Power Russia :: Power Turkey :: Power powerNames :: [[Char]] data Unit Army :: Unit Fleet :: Unit type Location = String type UnitLoc = (Unit, Location) data Move Hold :: Move Attack :: Location -> Move Support :: UnitMove -> Move Convoy :: UnitMove -> Move data UnitMove UnitMove :: UnitLoc -> Move -> UnitMove type UnitMoveTry = (UnitMove, Bool) type Ownership = (Maybe Power, [Location]) type PowerPos = (Power, [UnitLoc]) type PowerMove = (Power, [UnitMoveTry]) type Year = Int data Season Spring :: Season Fall :: Season data TurnType Movement :: TurnType Adjustment :: TurnType Retreat :: TurnType type Time = (Year, Season, TurnType) data Turn Turn :: String -> Time -> [PowerPos] -> [PowerMove] -> [Ownership] -> Turn turnName :: Turn -> String turnTime :: Turn -> Time turnUnits :: Turn -> [PowerPos] turnMoves :: Turn -> [PowerMove] turnOwnership :: Turn -> [Ownership] emptyTurn :: Turn showTurn :: Turn -> String -> String instance Eq TurnType instance Show TurnType instance Ord TurnType instance Eq Season instance Show Season instance Ord Season instance Eq UnitMove instance Show UnitMove instance Eq Move instance Show Move instance Eq Unit instance Show Unit instance Eq Power instance Show Power instance Read Power instance Show Turn module JudgeParser parseFileTurn :: SourceName -> IO (Either String Turn) parseFileTurns :: SourceName -> IO (Either String [Turn]) tests :: Test module Conf data Conf Conf :: Map String (Int, Int) -> Conf locations :: Conf -> Map String (Int, Int) locXY :: Conf -> Location -> (Double, Double) parseFile :: FilePath -> IO (Either String Conf) instance Show Conf module Render renderTurnToFile :: Conf -> Turn -> FilePath -> IO ()