[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Stefan Israelsson Tampe
Subject: prolog
Date: Fri, 21 Mar 2014 20:59:33 +0100

Ok, I've been working on a prolog shell in guile. 

,help        works as before
[+ 1 2]     staring [ will mark a sexp evaluation normal sexp reader is used
X=1;X=2. And of cause prolog expressions ends with '.'

Then we will get:
prolog@(guile-user)> [use-modules (logic guile-log iso-prolog)]
prolog@(guile-user)> assertz(f(1)).
more (y/n/a) > n
prolog@(guile-user)> asserta(f(a)).
more (y/n/a) > n
prolog@(guile-user)> f(X).

   X = a
more (y/n/a) > y

   X = 1
more (y/n/a) > y

prolog@(guile-user)> ,help
Help Commands [abbrev]:

 ,help [all | GROUP | [-c] COMMAND]
                              [,h] - Show help.
 ,show [TOPIC]                     - Gives information about Guile.
 ,apropos REGEXP              [,a] - Find bindings/modules/packages.
 ,describe OBJ                [,d] - Show description/documentation.

Command Groups:

 ,help all                         - List all commands
 ,help module                      - List module commands
 ,help language                    - List language commands
 ,help compile                     - List compile commands
 ,help profile                     - List profile commands
 ,help debug                       - List debug commands
 ,help inspect                     - List inspect commands
 ,help system                      - List system commands

Type `,help -c COMMAND' to show documentation of a particular command.
prolog@(guile-user)> [+ 1 2]
$1 = 3

Happy hacking!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]