skog/src/Skog.gren
2026-05-26 16:03:24 -04:00

33 lines
929 B
Text

module Skog exposing (Program, program)
{-| Define a multi-platform Skog program.
The app provides shared `init`, `update`, and `subscriptions` along with
separate `mobileView` and `desktopView` functions. Bridges (SwiftUI,
Compose, DOM) consume the views; this stub just wires up a Platform.worker.
-}
import Desktop exposing (Desktop)
import Mobile exposing (Mobile)
import Platform
import UI
type alias Program model msg =
Platform.Program {} model msg
program :
{ init : { model : model, command : Cmd msg }
, update : msg -> model -> { model : model, command : Cmd msg }
, subscriptions : model -> Sub msg
, mobileView : model -> UI.Element Mobile msg
, desktopView : model -> UI.Element Desktop msg
}
-> Program model msg
program config =
Platform.worker
{ init = \_ -> config.init
, update = config.update
, subscriptions = config.subscriptions
}