Skip to content

Commit

Permalink
Add more failures to the triggers of the ? operator fallback (#481)
Browse files Browse the repository at this point in the history
As we identified in #480, the standard was underspecified on this
  • Loading branch information
f-f committed Apr 14, 2019
1 parent 214d124 commit a8dabae
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions standard/semantics.md
Original file line number Diff line number Diff line change
Expand Up @@ -5294,6 +5294,9 @@ resolve in cases like:
* an environment variable is not defined
* file doesn't exist
* URL is not reachable
* parse error
* hash mismatch
* typecheck error

By using the `?` operator, expressions are alternatively resolved, in
left-to-right order:
Expand Down
1 change: 1 addition & 0 deletions tests/import/success/alternativeHashMismatchA.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(./alternativeHashMismatchB.dhall sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) ? 42
1 change: 1 addition & 0 deletions tests/import/success/alternativeHashMismatchB.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
42
1 change: 1 addition & 0 deletions tests/import/success/alternativeParseErrorA.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(../data/example.txt) ? 42
1 change: 1 addition & 0 deletions tests/import/success/alternativeParseErrorB.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
42

0 comments on commit a8dabae

Please sign in to comment.