diff options
author | Joris | 2016-09-04 21:21:11 +0200 |
---|---|---|
committer | Joris | 2016-09-04 21:21:31 +0200 |
commit | 973a039b54327df74396605410ea9abe19c8a4e7 (patch) | |
tree | c702564d17e0a490d56845027238eb4f231be785 /src/Update/UpdateEdition.elm | |
parent | 62fee9133f36f655c1ed83e0c2e85394f9948bf5 (diff) |
Upgrade to elm 0.17.1
Diffstat (limited to 'src/Update/UpdateEdition.elm')
-rw-r--r-- | src/Update/UpdateEdition.elm | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/Update/UpdateEdition.elm b/src/Update/UpdateEdition.elm deleted file mode 100644 index 47b0e22..0000000 --- a/src/Update/UpdateEdition.elm +++ /dev/null @@ -1,33 +0,0 @@ -module Update.UpdateEdition - ( updateEdition - , EditionAction(..) - ) where - -import Char -import Char exposing (KeyCode) - -import Model.Edition.Edition exposing (..) - -import Utils.List exposing (..) - -type EditionAction = - DeleteLast - | AddChar KeyCode - -updateEdition : EditionAction -> Edition -> Edition -updateEdition action edition = - case action of - DeleteLast -> - case maybeTail edition.chars of - Just tailChars -> - { edition | chars <- tailChars } - Nothing -> - edition - AddChar keyCode -> - case keyCodeToChar edition.kind keyCode of - Just char -> - if keyCode == 32 && maybeHead edition.chars == Just (Char.fromCode 32) - then edition - else { edition | chars <- char :: edition.chars } - Nothing -> - edition |