Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split swarm libraries #1069

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Data.Either (partitionEithers)
import Data.Yaml qualified as Y
import Swarm.Game.Achievement.Attainment
import Swarm.Game.Achievement.Definitions
import Swarm.TUI.Model.Failure
import Swarm.Game.Util.Failure
import Swarm.Util
import System.Directory (
doesDirectoryExist,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# LANGUAGE OverloadedStrings #-}

-- |
-- Module : Swarm.Game.Failure
-- Module : Swarm.Game.Util.Failure
-- Copyright : Ondřej Šebek
-- Maintainer : ondras98@icloud.com
--
Expand All @@ -11,7 +11,7 @@
--
-- These failures are often not fatal and serve
-- to create common infrastructure for logging.
module Swarm.TUI.Model.Failure where
module Swarm.Game.Util.Failure where
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kostmo FYI I had to move the module back to the Game just to compile, but the change in #1116 is better (no Util directory and less code in the Util module itself) so I will rebase once merged. 👍

It seems that I am also susceptible to making silly Util modules when desperate. 😅

Splitting the libraries with Cabal has been a great learning experience for me, so I hope not to repeat my mistake from #982 where I put this module in TUI in the first place. 🤦


import Data.Char (toLower)
import Data.Text (Text)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ import Swarm.Game.ScenarioInfo (
_SISingle,
)
import Swarm.Game.State
import Swarm.Game.Util.Failure (prettyFailure)
import Swarm.TUI.Attr (swarmAttrMap)
import Swarm.TUI.Inventory.Sorting
import Swarm.TUI.Model
import Swarm.TUI.Model.Failure (prettyFailure)
import Swarm.TUI.Model.Goal (emptyGoalDisplay)
import Swarm.TUI.Model.Repl
import Swarm.TUI.Model.UI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ import Swarm.Game.Achievement.Persistence
import Swarm.Game.ScenarioInfo (
ScenarioInfoPair,
)
import Swarm.Game.Util.Failure (SystemFailure)
import Swarm.Game.World qualified as W
import Swarm.TUI.Attr (swarmAttrMap)
import Swarm.TUI.Inventory.Sorting
import Swarm.TUI.Model.Failure (SystemFailure)
import Swarm.TUI.Model.Goal
import Swarm.TUI.Model.Menu
import Swarm.TUI.Model.Name
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
418 changes: 377 additions & 41 deletions swarm.cabal

Large diffs are not rendered by default.

File renamed without changes.