Better error when forgetting to set part of the output pattern?
I had written a rule like:
foo: a -> b with !Id(<buzz> a) <+ ?Id(b) <+ "whatever"
If buzz fails, we pass through to the other clauses. If buzz succeeds, however, the rule fails anyway. This is because that branch of the logic doesn’t assign any value to ‘b’.
In an ideal world, it would have reported an error like “‘b’ undefined”.
It took me quite a while to figure out that I’d forgotten to put “b := …” in there.Submitted by Dobes Vandermeer on 14 November 2012 at 23:31