mndrix/delay

delay/1 with !/0

Closed this issue · 0 comments

Jan pointed out

delaying over a cut changes the semantics.
So, if you use this you either should not use cuts or be very
careful with them.

The first improvement is to document this circumstance so that developers are aware of the problem.

It'd also be nice to generate warnings about delay/1 that occur before !/0 in a clause. This doesn't cover all problem scenarios but it should help notice some common ones. If I go this route, there needs to be a way to say, "I know what I'm doing, leave me alone". Ideally, there should be a style_check/1 mode that enables this warning.