Skip to content

Commit

Permalink
Add Do.allowFatal.
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonkearns committed Apr 19, 2024
1 parent f58dcc6 commit 9b9a634
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs.json

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/BackendTask/Do.elm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module BackendTask.Do exposing
( do
, allowFatal
, noop
, exec, command
, glob, log, env
Expand All @@ -25,6 +26,7 @@ apply continuation-style formatting to your Elm code:
You can see more discussion of continuation style in Elm in this Discourse post: <https://discourse.elm-lang.org/t/experimental-json-decoding-api/2121>.
@docs do
@docs allowFatal
## Defining Your Own Continuation Utilities
Expand Down Expand Up @@ -88,6 +90,12 @@ noop =
BackendTask.succeed ()


{-| -}
allowFatal : BackendTask { error | fatal : FatalError } data -> (data -> BackendTask FatalError b) -> BackendTask FatalError b
allowFatal =
do << BackendTask.allowFatal


{-| A continuation-style helper for [`Glob.fromString`](BackendTask-Glob#fromString).
In a shell script, you can think of this as a stand-in for globbing files directly within a command. The [`BackendTask.Stream.command`](BackendTask-Stream#command)
Expand Down

0 comments on commit 9b9a634

Please sign in to comment.