diff --git a/icfp2015.cabal b/icfp2015.cabal index 9da4a43..a53f617 100644 --- a/icfp2015.cabal +++ b/icfp2015.cabal @@ -1,10 +1,10 @@ --- Initial icfp2015.cabal generated by cabal init. For further +-- Initial icfp2015.cabal generated by cabal init. For further -- documentation, see http://haskell.org/cabal/users-guide/ -- The name of the package. name: icfp2015 --- The package version. See the Haskell package versioning policy (PVP) +-- The package version. See the Haskell package versioning policy (PVP) -- for standards guiding when and how versions should be incremented. -- http://www.haskell.org/haskellwiki/Package_versioning_policy -- PVP summary: +-+------- breaking API changes @@ -51,20 +51,20 @@ cabal-version: >=1.10 executable icfp2015 -- .hs or .lhs file containing the Main module. - main-is: Main.hs + main-is: Main0.hs -- Modules included in this executable, other than Main. - -- other-modules: + other-modules: Datatypes, Datatypes.Board, Datatypes.Cell, Datatypes.Game, Datatypes.Unit -- LANGUAGE extensions used by modules in this package. other-extensions: OverloadedStrings, DeriveGeneric, DeriveDataTypeable - + -- Other library packages from which modules are imported. - build-depends: base >=4.7 && <4.8, hashable >=1.2 && <1.3, containers >=0.5 && <0.6, QuickCheck >=2.7 && <2.8, bytestring >=0.10 && <0.11 - + build-depends: base >=4.7 && <4.8, hashable >=1.2 && <1.3, containers >=0.5 && <0.6, QuickCheck >=2.7 && <2.8, bytestring >=0.10 && <0.11, aeson >=0.8 && <0.9, json >=0.9 && <0.10 + -- Directories containing source files. - -- hs-source-dirs: - + hs-source-dirs: src + -- Base language which the package is written in. default-language: Haskell2010 - \ No newline at end of file + diff --git a/src/Datatypes.hs b/src/Datatypes.hs index 8f53062..4004531 100644 --- a/src/Datatypes.hs +++ b/src/Datatypes.hs @@ -5,7 +5,7 @@ import qualified Data.List as List import Data.Set (Set) import qualified Data.Set as Set -import Datatypes.Board (Board) -import Datatypes.Cell (Cell) -import Datatypes.Game (Game) -import Datatypes.Unit (Unit) +import Datatypes.Board (Board(..)) +import Datatypes.Cell (Cell(..)) +import Datatypes.Game (Game(..)) +import Datatypes.Unit (Unit(..)) diff --git a/src/Datatypes.Board.hs b/src/Datatypes/Board.hs similarity index 100% rename from src/Datatypes.Board.hs rename to src/Datatypes/Board.hs diff --git a/src/Datatypes.Cell.hs b/src/Datatypes/Cell.hs similarity index 100% rename from src/Datatypes.Cell.hs rename to src/Datatypes/Cell.hs diff --git a/src/Datatypes.Game.hs b/src/Datatypes/Game.hs similarity index 100% rename from src/Datatypes.Game.hs rename to src/Datatypes/Game.hs diff --git a/src/Datatypes.Unit.hs b/src/Datatypes/Unit.hs similarity index 100% rename from src/Datatypes.Unit.hs rename to src/Datatypes/Unit.hs diff --git a/vm/GeneralStrategies.hs b/src/GeneralStrategies.hs similarity index 100% rename from vm/GeneralStrategies.hs rename to src/GeneralStrategies.hs diff --git a/src/JSONDeser.hs b/src/JSONDeser.hs index 3b90da2..9bd115d 100644 --- a/src/JSONDeser.hs +++ b/src/JSONDeser.hs @@ -66,7 +66,7 @@ cellConvVM :: Cell -> DT.Cell cellConvVM (Cell x y) = (x,y) unitConvVM :: Unit -> DT.Unit -unitConvVM unit = DT.Unit setcell (cellConvVM (pivot unit)) +unitConvVM unit = DT.Unit (cellConvVM (pivot unit)) setcell where setcell = Set.fromList (map cellConvVM (members unit)) diff --git a/src/Main0.hs b/src/Main0.hs index 8a60b66..fa005ff 100644 --- a/src/Main0.hs +++ b/src/Main0.hs @@ -9,6 +9,7 @@ import Datatypes import Opt import JSONDeser import Strategy0 +import VM (Command, cmdToString) data JSONSer = JSONSer { problemId :: Int, seed :: Int, diff --git a/vm/ReadString.hs b/src/ReadString.hs similarity index 100% rename from vm/ReadString.hs rename to src/ReadString.hs