-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error reporting, add a test.
- Loading branch information
Showing
4 changed files
with
48 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use datapond_derive::datapond; | ||
|
||
fn main() { | ||
let inp = vec![(1, 2), (2, 3)]; | ||
let out; | ||
datapond! { | ||
input inp(x: u32, y: u32, z: u32) | ||
output out(x: u32, y: u32) | ||
out(x, y) :- inp(y, x). | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error: Wrong number of arguments for inp: expected 2, found 3. | ||
--> $DIR/arg_mismatch.rs:9:22 | ||
| | ||
9 | out(x, y) :- inp(y, x). | ||
| ^^^ | ||
|
||
error: The predicate inp was declared here. | ||
--> $DIR/arg_mismatch.rs:7:15 | ||
| | ||
7 | input inp(x: u32, y: u32, z: u32) | ||
| ^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters