Module Language.Prolog.Types

This library defines a representation for Prolog programs. It does not cover all aspects of Prolog but might be useful for applications generating Prolog programs.

Author: Michael Hanus

Version: January 2022

Summary of exported operations:

Exported datatypes:


PlClause

A Prolog clause is either a program clause consisting of a head and a body, or a directive or a query without a head.

Constructors:

  • PlClause :: String -> [PlTerm] -> [PlGoal] -> PlClause
  • PlDirective :: [PlGoal] -> PlClause
  • PlQuery :: [PlGoal] -> PlClause

PlGoal

A Prolog goal is a literal, a negated goal, or a conditional.

Constructors:


PlTerm

A Prolog term is a variable, an atom, a number, or a structure.

Constructors:

  • PlVar :: String -> PlTerm
  • PlAtom :: String -> PlTerm
  • PlInt :: Int -> PlTerm
  • PlFloat :: Float -> PlTerm
  • PlStruct :: String -> [PlTerm] -> PlTerm

Exported operations: