roc/examples/python-interop/platform/main.roc
shua d90da3af52
rm TotallyNotJson
TotallyNotJson.roc now lives on the farm in virtual-dom-wip as Json.roc.
Any reference in stdlib or builtins has been removed, as well as the
last places it was used (in python/ruby-interop examples).
2024-07-01 20:37:23 +02:00

16 lines
376 B
Text

platform "python-interop"
requires {} { main : U64 -> Str }
exposes []
packages {}
imports []
provides [mainForHost]
mainForHost : List U8 -> List U8
mainForHost = \input ->
when Str.fromUtf8 input is
Ok arg ->
when Str.toU64 arg is
Ok num -> main num |> Str.toUtf8
Err _ -> []
Err _ -> []