mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-10 22:06:17 +00:00
13 lines
326 B
Text
13 lines
326 B
Text
interface Process
|
|
exposes [exit]
|
|
imports [Task.{ Task }, InternalTask, Effect]
|
|
|
|
## Exit the process with
|
|
##
|
|
## {} <- Stderr.line "Exiting right now!" |> Task.await
|
|
## Process.exit 1
|
|
exit : U8 -> Task {} *
|
|
exit = \code ->
|
|
Effect.processExit code
|
|
|> Effect.map \_ -> Ok {}
|
|
|> InternalTask.fromEffect
|