blob: 9c6fc3b51019d9856c52e410593d982a9d5be220 (
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
|
module Init exposing
( Init
, decoder
)
import Time exposing (..)
import Json.Decode as Json exposing ((:=))
import Model.Translations exposing (..)
import Model.Conf exposing (..)
import Model.InitResult exposing (..)
import Model.Size exposing (..)
type alias Init =
{ time : Time
, translations : Translations
, conf : Conf
, result : InitResult
, windowSize : Size
}
decoder : Json.Decoder Init
decoder =
Json.object5 Init
("time" := Json.float)
("translations" := translationsDecoder)
("conf" := confDecoder)
("result" := initResultDecoder)
("windowSize" := sizeDecoder)
|