goatee 0.3.0 → 0.3.1
raw patch · 11 files changed
+41/−3 lines, 11 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- goatee.cabal +1/−1
- src/Game/Goatee/Lib/Monad.hs +2/−0
- src/Game/Goatee/Lib/Parser.hs +4/−0
- src/Game/Goatee/Lib/Property/Base.hs +3/−1
- src/Game/Goatee/Lib/Property/Parser.hs +6/−0
- src/Game/Goatee/Lib/Tree.hs +4/−0
- src/Game/Goatee/Lib/Types.hs +4/−0
- tests/Game/Goatee/CommonTest.hs +3/−1
- tests/Game/Goatee/Lib/MonadTest.hs +6/−0
- tests/Game/Goatee/Lib/ParserTestUtils.hs +4/−0
- tests/Game/Goatee/Lib/Property/ParserTest.hs +4/−0
goatee.cabal view
@@ -1,5 +1,5 @@ name: goatee-version: 0.3.0+version: 0.3.1 synopsis: A monadic take on a 2,500-year-old board game - library. category: Game license: AGPL-3
src/Game/Goatee/Lib/Monad.hs view
@@ -38,7 +38,9 @@ variationModeChangedEvent, VariationModeChangedHandler, ) where +#if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<$>), Applicative ((<*>), pure))+#endif #if !MIN_VERSION_containers(0,5,0) import Control.Arrow (second) #endif
src/Game/Goatee/Lib/Parser.hs view
@@ -15,6 +15,8 @@ -- You should have received a copy of the GNU Affero General Public License -- along with Goatee. If not, see <http://www.gnu.org/licenses/>. +{-# LANGUAGE CPP #-}+ -- | A parser for reading SGF files. module Game.Goatee.Lib.Parser ( parseString,@@ -24,7 +26,9 @@ ) where import Control.Arrow ((+++))+#if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<*), (*>))+#endif import Data.Maybe (fromMaybe) import Game.Goatee.Common import Game.Goatee.Lib.Board
src/Game/Goatee/Lib/Property/Base.hs view
@@ -15,7 +15,7 @@ -- You should have received a copy of the GNU Affero General Public License -- along with Goatee. If not, see <http://www.gnu.org/licenses/>. -{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE CPP, TemplateHaskell #-} {-# OPTIONS_HADDOCK hide #-} -- | Core property-related data types, and some Template Haskell declarations@@ -35,7 +35,9 @@ defProperty, defValuedProperty, ) where +#if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<$))+#endif import Game.Goatee.Lib.Property.Value (PropertyValueType(..), nonePvt) import Game.Goatee.Lib.Renderer import Game.Goatee.Lib.Types
src/Game/Goatee/Lib/Property/Parser.hs view
@@ -15,6 +15,8 @@ -- You should have received a copy of the GNU Affero General Public License -- along with Goatee. If not, see <http://www.gnu.org/licenses/>. +{-# LANGUAGE CPP #-}+ -- | Parsers of property values. module Game.Goatee.Lib.Property.Parser ( colorParser,@@ -43,11 +45,15 @@ text, ) where +#if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<$), (<$>), (<*), (<*>), (*>))+#endif import Control.Monad (when) import Data.Char (isUpper, ord) import Data.Maybe (catMaybes)+#if !MIN_VERSION_base(4,8,0) import Data.Monoid (Monoid, mappend, mconcat, mempty)+#endif import qualified Game.Goatee.Common.Bigfloat as BF import Game.Goatee.Lib.Types import Text.ParserCombinators.Parsec (
src/Game/Goatee/Lib/Tree.hs view
@@ -15,6 +15,8 @@ -- You should have received a copy of the GNU Affero General Public License -- along with Goatee. If not, see <http://www.gnu.org/licenses/>. +{-# LANGUAGE CPP #-}+ -- | SGF data structures modelling the hierarchical game tree. module Game.Goatee.Lib.Tree ( Collection(..), CollectionWithDeepEquality(..),@@ -25,7 +27,9 @@ validateNode, ) where +#if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<$>))+#endif import Control.Monad (forM_, unless, when) import Control.Monad.Writer (Writer, execWriter, tell) import Data.Function (on)
src/Game/Goatee/Lib/Types.hs view
@@ -15,6 +15,8 @@ -- You should have received a copy of the GNU Affero General Public License -- along with Goatee. If not, see <http://www.gnu.org/licenses/>. +{-# LANGUAGE CPP #-}+ -- | Constants and data types for property values used in SGF game trees. module Game.Goatee.Lib.Types ( -- * Constants@@ -45,7 +47,9 @@ Ruleset (..), RulesetType (..), fromRuleset, toRuleset, ) where +#if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<$>), (<*>))+#endif import Data.Char (isSpace) import Data.Function (on) import Data.List (delete, groupBy, partition, sort)
tests/Game/Goatee/CommonTest.hs view
@@ -1,6 +1,6 @@ -- This file is part of Goatee. ----- Copyright 2014 Bryan Gardiner+-- Copyright 2014-2015 Bryan Gardiner -- -- Goatee is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by@@ -14,6 +14,8 @@ -- -- You should have received a copy of the GNU Affero General Public License -- along with Goatee. If not, see <http://www.gnu.org/licenses/>.++{-# LANGUAGE FlexibleContexts #-} module Game.Goatee.CommonTest (tests) where
tests/Game/Goatee/Lib/MonadTest.hs view
@@ -15,16 +15,22 @@ -- You should have received a copy of the GNU Affero General Public License -- along with Goatee. If not, see <http://www.gnu.org/licenses/>. +{-# LANGUAGE CPP, FlexibleContexts #-}+ module Game.Goatee.Lib.MonadTest (tests) where +#if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<$>))+#endif import Control.Arrow ((&&&), second) import Control.Monad (forM_, liftM, replicateM_, void) import Control.Monad.Writer (Writer, execWriter, runWriter, tell) import Data.List (sortBy, unfoldr) import qualified Data.Map as Map import Data.Maybe (fromJust, maybeToList)+#if !MIN_VERSION_base(4,8,0) import Data.Monoid (Monoid)+#endif import Data.Ord (comparing) import Game.Goatee.Common import Game.Goatee.Lib.Board
tests/Game/Goatee/Lib/ParserTestUtils.hs view
@@ -15,6 +15,8 @@ -- You should have received a copy of the GNU Affero General Public License -- along with Goatee. If not, see <http://www.gnu.org/licenses/>. +{-# LANGUAGE CPP #-}+ module Game.Goatee.Lib.ParserTestUtils ( parseOrFail, parseAndFail,@@ -22,7 +24,9 @@ assertNoParse, ) where +#if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<*))+#endif import Game.Goatee.Lib.Parser import Game.Goatee.Lib.Tree import Test.HUnit (assertFailure)
tests/Game/Goatee/Lib/Property/ParserTest.hs view
@@ -15,9 +15,13 @@ -- You should have received a copy of the GNU Affero General Public License -- along with Goatee. If not, see <http://www.gnu.org/licenses/>. +{-# LANGUAGE CPP #-}+ module Game.Goatee.Lib.Property.ParserTest (tests) where +#if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<$>))+#endif import Control.Monad (forM_) import Data.Maybe (catMaybes) import Game.Goatee.Common