NanoProlog

Very small interpreter for a Prolog-like language

Latest on Hackage:0.3

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed by Doaitse Swierstra, Jurriën Stutterheim
Maintained by Jurriën Stutterheim

This package was developed to demonstrate the ideas behind the Prolog language. It contains a very small interpreter (Language.Prolog.Nanoprolog) which can be run on its own. It reads a file with definitions, and then prompts for a goal. All possibe solutions are printed, preceded by a tree showing which rules were applied in which order.

The file royals.pro contains a description of part of the Dutch royal family, whereas the file tc.pro shows unification at work in a very small type inferencer.