diff --git a/src/Swarm/TUI/Editor/Util.hs b/src/Swarm/TUI/Editor/Util.hs index 478402491..3e2ada770 100644 --- a/src/Swarm/TUI/Editor/Util.hs +++ b/src/Swarm/TUI/Editor/Util.hs @@ -18,6 +18,7 @@ import Swarm.Game.Terrain (TerrainType) import Swarm.Game.Universe import Swarm.Game.World qualified as W import Swarm.TUI.Editor.Model +import Swarm.Util.Content import Swarm.Util.Erasable getEntitiesForList :: EntityMap -> V.Vector EntityFacade @@ -35,12 +36,6 @@ getEditingBounds myWorld = a = EA.getAreaDimensions $ area myWorld lowerRightLoc = EA.upperLeftToBottomRight a upperLeftLoc -getContentAt :: W.MultiWorld Int e -> Cosmic W.Coords -> (TerrainType, Maybe e) -getContentAt w coords = (underlyingCellTerrain, underlyingCellEntity) - where - underlyingCellEntity = W.lookupCosmicEntity coords w - underlyingCellTerrain = W.lookupCosmicTerrain coords w - getEditorContentAt :: WorldOverdraw -> W.MultiWorld Int Entity -> @@ -112,23 +107,3 @@ getEditedMapRectangle worldEditor (Just (Cosmic subworldName coords)) w = getMapRectangle toFacade getContent coords where getContent = getEditorContentAt worldEditor w . Cosmic subworldName - -getMapRectangle :: - (d -> e) -> - (W.Coords -> (TerrainType, Maybe d)) -> - W.BoundsRectangle -> - EA.Grid (PCell e) -getMapRectangle paintTransform contentFunc coords = - EA.Grid $ map renderRow [yTop .. yBottom] - where - (W.Coords (yTop, xLeft), W.Coords (yBottom, xRight)) = coords - - drawCell f rowIndex colIndex = - Cell - terrain - (f <$> maybeToErasable erasableEntity) - [] - where - (terrain, erasableEntity) = contentFunc $ W.Coords (rowIndex, colIndex) - - renderRow rowIndex = map (drawCell paintTransform rowIndex) [xLeft .. xRight] diff --git a/src/Swarm/TUI/View/CellDisplay.hs b/src/Swarm/TUI/View/CellDisplay.hs index 488771287..11ea8e951 100644 --- a/src/Swarm/TUI/View/CellDisplay.hs +++ b/src/Swarm/TUI/View/CellDisplay.hs @@ -7,7 +7,6 @@ module Swarm.TUI.View.CellDisplay where import Brick -import Control.Applicative ((<|>)) import Control.Lens (to, view, (&), (.~), (^.)) import Data.ByteString (ByteString) import Data.Hash.Murmur @@ -18,13 +17,12 @@ import Data.Semigroup (sconcat) import Data.Set (Set) import Data.Set qualified as S import Data.Tagged (unTagged) -import Data.Text qualified as T import Data.Word (Word32) import Graphics.Vty qualified as V import Linear.Affine ((.-.)) import Swarm.Game.CESK (TickNumber (..)) import Swarm.Game.Display ( - Attribute (AEntity, AWorld), + Attribute (AEntity), Display, defaultEntityDisplay, displayAttr, @@ -33,10 +31,7 @@ import Swarm.Game.Display ( hidden, ) import Swarm.Game.Entity -import Swarm.Game.Entity.Cosmetic -import Swarm.Game.Entity.Cosmetic.Assignment (terrainAttributes) import Swarm.Game.Robot -import Swarm.Game.Scenario.Topography.Cell (PCell (..)) import Swarm.Game.Scenario.Topography.EntityFacade import Swarm.Game.Scenario.Topography.Structure.Recognition (foundStructures) import Swarm.Game.Scenario.Topography.Structure.Recognition.Registry (foundByLocation) @@ -53,7 +48,6 @@ import Swarm.TUI.Model.Name import Swarm.TUI.Model.UI import Swarm.TUI.View.Attribute.Attr import Swarm.Util (applyWhen) -import Swarm.Util.Erasable (erasableToMaybe) import Witch (from) import Witch.Encoding qualified as Encoding @@ -61,18 +55,6 @@ import Witch.Encoding qualified as Encoding renderDisplay :: Display -> Widget n renderDisplay disp = withAttr (disp ^. displayAttr . to toAttrName) $ str [displayChar disp] -getTerrainEntityColor :: - M.Map WorldAttr PreservableColor -> - PCell EntityFacade -> - Maybe PreservableColor -getTerrainEntityColor aMap (Cell terr cellEnt _) = - (entityColor =<< erasableToMaybe cellEnt) <|> terrainFallback - where - terrainFallback = M.lookup (TerrainAttr $ T.unpack $ getTerrainWord terr) terrainAttributes - entityColor (EntityFacade _ d) = case d ^. displayAttr of - AWorld n -> M.lookup (WorldAttr $ T.unpack n) aMap - _ -> Nothing - -- | Render the 'Display' for a specific location. drawLoc :: UIState -> GameState -> Cosmic W.Coords -> Widget Name drawLoc ui g cCoords@(Cosmic _ coords) = diff --git a/src/Swarm/Constant.hs b/src/swarm-engine/Swarm/Constant.hs similarity index 100% rename from src/Swarm/Constant.hs rename to src/swarm-engine/Swarm/Constant.hs diff --git a/src/Swarm/Effect.hs b/src/swarm-engine/Swarm/Effect.hs similarity index 100% rename from src/Swarm/Effect.hs rename to src/swarm-engine/Swarm/Effect.hs diff --git a/src/Swarm/Effect/Time.hs b/src/swarm-engine/Swarm/Effect/Time.hs similarity index 100% rename from src/Swarm/Effect/Time.hs rename to src/swarm-engine/Swarm/Effect/Time.hs diff --git a/src/Swarm/Game/Achievement/Attainment.hs b/src/swarm-engine/Swarm/Game/Achievement/Attainment.hs similarity index 100% rename from src/Swarm/Game/Achievement/Attainment.hs rename to src/swarm-engine/Swarm/Game/Achievement/Attainment.hs diff --git a/src/Swarm/Game/Achievement/Definitions.hs b/src/swarm-engine/Swarm/Game/Achievement/Definitions.hs similarity index 100% rename from src/Swarm/Game/Achievement/Definitions.hs rename to src/swarm-engine/Swarm/Game/Achievement/Definitions.hs diff --git a/src/Swarm/Game/Achievement/Description.hs b/src/swarm-engine/Swarm/Game/Achievement/Description.hs similarity index 100% rename from src/Swarm/Game/Achievement/Description.hs rename to src/swarm-engine/Swarm/Game/Achievement/Description.hs diff --git a/src/Swarm/Game/Achievement/Persistence.hs b/src/swarm-engine/Swarm/Game/Achievement/Persistence.hs similarity index 100% rename from src/Swarm/Game/Achievement/Persistence.hs rename to src/swarm-engine/Swarm/Game/Achievement/Persistence.hs diff --git a/src/Swarm/Game/CESK.hs b/src/swarm-engine/Swarm/Game/CESK.hs similarity index 100% rename from src/Swarm/Game/CESK.hs rename to src/swarm-engine/Swarm/Game/CESK.hs diff --git a/src/Swarm/Game/Display.hs b/src/swarm-engine/Swarm/Game/Display.hs similarity index 100% rename from src/Swarm/Game/Display.hs rename to src/swarm-engine/Swarm/Game/Display.hs diff --git a/src/Swarm/Game/Entity.hs b/src/swarm-engine/Swarm/Game/Entity.hs similarity index 100% rename from src/Swarm/Game/Entity.hs rename to src/swarm-engine/Swarm/Game/Entity.hs diff --git a/src/Swarm/Game/Entity/Cosmetic.hs b/src/swarm-engine/Swarm/Game/Entity/Cosmetic.hs similarity index 100% rename from src/Swarm/Game/Entity/Cosmetic.hs rename to src/swarm-engine/Swarm/Game/Entity/Cosmetic.hs diff --git a/src/Swarm/Game/Entity/Cosmetic/Assignment.hs b/src/swarm-engine/Swarm/Game/Entity/Cosmetic/Assignment.hs similarity index 100% rename from src/Swarm/Game/Entity/Cosmetic/Assignment.hs rename to src/swarm-engine/Swarm/Game/Entity/Cosmetic/Assignment.hs diff --git a/src/Swarm/Game/Exception.hs b/src/swarm-engine/Swarm/Game/Exception.hs similarity index 100% rename from src/Swarm/Game/Exception.hs rename to src/swarm-engine/Swarm/Game/Exception.hs diff --git a/src/Swarm/Game/Failure.hs b/src/swarm-engine/Swarm/Game/Failure.hs similarity index 100% rename from src/Swarm/Game/Failure.hs rename to src/swarm-engine/Swarm/Game/Failure.hs diff --git a/src/Swarm/Game/Location.hs b/src/swarm-engine/Swarm/Game/Location.hs similarity index 100% rename from src/Swarm/Game/Location.hs rename to src/swarm-engine/Swarm/Game/Location.hs diff --git a/src/Swarm/Game/Recipe.hs b/src/swarm-engine/Swarm/Game/Recipe.hs similarity index 100% rename from src/Swarm/Game/Recipe.hs rename to src/swarm-engine/Swarm/Game/Recipe.hs diff --git a/src/Swarm/Game/ResourceLoading.hs b/src/swarm-engine/Swarm/Game/ResourceLoading.hs similarity index 100% rename from src/Swarm/Game/ResourceLoading.hs rename to src/swarm-engine/Swarm/Game/ResourceLoading.hs diff --git a/src/Swarm/Game/Robot.hs b/src/swarm-engine/Swarm/Game/Robot.hs similarity index 100% rename from src/Swarm/Game/Robot.hs rename to src/swarm-engine/Swarm/Game/Robot.hs diff --git a/src/Swarm/Game/Scenario.hs b/src/swarm-engine/Swarm/Game/Scenario.hs similarity index 100% rename from src/Swarm/Game/Scenario.hs rename to src/swarm-engine/Swarm/Game/Scenario.hs diff --git a/src/Swarm/Game/Scenario/Objective.hs b/src/swarm-engine/Swarm/Game/Scenario/Objective.hs similarity index 100% rename from src/Swarm/Game/Scenario/Objective.hs rename to src/swarm-engine/Swarm/Game/Scenario/Objective.hs diff --git a/src/Swarm/Game/Scenario/Objective/Graph.hs b/src/swarm-engine/Swarm/Game/Scenario/Objective/Graph.hs similarity index 100% rename from src/Swarm/Game/Scenario/Objective/Graph.hs rename to src/swarm-engine/Swarm/Game/Scenario/Objective/Graph.hs diff --git a/src/Swarm/Game/Scenario/Objective/Logic.hs b/src/swarm-engine/Swarm/Game/Scenario/Objective/Logic.hs similarity index 100% rename from src/Swarm/Game/Scenario/Objective/Logic.hs rename to src/swarm-engine/Swarm/Game/Scenario/Objective/Logic.hs diff --git a/src/Swarm/Game/Scenario/Objective/Validation.hs b/src/swarm-engine/Swarm/Game/Scenario/Objective/Validation.hs similarity index 100% rename from src/Swarm/Game/Scenario/Objective/Validation.hs rename to src/swarm-engine/Swarm/Game/Scenario/Objective/Validation.hs diff --git a/src/Swarm/Game/Scenario/Objective/WinCheck.hs b/src/swarm-engine/Swarm/Game/Scenario/Objective/WinCheck.hs similarity index 100% rename from src/Swarm/Game/Scenario/Objective/WinCheck.hs rename to src/swarm-engine/Swarm/Game/Scenario/Objective/WinCheck.hs diff --git a/src/Swarm/Game/Scenario/RobotLookup.hs b/src/swarm-engine/Swarm/Game/Scenario/RobotLookup.hs similarity index 100% rename from src/Swarm/Game/Scenario/RobotLookup.hs rename to src/swarm-engine/Swarm/Game/Scenario/RobotLookup.hs diff --git a/src/Swarm/Game/Scenario/Scoring/Best.hs b/src/swarm-engine/Swarm/Game/Scenario/Scoring/Best.hs similarity index 100% rename from src/Swarm/Game/Scenario/Scoring/Best.hs rename to src/swarm-engine/Swarm/Game/Scenario/Scoring/Best.hs diff --git a/src/Swarm/Game/Scenario/Scoring/CodeSize.hs b/src/swarm-engine/Swarm/Game/Scenario/Scoring/CodeSize.hs similarity index 100% rename from src/Swarm/Game/Scenario/Scoring/CodeSize.hs rename to src/swarm-engine/Swarm/Game/Scenario/Scoring/CodeSize.hs diff --git a/src/Swarm/Game/Scenario/Scoring/ConcreteMetrics.hs b/src/swarm-engine/Swarm/Game/Scenario/Scoring/ConcreteMetrics.hs similarity index 100% rename from src/Swarm/Game/Scenario/Scoring/ConcreteMetrics.hs rename to src/swarm-engine/Swarm/Game/Scenario/Scoring/ConcreteMetrics.hs diff --git a/src/Swarm/Game/Scenario/Scoring/GenericMetrics.hs b/src/swarm-engine/Swarm/Game/Scenario/Scoring/GenericMetrics.hs similarity index 100% rename from src/Swarm/Game/Scenario/Scoring/GenericMetrics.hs rename to src/swarm-engine/Swarm/Game/Scenario/Scoring/GenericMetrics.hs diff --git a/src/Swarm/Game/Scenario/Status.hs b/src/swarm-engine/Swarm/Game/Scenario/Status.hs similarity index 100% rename from src/Swarm/Game/Scenario/Status.hs rename to src/swarm-engine/Swarm/Game/Scenario/Status.hs diff --git a/src/Swarm/Game/Scenario/Style.hs b/src/swarm-engine/Swarm/Game/Scenario/Style.hs similarity index 100% rename from src/Swarm/Game/Scenario/Style.hs rename to src/swarm-engine/Swarm/Game/Scenario/Style.hs diff --git a/src/Swarm/Game/Scenario/Topography/Area.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/Area.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/Area.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/Area.hs diff --git a/src/Swarm/Game/Scenario/Topography/Cell.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/Cell.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/Cell.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/Cell.hs diff --git a/src/Swarm/Game/Scenario/Topography/Center.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/Center.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/Center.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/Center.hs diff --git a/src/Swarm/Game/Scenario/Topography/EntityFacade.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/EntityFacade.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/EntityFacade.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/EntityFacade.hs diff --git a/src/Swarm/Game/Scenario/Topography/Navigation/Portal.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/Navigation/Portal.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/Navigation/Portal.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/Navigation/Portal.hs diff --git a/src/Swarm/Game/Scenario/Topography/Navigation/Util.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/Navigation/Util.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/Navigation/Util.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/Navigation/Util.hs diff --git a/src/Swarm/Game/Scenario/Topography/Navigation/Waypoint.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/Navigation/Waypoint.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/Navigation/Waypoint.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/Navigation/Waypoint.hs diff --git a/src/Swarm/Game/Scenario/Topography/Placement.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/Placement.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/Placement.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/Placement.hs diff --git a/src/Swarm/Game/Scenario/Topography/Structure.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/Structure.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/Structure.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/Structure.hs diff --git a/src/Swarm/Game/Scenario/Topography/Structure/Recognition.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/Structure/Recognition.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/Structure/Recognition.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/Structure/Recognition.hs diff --git a/src/Swarm/Game/Scenario/Topography/Structure/Recognition/Log.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/Structure/Recognition/Log.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/Structure/Recognition/Log.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/Structure/Recognition/Log.hs diff --git a/src/Swarm/Game/Scenario/Topography/Structure/Recognition/Precompute.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/Structure/Recognition/Precompute.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/Structure/Recognition/Precompute.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/Structure/Recognition/Precompute.hs diff --git a/src/Swarm/Game/Scenario/Topography/Structure/Recognition/Registry.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/Structure/Recognition/Registry.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/Structure/Recognition/Registry.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/Structure/Recognition/Registry.hs diff --git a/src/Swarm/Game/Scenario/Topography/Structure/Recognition/Symmetry.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/Structure/Recognition/Symmetry.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/Structure/Recognition/Symmetry.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/Structure/Recognition/Symmetry.hs diff --git a/src/Swarm/Game/Scenario/Topography/Structure/Recognition/Tracking.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/Structure/Recognition/Tracking.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/Structure/Recognition/Tracking.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/Structure/Recognition/Tracking.hs diff --git a/src/Swarm/Game/Scenario/Topography/Structure/Recognition/Type.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/Structure/Recognition/Type.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/Structure/Recognition/Type.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/Structure/Recognition/Type.hs diff --git a/src/Swarm/Game/Scenario/Topography/WorldDescription.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/WorldDescription.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/WorldDescription.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/WorldDescription.hs diff --git a/src/Swarm/Game/Scenario/Topography/WorldPalette.hs b/src/swarm-engine/Swarm/Game/Scenario/Topography/WorldPalette.hs similarity index 100% rename from src/Swarm/Game/Scenario/Topography/WorldPalette.hs rename to src/swarm-engine/Swarm/Game/Scenario/Topography/WorldPalette.hs diff --git a/src/Swarm/Game/ScenarioInfo.hs b/src/swarm-engine/Swarm/Game/ScenarioInfo.hs similarity index 100% rename from src/Swarm/Game/ScenarioInfo.hs rename to src/swarm-engine/Swarm/Game/ScenarioInfo.hs diff --git a/src/Swarm/Game/State.hs b/src/swarm-engine/Swarm/Game/State.hs similarity index 100% rename from src/Swarm/Game/State.hs rename to src/swarm-engine/Swarm/Game/State.hs diff --git a/src/Swarm/Game/State/Config.hs b/src/swarm-engine/Swarm/Game/State/Config.hs similarity index 100% rename from src/Swarm/Game/State/Config.hs rename to src/swarm-engine/Swarm/Game/State/Config.hs diff --git a/src/Swarm/Game/State/Robot.hs b/src/swarm-engine/Swarm/Game/State/Robot.hs similarity index 100% rename from src/Swarm/Game/State/Robot.hs rename to src/swarm-engine/Swarm/Game/State/Robot.hs diff --git a/src/Swarm/Game/State/Substate.hs b/src/swarm-engine/Swarm/Game/State/Substate.hs similarity index 100% rename from src/Swarm/Game/State/Substate.hs rename to src/swarm-engine/Swarm/Game/State/Substate.hs diff --git a/src/Swarm/Game/Step.hs b/src/swarm-engine/Swarm/Game/Step.hs similarity index 100% rename from src/Swarm/Game/Step.hs rename to src/swarm-engine/Swarm/Game/Step.hs diff --git a/src/Swarm/Game/Step/Arithmetic.hs b/src/swarm-engine/Swarm/Game/Step/Arithmetic.hs similarity index 100% rename from src/Swarm/Game/Step/Arithmetic.hs rename to src/swarm-engine/Swarm/Game/Step/Arithmetic.hs diff --git a/src/Swarm/Game/Step/Combustion.hs b/src/swarm-engine/Swarm/Game/Step/Combustion.hs similarity index 100% rename from src/Swarm/Game/Step/Combustion.hs rename to src/swarm-engine/Swarm/Game/Step/Combustion.hs diff --git a/src/Swarm/Game/Step/Const.hs b/src/swarm-engine/Swarm/Game/Step/Const.hs similarity index 100% rename from src/Swarm/Game/Step/Const.hs rename to src/swarm-engine/Swarm/Game/Step/Const.hs diff --git a/src/Swarm/Game/Step/Path/Cache.hs b/src/swarm-engine/Swarm/Game/Step/Path/Cache.hs similarity index 100% rename from src/Swarm/Game/Step/Path/Cache.hs rename to src/swarm-engine/Swarm/Game/Step/Path/Cache.hs diff --git a/src/Swarm/Game/Step/Path/Cache/DistanceLimit.hs b/src/swarm-engine/Swarm/Game/Step/Path/Cache/DistanceLimit.hs similarity index 100% rename from src/Swarm/Game/Step/Path/Cache/DistanceLimit.hs rename to src/swarm-engine/Swarm/Game/Step/Path/Cache/DistanceLimit.hs diff --git a/src/Swarm/Game/Step/Path/Finding.hs b/src/swarm-engine/Swarm/Game/Step/Path/Finding.hs similarity index 100% rename from src/Swarm/Game/Step/Path/Finding.hs rename to src/swarm-engine/Swarm/Game/Step/Path/Finding.hs diff --git a/src/Swarm/Game/Step/Path/Type.hs b/src/swarm-engine/Swarm/Game/Step/Path/Type.hs similarity index 100% rename from src/Swarm/Game/Step/Path/Type.hs rename to src/swarm-engine/Swarm/Game/Step/Path/Type.hs diff --git a/src/Swarm/Game/Step/Path/Walkability.hs b/src/swarm-engine/Swarm/Game/Step/Path/Walkability.hs similarity index 100% rename from src/Swarm/Game/Step/Path/Walkability.hs rename to src/swarm-engine/Swarm/Game/Step/Path/Walkability.hs diff --git a/src/Swarm/Game/Step/RobotStepState.hs b/src/swarm-engine/Swarm/Game/Step/RobotStepState.hs similarity index 100% rename from src/Swarm/Game/Step/RobotStepState.hs rename to src/swarm-engine/Swarm/Game/Step/RobotStepState.hs diff --git a/src/Swarm/Game/Step/Util.hs b/src/swarm-engine/Swarm/Game/Step/Util.hs similarity index 100% rename from src/Swarm/Game/Step/Util.hs rename to src/swarm-engine/Swarm/Game/Step/Util.hs diff --git a/src/Swarm/Game/Step/Util/Command.hs b/src/swarm-engine/Swarm/Game/Step/Util/Command.hs similarity index 100% rename from src/Swarm/Game/Step/Util/Command.hs rename to src/swarm-engine/Swarm/Game/Step/Util/Command.hs diff --git a/src/Swarm/Game/Step/Util/Inspect.hs b/src/swarm-engine/Swarm/Game/Step/Util/Inspect.hs similarity index 100% rename from src/Swarm/Game/Step/Util/Inspect.hs rename to src/swarm-engine/Swarm/Game/Step/Util/Inspect.hs diff --git a/src/Swarm/Game/Terrain.hs b/src/swarm-engine/Swarm/Game/Terrain.hs similarity index 100% rename from src/Swarm/Game/Terrain.hs rename to src/swarm-engine/Swarm/Game/Terrain.hs diff --git a/src/Swarm/Game/Universe.hs b/src/swarm-engine/Swarm/Game/Universe.hs similarity index 100% rename from src/Swarm/Game/Universe.hs rename to src/swarm-engine/Swarm/Game/Universe.hs diff --git a/src/Swarm/Game/Value.hs b/src/swarm-engine/Swarm/Game/Value.hs similarity index 100% rename from src/Swarm/Game/Value.hs rename to src/swarm-engine/Swarm/Game/Value.hs diff --git a/src/Swarm/Game/World.hs b/src/swarm-engine/Swarm/Game/World.hs similarity index 100% rename from src/Swarm/Game/World.hs rename to src/swarm-engine/Swarm/Game/World.hs diff --git a/src/Swarm/Game/World/Abstract.hs b/src/swarm-engine/Swarm/Game/World/Abstract.hs similarity index 100% rename from src/Swarm/Game/World/Abstract.hs rename to src/swarm-engine/Swarm/Game/World/Abstract.hs diff --git a/src/Swarm/Game/World/Compile.hs b/src/swarm-engine/Swarm/Game/World/Compile.hs similarity index 100% rename from src/Swarm/Game/World/Compile.hs rename to src/swarm-engine/Swarm/Game/World/Compile.hs diff --git a/src/Swarm/Game/World/Coords.hs b/src/swarm-engine/Swarm/Game/World/Coords.hs similarity index 100% rename from src/Swarm/Game/World/Coords.hs rename to src/swarm-engine/Swarm/Game/World/Coords.hs diff --git a/src/Swarm/Game/World/Eval.hs b/src/swarm-engine/Swarm/Game/World/Eval.hs similarity index 100% rename from src/Swarm/Game/World/Eval.hs rename to src/swarm-engine/Swarm/Game/World/Eval.hs diff --git a/src/Swarm/Game/World/Gen.hs b/src/swarm-engine/Swarm/Game/World/Gen.hs similarity index 100% rename from src/Swarm/Game/World/Gen.hs rename to src/swarm-engine/Swarm/Game/World/Gen.hs diff --git a/src/Swarm/Game/World/Interpret.hs b/src/swarm-engine/Swarm/Game/World/Interpret.hs similarity index 100% rename from src/Swarm/Game/World/Interpret.hs rename to src/swarm-engine/Swarm/Game/World/Interpret.hs diff --git a/src/Swarm/Game/World/Load.hs b/src/swarm-engine/Swarm/Game/World/Load.hs similarity index 100% rename from src/Swarm/Game/World/Load.hs rename to src/swarm-engine/Swarm/Game/World/Load.hs diff --git a/src/Swarm/Game/World/Modify.hs b/src/swarm-engine/Swarm/Game/World/Modify.hs similarity index 100% rename from src/Swarm/Game/World/Modify.hs rename to src/swarm-engine/Swarm/Game/World/Modify.hs diff --git a/src/Swarm/Game/World/Parse.hs b/src/swarm-engine/Swarm/Game/World/Parse.hs similarity index 100% rename from src/Swarm/Game/World/Parse.hs rename to src/swarm-engine/Swarm/Game/World/Parse.hs diff --git a/src/Swarm/Game/World/Render.hs b/src/swarm-engine/Swarm/Game/World/Render.hs similarity index 98% rename from src/Swarm/Game/World/Render.hs rename to src/swarm-engine/Swarm/Game/World/Render.hs index 07c3019d6..35a33c7f3 100644 --- a/src/Swarm/Game/World/Render.hs +++ b/src/swarm-engine/Swarm/Game/World/Render.hs @@ -29,9 +29,8 @@ import Swarm.Game.State import Swarm.Game.State.Substate import Swarm.Game.Universe import Swarm.Game.World qualified as W -import Swarm.TUI.Editor.Util (getContentAt, getMapRectangle) -import Swarm.TUI.View.CellDisplay (getTerrainEntityColor) import Swarm.Util (surfaceEmpty) +import Swarm.Util.Content import Swarm.Util.Effect (simpleErrorHandle) import Swarm.Util.Erasable (erasableToMaybe) diff --git a/src/Swarm/Game/World/Syntax.hs b/src/swarm-engine/Swarm/Game/World/Syntax.hs similarity index 100% rename from src/Swarm/Game/World/Syntax.hs rename to src/swarm-engine/Swarm/Game/World/Syntax.hs diff --git a/src/Swarm/Game/World/Typecheck.hs b/src/swarm-engine/Swarm/Game/World/Typecheck.hs similarity index 100% rename from src/Swarm/Game/World/Typecheck.hs rename to src/swarm-engine/Swarm/Game/World/Typecheck.hs diff --git a/src/Swarm/Log.hs b/src/swarm-engine/Swarm/Log.hs similarity index 100% rename from src/Swarm/Log.hs rename to src/swarm-engine/Swarm/Log.hs diff --git a/src/swarm-engine/Swarm/Util/Content.hs b/src/swarm-engine/Swarm/Util/Content.hs new file mode 100644 index 000000000..edd5c1c2e --- /dev/null +++ b/src/swarm-engine/Swarm/Util/Content.hs @@ -0,0 +1,64 @@ +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Utilities for accessing content of the world, +-- by single cells or in bulk for rendering. +module Swarm.Util.Content where + +import Control.Applicative ((<|>)) +import Control.Lens ((^.)) +import Data.Map qualified as M +import Data.Text qualified as T +import Swarm.Game.Display +import Swarm.Game.Entity.Cosmetic +import Swarm.Game.Entity.Cosmetic.Assignment (terrainAttributes) +import Swarm.Game.Scenario.Topography.Area qualified as EA +import Swarm.Game.Scenario.Topography.Cell (PCell (..)) +import Swarm.Game.Scenario.Topography.EntityFacade +import Swarm.Game.Terrain (TerrainType, getTerrainWord) +import Swarm.Game.Universe +import Swarm.Game.World +import Swarm.Util.Erasable (erasableToMaybe, maybeToErasable) + +-- | Get the terrain and entity at a single cell +getContentAt :: MultiWorld Int e -> Cosmic Coords -> (TerrainType, Maybe e) +getContentAt w coords = (underlyingCellTerrain, underlyingCellEntity) + where + underlyingCellEntity = lookupCosmicEntity coords w + underlyingCellTerrain = lookupCosmicTerrain coords w + +-- * Rendering + +-- | Get a rectangle of cells for rendering +getMapRectangle :: + (d -> e) -> + (Coords -> (TerrainType, Maybe d)) -> + BoundsRectangle -> + EA.Grid (PCell e) +getMapRectangle paintTransform contentFunc coords = + EA.Grid $ map renderRow [yTop .. yBottom] + where + (Coords (yTop, xLeft), Coords (yBottom, xRight)) = coords + + drawCell f rowIndex colIndex = + Cell + terrain + (f <$> maybeToErasable erasableEntity) + [] + where + (terrain, erasableEntity) = contentFunc $ Coords (rowIndex, colIndex) + + renderRow rowIndex = map (drawCell paintTransform rowIndex) [xLeft .. xRight] + +-- | Get the color used to render a single cell +getTerrainEntityColor :: + M.Map WorldAttr PreservableColor -> + PCell EntityFacade -> + Maybe PreservableColor +getTerrainEntityColor aMap (Cell terr cellEnt _) = + (entityColor =<< erasableToMaybe cellEnt) <|> terrainFallback + where + terrainFallback = M.lookup (TerrainAttr $ T.unpack $ getTerrainWord terr) terrainAttributes + entityColor (EntityFacade _ d) = case d ^. displayAttr of + AWorld n -> M.lookup (WorldAttr $ T.unpack n) aMap + _ -> Nothing diff --git a/src/Swarm/Util/Effect.hs b/src/swarm-engine/Swarm/Util/Effect.hs similarity index 100% rename from src/Swarm/Util/Effect.hs rename to src/swarm-engine/Swarm/Util/Effect.hs diff --git a/src/swarm-web/Swarm/Web/Worldview.hs b/src/swarm-web/Swarm/Web/Worldview.hs index f69c0bb4e..7ebe14f24 100644 --- a/src/swarm-web/Swarm/Web/Worldview.hs +++ b/src/swarm-web/Swarm/Web/Worldview.hs @@ -19,7 +19,7 @@ import Swarm.Game.State (GameState, robotInfo) import Swarm.Game.State.Robot (viewCenter) import Swarm.Game.Universe (planar) import Swarm.Game.World.Render -import Swarm.TUI.View.CellDisplay (getTerrainEntityColor) +import Swarm.Util.Content (getTerrainEntityColor) import Swarm.Util.OccurrenceEncoder data GridResponse = GridResponse diff --git a/swarm.cabal b/swarm.cabal index af82863c0..166206f12 100644 --- a/swarm.cabal +++ b/swarm.cabal @@ -14,7 +14,7 @@ description: Swarm is a 2D programming and resource gathering == Module organization For developers getting oriented, Swarm's modules are organized into - roughly the following layers, from inner to outer: + sublibraries, from inner to outer: * utilities * swarm language @@ -146,7 +146,6 @@ library swarm-lang vty, witch, yaml, - build-depends: swarm:swarm-util hs-source-dirs: src/swarm-lang default-language: Haskell2010 @@ -155,94 +154,12 @@ library swarm-lang -- See discussion in #415 StrictData -library swarm-web +library swarm-engine import: stan-config, common, ghc2021-extensions visibility: public - exposed-modules: Swarm.Web - Swarm.Web.Worldview - other-modules: Paths_swarm - autogen-modules: Paths_swarm - build-depends: aeson, - base, - brick, - bytestring, - commonmark, - colour, - containers, - lens, - http-types, - nonempty-containers, - palette, - servant-docs, - servant-server >= 0.19 && < 0.21, - text, - witch, - wai >= 3.2 && < 3.3, - wai-app-static >= 3.1.8 && < 3.1.9, - warp, - build-depends: swarm:swarm-util, - swarm:swarm-lang, - swarm, - hs-source-dirs: src/swarm-web - default-language: Haskell2010 - default-extensions: - -- Avoid unexpected unevaluated thunk buildup - -- See discussion in #415 - StrictData - -library swarm-util - import: stan-config, common, ghc2021-extensions - visibility: public - exposed-modules: Control.Carrier.Accum.FixedStrict - Data.BoolExpr.Simplify - Swarm.Util - Swarm.Util.Erasable - Swarm.Util.Lens - Swarm.Util.OccurrenceEncoder - Swarm.Util.Parse - Swarm.Util.ReadableIORef - Swarm.Util.RingBuffer - Swarm.Util.UnitInterval - Swarm.Util.WindowedCounter - Swarm.Util.Yaml - other-modules: Paths_swarm - autogen-modules: Paths_swarm - build-depends: base >= 4.14 && < 4.19, - aeson >= 2 && < 2.2, - boolexpr >= 0.2 && < 0.3, - clock >= 0.8.2 && < 0.9, - containers >= 0.6.2 && < 0.7, - directory >= 1.3 && < 1.4, - either >= 5.0 && < 5.1, - filepath >= 1.4 && < 1.5, - fused-effects >= 1.1.1.1 && < 1.2, - lens >= 4.19 && < 5.3, - megaparsec >= 9.6.1 && < 9.7, - minimorph >= 0.3 && < 0.4, - mtl >= 2.2.2 && < 2.4, - servant-docs >= 0.12 && < 0.14, - template-haskell >= 2.16 && < 2.21, - text >= 1.2.4 && < 2.1, - transformers >= 0.5 && < 0.7, - vector >= 0.12 && < 0.14, - witch >= 1.1.1.0 && < 1.3, - yaml >= 0.11 && < 0.11.12.0, - hs-source-dirs: src/swarm-util - default-language: Haskell2010 - default-extensions: - -- Avoid unexpected unevaluated thunk buildup - -- See discussion in #415 - StrictData - -library - import: stan-config, common, ghc2021-extensions exposed-modules: Swarm.Constant - Swarm.Doc.Keyword - Swarm.Doc.Pedagogy - Swarm.Doc.Util Swarm.Effect Swarm.Effect.Time - Swarm.Log Swarm.Game.Failure Swarm.Game.Achievement.Attainment Swarm.Game.Achievement.Definitions @@ -323,6 +240,149 @@ library Swarm.Game.World.Render Swarm.Game.World.Syntax Swarm.Game.World.Typecheck + Swarm.Log + Swarm.Util.Effect + Swarm.Util.Content + + other-modules: Paths_swarm + autogen-modules: Paths_swarm + + build-depends: base >= 4.14 && < 4.19, + AhoCorasick >= 0.0.4 && < 0.0.5, + aeson >= 2 && < 2.2, + array >= 0.5.4 && < 0.6, + astar >= 0.3 && < 0.3.1, + boolexpr >= 0.2 && < 0.3, + bytestring >= 0.10 && < 0.12, + clock >= 0.8.2 && < 0.9, + colour >= 2.3.6 && < 2.4, + containers >= 0.6.2 && < 0.7, + directory >= 1.3 && < 1.4, + either >= 5.0 && < 5.1, + extra >= 1.7 && < 1.8, + filepath >= 1.4 && < 1.5, + fused-effects >= 1.1.1.1 && < 1.2, + fused-effects-lens >= 1.2.0.1 && < 1.3, + hashable >= 1.3.4 && < 1.5, + hsnoise >= 0.0.3 && < 0.1, + JuicyPixels >= 3.3 && < 3.4, + lens >= 4.19 && < 5.3, + linear >= 1.21.6 && < 1.23, + megaparsec >= 9.6.1 && < 9.7, + transformers >= 0.5 && < 0.7, + mtl >= 2.2.2 && < 2.4, + murmur3 >= 1.0.4 && < 1.1, + nonempty-containers >= 0.3.4 && < 0.3.5, + palette >= 0.3 && < 0.4, + parser-combinators >= 1.2 && < 1.4, + prettyprinter >= 1.7.0 && < 1.8, + random >= 1.2.0 && < 1.3, + servant-docs >= 0.12 && < 0.14, + SHA >= 1.6.4 && < 1.6.5, + simple-enumeration >= 0.2 && < 0.3, + tagged >= 0.8 && < 0.9, + text >= 1.2.4 && < 2.1, + time >= 1.9 && < 1.14, + transformers >= 0.5.6.2 && < 0.6.2.0, + unordered-containers >= 0.2.14 && < 0.3, + vector >= 0.12 && < 0.14, + vty >= 6.0 && < 6.1, + witch >= 1.1.1.0 && < 1.3, + witherable >= 0.4 && < 0.5, + yaml >= 0.11 && < 0.11.12.0, + build-depends: swarm:swarm-util, + swarm:swarm-lang, + hs-source-dirs: src/swarm-engine + default-language: Haskell2010 + default-extensions: + -- Avoid unexpected unevaluated thunk buildup + -- See discussion in #415 + StrictData + +library swarm-web + import: stan-config, common, ghc2021-extensions + visibility: public + exposed-modules: Swarm.Web + Swarm.Web.Worldview + other-modules: Paths_swarm + autogen-modules: Paths_swarm + build-depends: aeson, + base, + brick, + bytestring, + commonmark, + colour, + containers, + lens, + http-types, + nonempty-containers, + palette, + servant-docs, + servant-server >= 0.19 && < 0.21, + text, + witch, + wai >= 3.2 && < 3.3, + wai-app-static >= 3.1.8 && < 3.1.9, + warp, + build-depends: swarm:swarm-util, + swarm:swarm-lang, + swarm, + hs-source-dirs: src/swarm-web + default-language: Haskell2010 + default-extensions: + -- Avoid unexpected unevaluated thunk buildup + -- See discussion in #415 + StrictData + +library swarm-util + import: stan-config, common, ghc2021-extensions + visibility: public + exposed-modules: Control.Carrier.Accum.FixedStrict + Data.BoolExpr.Simplify + Swarm.Util + Swarm.Util.Erasable + Swarm.Util.Lens + Swarm.Util.OccurrenceEncoder + Swarm.Util.Parse + Swarm.Util.ReadableIORef + Swarm.Util.RingBuffer + Swarm.Util.UnitInterval + Swarm.Util.WindowedCounter + Swarm.Util.Yaml + other-modules: Paths_swarm + autogen-modules: Paths_swarm + build-depends: base >= 4.14 && < 4.19, + aeson >= 2 && < 2.2, + boolexpr >= 0.2 && < 0.3, + clock >= 0.8.2 && < 0.9, + containers >= 0.6.2 && < 0.7, + directory >= 1.3 && < 1.4, + either >= 5.0 && < 5.1, + filepath >= 1.4 && < 1.5, + fused-effects >= 1.1.1.1 && < 1.2, + lens >= 4.19 && < 5.3, + megaparsec >= 9.6.1 && < 9.7, + minimorph >= 0.3 && < 0.4, + mtl >= 2.2.2 && < 2.4, + servant-docs >= 0.12 && < 0.14, + template-haskell >= 2.16 && < 2.21, + text >= 1.2.4 && < 2.1, + transformers >= 0.5 && < 0.7, + vector >= 0.12 && < 0.14, + witch >= 1.1.1.0 && < 1.3, + yaml >= 0.11 && < 0.11.12.0, + hs-source-dirs: src/swarm-util + default-language: Haskell2010 + default-extensions: + -- Avoid unexpected unevaluated thunk buildup + -- See discussion in #415 + StrictData + +library + import: stan-config, common, ghc2021-extensions + exposed-modules: Swarm.Doc.Keyword + Swarm.Doc.Pedagogy + Swarm.Doc.Util Swarm.TUI.Border Swarm.TUI.Editor.Controller Swarm.TUI.Editor.Json @@ -358,11 +418,93 @@ library Swarm.TUI.View.Objective Swarm.TUI.View.Structure Swarm.TUI.View.Util - Swarm.Util.Effect Swarm.Version reexported-modules: Control.Carrier.Accum.FixedStrict , Data.BoolExpr.Simplify + , Swarm.Constant + , Swarm.Effect + , Swarm.Effect.Time + , Swarm.Game.Failure + , Swarm.Game.Achievement.Attainment + , Swarm.Game.Achievement.Definitions + , Swarm.Game.Achievement.Description + , Swarm.Game.Achievement.Persistence + , Swarm.Game.CESK + , Swarm.Game.Display + , Swarm.Game.Entity + , Swarm.Game.Entity.Cosmetic + , Swarm.Game.Entity.Cosmetic.Assignment + , Swarm.Game.Exception + , Swarm.Game.Location + , Swarm.Game.Recipe + , Swarm.Game.ResourceLoading + , Swarm.Game.Robot + , Swarm.Game.Scenario + , Swarm.Game.Universe + , Swarm.Game.Scenario.Objective + , Swarm.Game.Scenario.Objective.Graph + , Swarm.Game.Scenario.Objective.Logic + , Swarm.Game.Scenario.Objective.Validation + , Swarm.Game.Scenario.Objective.WinCheck + , Swarm.Game.Scenario.RobotLookup + , Swarm.Game.Scenario.Scoring.Best + , Swarm.Game.Scenario.Scoring.CodeSize + , Swarm.Game.Scenario.Scoring.ConcreteMetrics + , Swarm.Game.Scenario.Scoring.GenericMetrics + , Swarm.Game.Scenario.Status + , Swarm.Game.Scenario.Style + , Swarm.Game.Scenario.Topography.Area + , Swarm.Game.Scenario.Topography.Cell + , Swarm.Game.Scenario.Topography.Center + , Swarm.Game.Scenario.Topography.EntityFacade + , Swarm.Game.Scenario.Topography.Navigation.Portal + , Swarm.Game.Scenario.Topography.Navigation.Util + , Swarm.Game.Scenario.Topography.Navigation.Waypoint + , Swarm.Game.Scenario.Topography.Placement + , Swarm.Game.Scenario.Topography.Structure + , Swarm.Game.Scenario.Topography.Structure.Recognition + , Swarm.Game.Scenario.Topography.Structure.Recognition.Log + , Swarm.Game.Scenario.Topography.Structure.Recognition.Precompute + , Swarm.Game.Scenario.Topography.Structure.Recognition.Registry + , Swarm.Game.Scenario.Topography.Structure.Recognition.Symmetry + , Swarm.Game.Scenario.Topography.Structure.Recognition.Tracking + , Swarm.Game.Scenario.Topography.Structure.Recognition.Type + , Swarm.Game.Scenario.Topography.WorldDescription + , Swarm.Game.Scenario.Topography.WorldPalette + , Swarm.Game.ScenarioInfo + , Swarm.Game.State + , Swarm.Game.State.Config + , Swarm.Game.State.Robot + , Swarm.Game.State.Substate + , Swarm.Game.Step + , Swarm.Game.Step.Arithmetic + , Swarm.Game.Step.Combustion + , Swarm.Game.Step.Const + , Swarm.Game.Step.Path.Cache + , Swarm.Game.Step.Path.Cache.DistanceLimit + , Swarm.Game.Step.Path.Finding + , Swarm.Game.Step.Path.Type + , Swarm.Game.Step.Path.Walkability + , Swarm.Game.Step.RobotStepState + , Swarm.Game.Step.Util + , Swarm.Game.Step.Util.Command + , Swarm.Game.Step.Util.Inspect + , Swarm.Game.Terrain + , Swarm.Game.Value + , Swarm.Game.World + , Swarm.Game.World.Abstract + , Swarm.Game.World.Compile + , Swarm.Game.World.Coords + , Swarm.Game.World.Eval + , Swarm.Game.World.Gen + , Swarm.Game.World.Interpret + , Swarm.Game.World.Load + , Swarm.Game.World.Modify + , Swarm.Game.World.Parse + , Swarm.Game.World.Render + , Swarm.Game.World.Syntax + , Swarm.Game.World.Typecheck , Swarm.Language.Context , Swarm.Language.Direction , Swarm.Language.Elaborate @@ -384,7 +526,10 @@ library , Swarm.Language.Typed , Swarm.Language.Types , Swarm.Language.Value + , Swarm.Log , Swarm.Util + , Swarm.Util.Content + , Swarm.Util.Effect , Swarm.Util.Erasable , Swarm.Util.Lens , Swarm.Util.OccurrenceEncoder @@ -400,61 +545,45 @@ library build-depends: base >= 4.14 && < 4.19, brick-list-skip >= 0.1.1.2 && < 0.2, - AhoCorasick >= 0.0.4 && < 0.0.5, aeson >= 2 && < 2.2, array >= 0.5.4 && < 0.6, - astar >= 0.3 && < 0.3.1, - boolexpr >= 0.2 && < 0.3, brick >= 2.1.1 && < 2.2, bytestring >= 0.10 && < 0.12, clock >= 0.8.2 && < 0.9, colour >= 2.3.6 && < 2.4, containers >= 0.6.2 && < 0.7, - directory >= 1.3 && < 1.4, - either >= 5.0 && < 5.1, extra >= 1.7 && < 1.8, filepath >= 1.4 && < 1.5, fused-effects >= 1.1.1.1 && < 1.2, - fused-effects-lens >= 1.2.0.1 && < 1.3, fuzzy >= 0.1 && < 0.2, githash >= 0.1.6 && < 0.2, - hashable >= 1.3.4 && < 1.5, - hsnoise >= 0.0.3 && < 0.1, http-client >= 0.7 && < 0.8, http-client-tls >= 0.3 && < 0.4, http-types >= 0.12 && < 0.13, - JuicyPixels >= 3.3 && < 3.4, lens >= 4.19 && < 5.3, linear >= 1.21.6 && < 1.23, - megaparsec >= 9.6.1 && < 9.7, transformers >= 0.5 && < 0.7, mtl >= 2.2.2 && < 2.4, murmur3 >= 1.0.4 && < 1.1, natural-sort >= 0.1.2 && < 0.2, nonempty-containers >= 0.3.4 && < 0.3.5, palette >= 0.3 && < 0.4, - parser-combinators >= 1.2 && < 1.4, - prettyprinter >= 1.7.0 && < 1.8, - random >= 1.2.0 && < 1.3, servant-docs >= 0.12 && < 0.14, - SHA >= 1.6.4 && < 1.6.5, - simple-enumeration >= 0.2 && < 0.3, split >= 0.2.3 && < 0.3, tagged >= 0.8 && < 0.9, text >= 1.2.4 && < 2.1, text-zipper >= 0.10 && < 0.14, time >= 1.9 && < 1.14, transformers >= 0.5.6.2 && < 0.6.2.0, - unordered-containers >= 0.2.14 && < 0.3, vector >= 0.12 && < 0.14, vty >= 6.0 && < 6.1, warp >= 3.2 && < 3.4, witch >= 1.1.1.0 && < 1.3, - witherable >= 0.4 && < 0.5, word-wrap >= 0.5 && < 0.6, yaml >= 0.11 && < 0.11.12.0, build-depends: swarm:swarm-util, swarm:swarm-lang, + swarm:swarm-engine, hs-source-dirs: src default-language: Haskell2010 default-extensions: