From 973a039b54327df74396605410ea9abe19c8a4e7 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 4 Sep 2016 21:21:11 +0200 Subject: Upgrade to elm 0.17.1 --- src/Update/UpdateEdition.elm | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 src/Update/UpdateEdition.elm (limited to 'src/Update/UpdateEdition.elm') 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 -- cgit v1.2.3