This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Model | |
[<RequireQualifiedAccess>] | |
type EventSet = | |
| Small | |
| Large | |
type Model = | |
{ EventSet: EventSet | |
PlaybackDelay : int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module View | |
open Feliz | |
open System | |
open Model | |
open Messages | |
let view (state : Model) dispatch = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module App | |
open Elmish | |
open Elmish.React | |
open Update | |
open View | |
Program.mkProgram init update view | |
|> Program.withReactSynchronous "elmish-app" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module App | |
open Elmish | |
open Elmish.React | |
#if DEBUG | |
open Elmish.Debug | |
open Elmish.HMR | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Index | |
open Elmish | |
open Fable.SimpleHttp | |
type Model = { | |
Filename: string | |
Events : string | |
Error : string } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module App | |
open Elmish | |
open Elmish.React | |
Program.mkProgram Index.init Index.update Index.view | |
|> Program.withReactSynchronous "elmish-app" | |
|> Program.run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module View | |
open System | |
open Model | |
open Messages | |
open Fable.React | |
open Fable.React.Props | |
let view (state : Model) dispatch = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Update | |
open System | |
open Elmish | |
open Fable.SimpleHttp | |
open Model | |
open Messages | |
let tryParseWith (tryParseFunc: string -> bool * _) = tryParseFunc >> function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Model | |
type Model = | |
{ Filename: string | |
PlaybackDelay : int | |
IsPlaying : bool | |
Events : string array | |
EventIndex : int | |
Error : string } | |
static member Empty = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Messages | |
type Msg = | |
| FilenameChanged of string | |
| PlaybackDelayChanged of string | |
| StartPlayback | |
| PausePlayback | |
| StopPlayback | |
| NextEvent | |
| EventsLoaded of string |