blob: 1d19723d70e704e88f37cc530cfc00f3d25784b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
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
|