11 import Json.Decode exposing (..)
12 import Time exposing (Time)
15 {-| Output a string to stdout
17 port writeLine : String -> Cmd msg
20 {-| Read a line from the stdin
22 port readLine : String -> Cmd msg
25 {-| Read the contents of a file
27 port readFile : String -> Cmd msg
30 {-| Received a response for a command.
32 port input : (Value -> msg) -> Sub msg
36 = LineRead (Maybe String)
49 decodeTag : String -> Decoder IO
53 field "line" (nullable string)
60 field "contents" string
64 field "message" string
69 "Trying to decode IO, but tag "
71 ++ " is not supported."