Created
July 6, 2010 17:20
-
-
Save moustaki/465648 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- use_module(library('http/http_open')). | |
prove((A, B)) :- | |
A, B. | |
prove((A; B)) :- | |
A; B. | |
prove(H) :- | |
clause(H, B), !, | |
prove(B). | |
prove(Head) :- load(Head), Head. | |
% todo: fail silently | |
load(A) :- | |
http_open(A, S, []), | |
tmp_file('/tmp', Tmp), | |
open(Tmp, write, S2, []), | |
copy_stream_data(S, S2), | |
close(S), | |
close(S2), | |
consult(Tmp). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment