From 8396329652f7eccd7200cf3dbb57e9f6c326c3bd Mon Sep 17 00:00:00 2001 From: "restyled-io[bot]" <32688539+restyled-io[bot]@users.noreply.github.com> Date: Sat, 28 Sep 2024 11:32:30 -0500 Subject: [PATCH] Restyled by fourmolu (#2157) Co-authored-by: Restyled.io --- src/swarm-doc/Swarm/Doc/Gen.hs | 2 +- src/swarm-doc/Swarm/Doc/Wiki/Cheatsheet.hs | 2 +- src/swarm-engine/Swarm/Game/Achievement/Persistence.hs | 2 +- src/swarm-engine/Swarm/Game/State.hs | 2 +- src/swarm-engine/Swarm/Game/Step/Const.hs | 2 +- src/swarm-scenario/Swarm/Game/Entity.hs | 2 +- src/swarm-scenario/Swarm/Game/Land.hs | 2 +- src/swarm-scenario/Swarm/Game/Recipe.hs | 2 +- src/swarm-scenario/Swarm/Game/Scenario.hs | 2 +- src/swarm-scenario/Swarm/Game/Terrain.hs | 2 +- src/swarm-scenario/Swarm/Game/World/Render.hs | 2 +- src/swarm-tournament/Swarm/Web/Tournament/Validate.hs | 2 +- src/swarm-tui/Swarm/TUI/Model/UI.hs | 2 +- test/bench/Benchmark.hs | 2 +- test/integration/Main.hs | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/swarm-doc/Swarm/Doc/Gen.hs b/src/swarm-doc/Swarm/Doc/Gen.hs index 51048571c..e4362b2c9 100644 --- a/src/swarm-doc/Swarm/Doc/Gen.hs +++ b/src/swarm-doc/Swarm/Doc/Gen.hs @@ -44,9 +44,9 @@ import Swarm.Doc.Keyword import Swarm.Doc.Pedagogy import Swarm.Doc.Util import Swarm.Doc.Wiki.Cheatsheet +import Swarm.Failure (simpleErrorHandle) import Swarm.Game.Entity (Entity, EntityMap (entitiesByName), entityName, entityYields) import Swarm.Game.Entity qualified as E -import Swarm.Failure (simpleErrorHandle) import Swarm.Game.Land import Swarm.Game.Recipe (Recipe, recipeCatalysts, recipeInputs, recipeOutputs) import Swarm.Game.Robot (Robot, equippedDevices, robotInventory) diff --git a/src/swarm-doc/Swarm/Doc/Wiki/Cheatsheet.hs b/src/swarm-doc/Swarm/Doc/Wiki/Cheatsheet.hs index ff07b1f7b..68265bd54 100644 --- a/src/swarm-doc/Swarm/Doc/Wiki/Cheatsheet.hs +++ b/src/swarm-doc/Swarm/Doc/Wiki/Cheatsheet.hs @@ -28,11 +28,11 @@ import Swarm.Doc.Schema.Render import Swarm.Doc.Util import Swarm.Doc.Wiki.Matrix import Swarm.Doc.Wiki.Util +import Swarm.Failure (simpleErrorHandle) import Swarm.Game.Device qualified as D import Swarm.Game.Display (displayChar) import Swarm.Game.Entity (Entity, EntityMap (entitiesByName), entityDisplay, entityName, loadEntities) import Swarm.Game.Entity qualified as E -import Swarm.Failure (simpleErrorHandle) import Swarm.Game.Recipe (Recipe, loadRecipes, recipeCatalysts, recipeInputs, recipeOutputs, recipeTime, recipeWeight) import Swarm.Game.Terrain (loadTerrain, terrainByName) import Swarm.Language.Capability (Capability) diff --git a/src/swarm-engine/Swarm/Game/Achievement/Persistence.hs b/src/swarm-engine/Swarm/Game/Achievement/Persistence.hs index ee9af57e2..c54317f00 100644 --- a/src/swarm-engine/Swarm/Game/Achievement/Persistence.hs +++ b/src/swarm-engine/Swarm/Game/Achievement/Persistence.hs @@ -13,9 +13,9 @@ import Control.Effect.Lift import Control.Monad (forM_) import Data.Sequence (Seq) import Data.Yaml qualified as Y +import Swarm.Failure import Swarm.Game.Achievement.Attainment import Swarm.Game.Achievement.Definitions -import Swarm.Failure import Swarm.Game.ResourceLoading (getSwarmAchievementsPath) import Swarm.Util.Effect (forMW) import System.Directory (doesDirectoryExist, doesFileExist, listDirectory) diff --git a/src/swarm-engine/Swarm/Game/State.hs b/src/swarm-engine/Swarm/Game/State.hs index c33be8ce0..d02dcf40e 100644 --- a/src/swarm-engine/Swarm/Game/State.hs +++ b/src/swarm-engine/Swarm/Game/State.hs @@ -98,9 +98,9 @@ import Data.Text.Lazy qualified as TL import Data.Text.Lazy.Encoding qualified as TL import Data.Tuple (swap) import GHC.Generics (Generic) +import Swarm.Failure (SystemFailure (..)) import Swarm.Game.CESK (Store, emptyStore, store, suspendedEnv) import Swarm.Game.Entity -import Swarm.Failure (SystemFailure (..)) import Swarm.Game.Land import Swarm.Game.Location import Swarm.Game.Robot diff --git a/src/swarm-engine/Swarm/Game/Step/Const.hs b/src/swarm-engine/Swarm/Game/Step/Const.hs index 059ae9cb2..39f309fcb 100644 --- a/src/swarm-engine/Swarm/Game/Step/Const.hs +++ b/src/swarm-engine/Swarm/Game/Step/Const.hs @@ -45,13 +45,13 @@ import Data.Text qualified as T import Data.Tuple (swap) import Linear (V2 (..), perp, zero) import Swarm.Effect as Effect (Time, getNow) +import Swarm.Failure import Swarm.Game.Achievement.Definitions import Swarm.Game.CESK import Swarm.Game.Display import Swarm.Game.Entity hiding (empty, lookup, singleton, union) import Swarm.Game.Entity qualified as E import Swarm.Game.Exception -import Swarm.Failure import Swarm.Game.Land import Swarm.Game.Location import Swarm.Game.Recipe diff --git a/src/swarm-scenario/Swarm/Game/Entity.hs b/src/swarm-scenario/Swarm/Game/Entity.hs index 7cf2f31c2..b7a263a7b 100644 --- a/src/swarm-scenario/Swarm/Game/Entity.hs +++ b/src/swarm-scenario/Swarm/Game/Entity.hs @@ -119,11 +119,11 @@ import Data.Text (Text) import Data.Text qualified as T import Data.Yaml import GHC.Generics (Generic) +import Swarm.Failure import Swarm.Game.Device import Swarm.Game.Display import Swarm.Game.Entity.Cosmetic (WorldAttr (..)) import Swarm.Game.Entity.Cosmetic.Assignment (worldAttributes) -import Swarm.Failure import Swarm.Game.Ingredients import Swarm.Game.Location import Swarm.Game.ResourceLoading (getDataFileNameSafe) diff --git a/src/swarm-scenario/Swarm/Game/Land.hs b/src/swarm-scenario/Swarm/Game/Land.hs index cc247b3a5..445073889 100644 --- a/src/swarm-scenario/Swarm/Game/Land.hs +++ b/src/swarm-scenario/Swarm/Game/Land.hs @@ -16,8 +16,8 @@ import Control.Effect.Lift (Lift) import Control.Effect.Throw (Throw) import Control.Lens (makeLenses) import GHC.Generics (Generic) -import Swarm.Game.Entity import Swarm.Failure (SystemFailure) +import Swarm.Game.Entity import Swarm.Game.Terrain data TerrainEntityMaps = TerrainEntityMaps diff --git a/src/swarm-scenario/Swarm/Game/Recipe.hs b/src/swarm-scenario/Swarm/Game/Recipe.hs index 0c82f442f..0798d40b9 100644 --- a/src/swarm-scenario/Swarm/Game/Recipe.hs +++ b/src/swarm-scenario/Swarm/Game/Recipe.hs @@ -67,8 +67,8 @@ import Data.Text (Text) import Data.Text qualified as T import Data.Yaml import GHC.Generics (Generic) -import Swarm.Game.Entity as E import Swarm.Failure +import Swarm.Game.Entity as E import Swarm.Game.Ingredients import Swarm.Game.ResourceLoading (getDataFileNameSafe) import Swarm.Util.Effect (withThrow) diff --git a/src/swarm-scenario/Swarm/Game/Scenario.hs b/src/swarm-scenario/Swarm/Game/Scenario.hs index 1b2c22a52..b612fb155 100644 --- a/src/swarm-scenario/Swarm/Game/Scenario.hs +++ b/src/swarm-scenario/Swarm/Game/Scenario.hs @@ -73,10 +73,10 @@ import Data.Set qualified as Set import Data.Text (Text) import Data.Text qualified as T import GHC.Generics (Generic) +import Swarm.Failure import Swarm.Game.Entity import Swarm.Game.Entity.Cosmetic import Swarm.Game.Entity.Cosmetic.Assignment (worldAttributes) -import Swarm.Failure import Swarm.Game.Land import Swarm.Game.Location (Location) import Swarm.Game.Recipe diff --git a/src/swarm-scenario/Swarm/Game/Terrain.hs b/src/swarm-scenario/Swarm/Game/Terrain.hs index d2dab3f56..0ca5284b3 100644 --- a/src/swarm-scenario/Swarm/Game/Terrain.hs +++ b/src/swarm-scenario/Swarm/Game/Terrain.hs @@ -35,9 +35,9 @@ import Data.Text qualified as T import Data.Tuple (swap) import Data.Yaml import GHC.Generics (Generic) +import Swarm.Failure import Swarm.Game.Display import Swarm.Game.Entity.Cosmetic (WorldAttr (..)) -import Swarm.Failure import Swarm.Game.ResourceLoading (getDataFileNameSafe) import Swarm.Util (enumeratedMap, quote) import Swarm.Util.Effect (withThrow) diff --git a/src/swarm-scenario/Swarm/Game/World/Render.hs b/src/swarm-scenario/Swarm/Game/World/Render.hs index cae295608..aaeecb9c2 100644 --- a/src/swarm-scenario/Swarm/Game/World/Render.hs +++ b/src/swarm-scenario/Swarm/Game/World/Render.hs @@ -24,9 +24,9 @@ import Data.Maybe (fromMaybe) import Data.Tuple.Extra (both) import GHC.Generics (Generic) import Linear (V2 (..)) +import Swarm.Failure (SystemFailure, simpleErrorHandle) import Swarm.Game.Display (defaultChar) import Swarm.Game.Entity.Cosmetic -import Swarm.Failure (SystemFailure, simpleErrorHandle) import Swarm.Game.Land import Swarm.Game.Location import Swarm.Game.Scenario diff --git a/src/swarm-tournament/Swarm/Web/Tournament/Validate.hs b/src/swarm-tournament/Swarm/Web/Tournament/Validate.hs index 8ffea0e4d..7cbc02dd0 100644 --- a/src/swarm-tournament/Swarm/Web/Tournament/Validate.hs +++ b/src/swarm-tournament/Swarm/Web/Tournament/Validate.hs @@ -22,8 +22,8 @@ import Data.Text qualified as T import Data.Text.Encoding (decodeUtf8') import Data.Yaml (decodeEither', parseEither) import Servant.Multipart -import Swarm.Game.CESK (continue) import Swarm.Failure (SystemFailure) +import Swarm.Game.CESK (continue) import Swarm.Game.Robot.Concrete (machine) import Swarm.Game.Scenario import Swarm.Game.Scenario.Scoring.CodeSize (codeMetricsFromSyntax) diff --git a/src/swarm-tui/Swarm/TUI/Model/UI.hs b/src/swarm-tui/Swarm/TUI/Model/UI.hs index ceab9e8d8..9a1a07345 100644 --- a/src/swarm-tui/Swarm/TUI/Model/UI.hs +++ b/src/swarm-tui/Swarm/TUI/Model/UI.hs @@ -36,10 +36,10 @@ import Data.Map qualified as M import Data.Sequence (Seq) import Data.Set (Set) import Data.Text qualified as T +import Swarm.Failure (SystemFailure) import Swarm.Game.Achievement.Attainment import Swarm.Game.Achievement.Definitions import Swarm.Game.Achievement.Persistence -import Swarm.Failure (SystemFailure) import Swarm.Game.ResourceLoading (getSwarmHistoryPath) import Swarm.TUI.Editor.Model import Swarm.TUI.Inventory.Sorting diff --git a/test/bench/Benchmark.hs b/test/bench/Benchmark.hs index 6f7dabdd4..b9bdf943a 100644 --- a/test/bench/Benchmark.hs +++ b/test/bench/Benchmark.hs @@ -14,9 +14,9 @@ import Data.Sequence (Seq) import Data.Text qualified as T import Data.Tuple.Extra (dupe) import Swarm.Effect (runTimeIO) +import Swarm.Failure (SystemFailure, simpleErrorHandle) import Swarm.Game.CESK (initMachine) import Swarm.Game.Display (defaultRobotDisplay) -import Swarm.Failure (SystemFailure, simpleErrorHandle) import Swarm.Game.Location import Swarm.Game.Robot (TRobot, mkRobot) import Swarm.Game.Robot.Walk (emptyExceptions) diff --git a/test/integration/Main.hs b/test/integration/Main.hs index de2aac568..714e53eb9 100644 --- a/test/integration/Main.hs +++ b/test/integration/Main.hs @@ -28,10 +28,10 @@ import Data.Text.IO qualified as T import Data.Yaml (ParseException, prettyPrintParseException) import Swarm.Doc.Keyword (EditorType (..)) import Swarm.Doc.Keyword qualified as Keyword +import Swarm.Failure (SystemFailure) import Swarm.Game.Achievement.Definitions (GameplayAchievement (..)) import Swarm.Game.CESK (initMachine) import Swarm.Game.Entity (lookupByName) -import Swarm.Failure (SystemFailure) import Swarm.Game.Robot (equippedDevices, systemRobot) import Swarm.Game.Robot.Activity (commandsHistogram, lifetimeStepCount, tangibleCommandCount) import Swarm.Game.Robot.Concrete (activityCounts, machine, robotLog, waitingUntil)