scryer-prolog icon indicating copy to clipboard operation
scryer-prolog copied to clipboard

Errors in initialization look like answers

Open UWN opened this issue 2 years ago • 1 comments

:- initialization(false).
:- initialization(sum(3,4,_Y)).
:- initialization(1=2).

yields

?- [ini].
Warning: initialization/1 failed for: user:false
   error(type_error(list,3),unknown(3)-1).
   false.

This looks odd, since there are now two answers, the error line and the false. Not sure what should be shown instead.

UWN avatar Jun 29 '23 09:06 UWN

Maybe some warning like in the case of failure?

?- [ini].
Warning: initialization/1 failed for: user:false
Warning: initialization/1 throwed error for: <something here> error(type_error(list,3),unknown(3)-1).
   false.

Maybe this would be hard to read, so I'm not sure.

bakaq avatar Dec 13 '23 19:12 bakaq