aboutsummaryrefslogtreecommitdiff
path: root/src/Update/UpdateTimerEdition.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/Update/UpdateTimerEdition.elm')
-rw-r--r--src/Update/UpdateTimerEdition.elm34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/Update/UpdateTimerEdition.elm b/src/Update/UpdateTimerEdition.elm
deleted file mode 100644
index e9493eb..0000000
--- a/src/Update/UpdateTimerEdition.elm
+++ /dev/null
@@ -1,34 +0,0 @@
-module Update.UpdateTimerEdition
- ( updateTimerEdition
- , TimerEditionAction(..)
- ) where
-
-import Char (..)
-
-import Model.TimerEdition (..)
-
-import Utils.List (..)
-
-type TimerEditionAction =
- DeleteLast
- | AddNumber KeyCode
-
-updateTimerEdition : TimerEditionAction -> TimerEdition -> TimerEdition
-updateTimerEdition action timerEdition =
- case action of
- DeleteLast ->
- case maybeTail timerEdition.numbers of
- Just tailNumbers ->
- { timerEdition | numbers <- tailNumbers }
- Nothing ->
- timerEdition
- AddNumber keyCode ->
- case keyCodeToNumberChar keyCode of
- Just char ->
- if isDigit char
- then
- { timerEdition | numbers <- char :: timerEdition.numbers }
- else
- timerEdition
- Nothing ->
- timerEdition