COMPILER CRASH, where I was hoping for a message telling me which Result.Err tags I need for decoding

This commit is contained in:
Brian Carroll 2022-11-01 15:39:34 +00:00
parent 6ec7b870df
commit 9e92ad7f30
No known key found for this signature in database
GPG Key ID: 5C7B2EC4101703C0

View File

@ -412,8 +412,9 @@ ClientInit state : {
staticViews: Dict HtmlId (Html state),
}
initClientApp : initData, List Str, App state initData -> Result (ClientInit state) [ViewNotFound HtmlId]*
initClientApp = \initData, viewIdList, app ->
initClientApp : List U8, List Str, App state initData -> Result (ClientInit state) [ViewNotFound HtmlId]*
initClientApp = \json, viewIdList, app ->
initData <- json |> Decode.fromBytes Json.fromUtf8 |> Result.try
state = app.initDynamic initData
dynamicViews = app.renderDynamic state
unindexedViews = Dict.map dynamicViews translateStatic