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.
data 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
Known instances:
data PlGoal
A Prolog goal is a literal, a negated goal, or a conditional.
Constructors:
PlLit
:: String -> [PlTerm] -> PlGoal
PlNeg
:: [PlGoal] -> PlGoal
PlCond
:: [PlGoal] -> [PlGoal] -> [PlGoal] -> PlGoal
Known instances:
data 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
Known instances: