From 46a28b4ecd34c53be7687660a91b0de21a9f4711 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 14 Nov 2024 02:20:23 +0000 Subject: [PATCH] Restyled by fourmolu --- .../Scenario/Topography/Structure/Recognition/Precompute.hs | 4 ++-- .../Game/Scenario/Topography/Structure/Recognition/Type.hs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/swarm-topography/Swarm/Game/Scenario/Topography/Structure/Recognition/Precompute.hs b/src/swarm-topography/Swarm/Game/Scenario/Topography/Structure/Recognition/Precompute.hs index 6da1cf889..e4826fa2a 100644 --- a/src/swarm-topography/Swarm/Game/Scenario/Topography/Structure/Recognition/Precompute.hs +++ b/src/swarm-topography/Swarm/Game/Scenario/Topography/Structure/Recognition/Precompute.hs @@ -44,6 +44,7 @@ module Swarm.Game.Scenario.Topography.Structure.Recognition.Precompute ( import Control.Arrow ((&&&)) import Control.Monad.Trans.Class (lift) +import Control.Monad.Trans.Except (except, runExceptT) import Data.Hashable (Hashable) import Data.Map qualified as M import Data.Maybe (catMaybes, mapMaybe) @@ -66,7 +67,6 @@ import Swarm.Game.Universe (Cosmic (..), offsetBy) import Swarm.Game.World.Coords (coordsToLoc) import Swarm.Language.Syntax.Direction (AbsoluteDir) import Swarm.Util (histogram) -import Control.Monad.Trans.Except (runExceptT, except) -- | Interface that provides monadic access to -- querying entities at locations. @@ -154,7 +154,7 @@ ensureStructureIntact :: FoundStructure b a -> s (Maybe StructureIntactnessFailure) ensureStructureIntact entLoader (FoundStructure (StructureWithGrid _ _ (RowWidth w) grid) upperLeft) = do - result <- runExceptT $ mapM checkLoc $ zip [0::Int ..] allLocPairs + result <- runExceptT $ mapM checkLoc $ zip [0 :: Int ..] allLocPairs case result of Right _ -> return Nothing Left x -> return $ Just x diff --git a/src/swarm-topography/Swarm/Game/Scenario/Topography/Structure/Recognition/Type.hs b/src/swarm-topography/Swarm/Game/Scenario/Topography/Structure/Recognition/Type.hs index b9ec0a5e9..74b833e1c 100644 --- a/src/swarm-topography/Swarm/Game/Scenario/Topography/Structure/Recognition/Type.hs +++ b/src/swarm-topography/Swarm/Game/Scenario/Topography/Structure/Recognition/Type.hs @@ -274,8 +274,8 @@ data ChunkedRowMatch a e = ChunkedRowMatch } deriving (Functor, Generic, ToJSON) -data StructureIntactnessFailure = StructureIntactnessFailure { - failedOnIndex :: Int +data StructureIntactnessFailure = StructureIntactnessFailure + { failedOnIndex :: Int , totalSize :: Int } deriving (Generic, ToJSON)