Skip to content

propella/prolog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A pure prolog interpreter

* Getting started

$ runhaskell Main.hs
or

$ hugs Prolog.hs 
Prolog> main

* Command

food(apple). -- Add a clause.
?- food(X).  -- Query.
??           -- Show all.

* Example

runhaskell Main.hs < demo.prolog

* Compile with ghc

ghc --make Main.hs