mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00

This will simplify parsing and make it possible to have a uniform lexer for the language. Previously unquoted package names were allowed to include '-'s, which aren't valid identifiers. In the future, we'll distinguish local paths from packages in the package-manager by looking for a ".roc" suffix, which should only be present in local paths.
22 lines
699 B
Text
22 lines
699 B
Text
platform "examples/cli"
|
|
requires {} { main : Str -> Task {} [] }# TODO FIXME
|
|
exposes []
|
|
packages {}
|
|
imports [ Task.{ Task } ]
|
|
provides [ mainForHost ]
|
|
effects fx.Effect
|
|
{
|
|
openFile : Str -> Effect U64,
|
|
closeFile : U64 -> Effect {},
|
|
withFileOpen : Str, (U64 -> Effect (Result ok err)) -> Effect {},
|
|
getFileLine : U64 -> Effect Str,
|
|
getFileBytes : U64 -> Effect (List U8),
|
|
putLine : Str -> Effect {},
|
|
putRaw : Str -> Effect {},
|
|
# Is there a limit to the number of effect, uncomment the next line and it crashes
|
|
# getLine : Effect Str,
|
|
getChar : Effect U8
|
|
}
|
|
|
|
mainForHost : Str -> Task {} [] as Fx
|
|
mainForHost = \file -> main file
|