mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-07 04:20:32 +00:00
12 lines
359 B
Text
12 lines
359 B
Text
platform "python-interop"
|
|
requires {} { main : arg -> ret | arg has Decoding, ret has Encoding }
|
|
exposes []
|
|
packages {}
|
|
imports [Json]
|
|
provides [mainForHost]
|
|
|
|
mainForHost : List U8 -> List U8
|
|
mainForHost = \json ->
|
|
when Decode.fromBytes json Json.fromUtf8 is
|
|
Ok arg -> Encode.toBytes (main arg) Json.toUtf8
|
|
Err _ -> []
|