]> Repositorios git - scryer-prolog.git/commit
ISO: Implement the include/1 directive
authorMarkus Triska <[email protected]>
Sat, 28 Feb 2026 13:23:44 +0000 (14:23 +0100)
committerMarkus Triska <[email protected]>
Sat, 28 Feb 2026 13:49:13 +0000 (14:49 +0100)
commit8f39bee463eeaf64c04213e99606b75b9a3c8b52
treef452decd9e6b14211cc02217fed57ee798cf7214
parent453a88f03e3b21928a6f40e78c85ee7870ec69b8
ISO: Implement the include/1 directive

Quoting from the standard:

    7.4.2.7 include/1

    If F is an implementation defined ground term designating
    a Prolog text unit, then Prolog text P1 which contains
    a directive include(F) is identical to a Prolog text P2
    obtained by replacing the directive include(F) in P1 by
    the Prolog text denoted by F.

Example:

    :- include("hello.pl").

This addresses #583 and #634.
src/toplevel.pl