A proposal regarding the use of exit status codes.
Currently, a simple pipe to swipl that is clearly wrong will still return 0 as status code:
echo "...THIS_IS_CLEARY_WRONG_AND_WILL_CRASH..." | swipl; echo $?
As far as I understand, because the swipl interactive environment is the default goal it will always return 0 as exit code, since it starts the interactive environment fine. But this makes CI testing and the like a bit tedious. For instance, when I want to install a pack, I want to know whether is has done so successfully.
echo "pack_install(hdt, interactive(false))." | swipl
Of course, I could make a new file and specify a goal, but I do think that is kind of tedious when running simple prolog rules like this in CI for instance.
My proposal:
Create a command line flag which handles the whole STDIN as the default goal.