{- - This file is part of `typers`. - - `typers` is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - `typers` 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 Affero Public License for more details. - - You should have received a copy of the GNU Affero Public License - along with `typers`. If not, see . -} module Base exposing (..) import Array exposing (Array) import Time exposing (Posix) type WordStatus = Correct | Wrong | Todo | CurrentWord type alias Word = { content : String , status : WordStatus } type alias Model = { begin : Maybe Posix , end : Maybe Posix , words : Array Word , accuracy : Maybe Float , config : Config , currentWord : Int , inputBox : String , inputCorrect : Bool } type alias Config = { punctuation : Bool , capitals : Bool , length : Int } type Msg = Started Time.Posix | Finished Time.Posix | CorrectInput | CorrectSoFar | NextWord | WrongInput | InputChanged String | LoadWords (List String) | WordLengthChanged Int | Redo