implemented editGoalieNumberPrompt

This commit is contained in:
Jonathan Lamothe 2019-11-12 23:58:17 -05:00
parent 75abf0ade8
commit 0202ddadab
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,34 @@
{- |
mtlstats
Copyright (C) 2019 Rhéal Lamothe
<rheal.lamothe@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-}
module Mtlstats.Actions.EditGoalie
( setGoalieNumber
) where
import Mtlstats.Types
-- | Sets a goalie's number
setGoalieNumber
:: Int
-- ^ New goalie number
-> ProgState
-> ProgState
setGoalieNumber = undefined

View File

@ -27,6 +27,7 @@ module Mtlstats.Prompt.EditGoalie
import Control.Monad.Trans.State (modify) import Control.Monad.Trans.State (modify)
import Lens.Micro ((.~)) import Lens.Micro ((.~))
import Mtlstats.Actions.EditGoalie
import Mtlstats.Prompt import Mtlstats.Prompt
import Mtlstats.Types import Mtlstats.Types
@ -37,4 +38,5 @@ goalieToEditPrompt = selectGoaliePrompt "Goalie to edit: " $
-- | Prompt to edit a goalie's number -- | Prompt to edit a goalie's number
editGoalieNumberPrompt :: Prompt editGoalieNumberPrompt :: Prompt
editGoalieNumberPrompt = undefined editGoalieNumberPrompt = numPrompt "Goalie number: " $
modify . setGoalieNumber