diff --git a/src/Mtlstats/Actions.hs b/src/Mtlstats/Actions.hs
index b7220fb..2e59846 100644
--- a/src/Mtlstats/Actions.hs
+++ b/src/Mtlstats/Actions.hs
@@ -40,12 +40,10 @@ module Mtlstats.Actions
) where
import Control.Monad.Trans.State (modify)
-import qualified Data.Map as M
import Data.Maybe (fromMaybe)
-import Lens.Micro (over, (^.), (&), (.~), (?~), (%~), (+~))
+import Lens.Micro ((^.), (&), (.~), (%~))
import Mtlstats.Types
-import Mtlstats.Util
-- | Starts a new season
startNewSeason :: ProgState -> ProgState
diff --git a/src/Mtlstats/Actions/NewGame/GoalieInput.hs b/src/Mtlstats/Actions/NewGame/GoalieInput.hs
index 4146e63..82132d0 100644
--- a/src/Mtlstats/Actions/NewGame/GoalieInput.hs
+++ b/src/Mtlstats/Actions/NewGame/GoalieInput.hs
@@ -25,6 +25,7 @@ module Mtlstats.Actions.NewGame.GoalieInput
, setGameGoalie
) where
+import Control.Monad (void)
import qualified Data.Map as M
import Data.Maybe (fromMaybe)
import Lens.Micro ((^.), (&), (.~), (%~), (+~))
@@ -42,10 +43,10 @@ finishGoalieEntry s = s & progMode.gameStateL.gameGoaliesRecorded
recordGoalieStats :: ProgState -> ProgState
recordGoalieStats s = fromMaybe s $ do
let gs = s^.progMode.gameStateL
- gid <- gs^.gameSelectedGoalie
- goalie <- nth gid $ s^.database.dbGoalies
- mins <- gs^.gameGoalieMinsPlayed
- goals <- gs^.gameGoalsAllowed
+ gid <- gs^.gameSelectedGoalie
+ mins <- gs^.gameGoalieMinsPlayed
+ goals <- gs^.gameGoalsAllowed
+ void $ nth gid $ s^.database.dbGoalies
let
gameStats = M.findWithDefault newGoalieStats gid $ gs^.gameGoalieStats
diff --git a/src/Mtlstats/Control.hs b/src/Mtlstats/Control.hs
index bcd4647..4e870ac 100644
--- a/src/Mtlstats/Control.hs
+++ b/src/Mtlstats/Control.hs
@@ -21,25 +21,20 @@ along with this program. If not, see .
module Mtlstats.Control (dispatch) where
-import Control.Monad (join, when)
-import Control.Monad.Extra (ifM)
+import Control.Monad (join)
import Control.Monad.Trans.State (gets, modify)
-import Data.Char (toUpper)
-import Data.Maybe (fromJust, fromMaybe, isJust)
-import Lens.Micro ((^.), (.~), (%~))
+import Data.Maybe (fromJust)
+import Lens.Micro ((^.))
import Lens.Micro.Extras (view)
import qualified UI.NCurses as C
import Mtlstats.Actions
import Mtlstats.Control.EditPlayer
import Mtlstats.Control.NewGame
-import Mtlstats.Format
import Mtlstats.Handlers
import Mtlstats.Menu
import Mtlstats.Prompt
-import Mtlstats.Report
import Mtlstats.Types
-import Mtlstats.Util
-- | Reads the program state and returs the apropriate controller to
-- run
diff --git a/src/Mtlstats/Prompt.hs b/src/Mtlstats/Prompt.hs
index 8db5cc1..13e68f1 100644
--- a/src/Mtlstats/Prompt.hs
+++ b/src/Mtlstats/Prompt.hs
@@ -46,15 +46,13 @@ import Control.Monad.Extra (whenJust)
import Control.Monad.Trans.State (gets, modify)
import Data.Char (isDigit, toUpper)
import Data.Foldable (forM_)
-import Data.Maybe (fromMaybe)
-import Lens.Micro ((^.), (&), (.~), (?~), (%~))
+import Lens.Micro ((^.), (&), (.~), (?~))
import Lens.Micro.Extras (view)
import Text.Read (readMaybe)
import qualified UI.NCurses as C
import Mtlstats.Actions
import Mtlstats.Config
-import Mtlstats.Format
import Mtlstats.Types
import Mtlstats.Util
diff --git a/src/Mtlstats/Prompt/NewGame/GoalieInput.hs b/src/Mtlstats/Prompt/NewGame/GoalieInput.hs
index 3559327..c0442b2 100644
--- a/src/Mtlstats/Prompt/NewGame/GoalieInput.hs
+++ b/src/Mtlstats/Prompt/NewGame/GoalieInput.hs
@@ -27,13 +27,10 @@ module Mtlstats.Prompt.NewGame.GoalieInput
, goalsAllowedPrompt
) where
-import Control.Monad (when)
-import Control.Monad.Trans.State (gets, modify)
-import Data.Maybe (fromMaybe)
-import Lens.Micro ((^.), (.~), (?~))
+import Control.Monad.Trans.State (modify)
+import Lens.Micro ((?~))
import Mtlstats.Actions.NewGame.GoalieInput
-import Mtlstats.Config
import Mtlstats.Prompt
import Mtlstats.Types
diff --git a/src/Mtlstats/Types/Menu.hs b/src/Mtlstats/Types/Menu.hs
index 8385070..e367b0d 100644
--- a/src/Mtlstats/Types/Menu.hs
+++ b/src/Mtlstats/Types/Menu.hs
@@ -38,7 +38,6 @@ module Mtlstats.Types.Menu (
import Lens.Micro ((^.))
import Lens.Micro.TH (makeLenses)
-import qualified UI.NCurses as C
import Mtlstats.Types
diff --git a/test/Actions/NewGameSpec.hs b/test/Actions/NewGameSpec.hs
index 60f0d95..3a06082 100644
--- a/test/Actions/NewGameSpec.hs
+++ b/test/Actions/NewGameSpec.hs
@@ -46,6 +46,7 @@ spec = describe "NewGame" $ do
assignPMinsSpec
GoalieInput.spec
+overtimeCheckSpec :: Spec
overtimeCheckSpec = describe "overtimeCheck" $ do
context "tie game" $ do
diff --git a/test/ActionsSpec.hs b/test/ActionsSpec.hs
index f61e2ae..19c4114 100644
--- a/test/ActionsSpec.hs
+++ b/test/ActionsSpec.hs
@@ -24,16 +24,12 @@ along with this program. If not, see .
module ActionsSpec (spec) where
import Control.Monad (replicateM)
-import qualified Data.Map as M
-import Data.Maybe (fromJust)
-import Lens.Micro ((^.), (&), (.~), (?~), (%~))
-import System.Random (randomRIO)
+import Lens.Micro ((^.), (&), (.~), (?~))
import Test.Hspec
( Spec
, context
, describe
, it
- , runIO
, shouldBe
, shouldNotBe
, shouldSatisfy
@@ -41,7 +37,6 @@ import Test.Hspec
import Mtlstats.Actions
import Mtlstats.Types
-import Mtlstats.Util
import qualified Actions.NewGameSpec as NewGame
import qualified TypesSpec as TS
diff --git a/test/ReportSpec.hs b/test/ReportSpec.hs
index e3b0bab..310817a 100644
--- a/test/ReportSpec.hs
+++ b/test/ReportSpec.hs
@@ -21,7 +21,7 @@ along with this program. If not, see .
module ReportSpec (spec) where
-import Lens.Micro ((&), (?~), (%~))
+import Lens.Micro ((&), (?~))
import Test.Hspec (Spec, context, describe, it, shouldBe)
import Mtlstats.Report
diff --git a/test/TypesSpec.hs b/test/TypesSpec.hs
index 857be5f..d791eef 100644
--- a/test/TypesSpec.hs
+++ b/test/TypesSpec.hs
@@ -33,7 +33,6 @@ module TypesSpec
import Control.Monad (replicateM)
import Data.Aeson (FromJSON, ToJSON, decode, encode, toJSON)
import Data.Aeson.Types (Value (Object))
-import Data.ByteString.Lazy (ByteString)
import qualified Data.HashMap.Strict as HM
import Lens.Micro (Lens', (&), (^.), (.~), (?~))
import System.Random (randomRIO)