targodan / jupyter-swi-prolog

A Jupyter Kernel for SWI-Prolog
MIT License
24 stars 6 forks source link

Make lines starting with `:-` also be queries #8

Open targodan opened 5 years ago

targodan commented 5 years ago

One often sees lines like :- use_module(library(clpfd)). in examples. This will not currently work in this kernel as every line not starting with ?- is sent to an assertz statement.

Solution: Handle lines starting with :- the same way as lines starting with ?-, i. e. as queries.

targodan commented 5 years ago

No, better idea: Treat them as queries but without any output.