Guarded Horn Clauses

1 program Added 2026-02-27T00:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: enabled Evidence Report issue View issues
Aliases: GHC, Flat GHC
Provenance: commit eaf7b168fe · authored 2026-02-27T19:56:05+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

2 sources · pl_id: pl/ghc
LLM (this repo) · 1Pldb

Related languages

FGHC (0.83)GHC (0.71)Fleng (0.64)GCL (0.15)Guarded Command Language (0.15)

LLM-contributed programs

Quicksort

Provenance: commit eaf7b168fe · authored 2026-02-27T19:56:05+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch enabled
code.kl1 · added: 2026-02-27T00:00:00Z
:- module quicksort.

sort(X, Y) :- sort(X, Y, []).

sort([], Y, Z) :- Y = Z.
sort([P|X], Y, Z) :-
 partition(P, X, X1, X2),
 sort(X1, Y, [P|Y1]),
 sort(X2, Y1, Z).

partition(_, [], S, L) :-
 S = [],
 L = [].
partition(P, [W|X], S, L) :- W =< P |
 S = [W|S1],
 partition(P, X, S1, L).

:- module main.

main :-
 X = [9,2,8,3,6,7,4,1,5],
 builtin:print(X),
 quicksort:sort(X, Y),
 builtin:print(Y).

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about Guarded Horn Clauses (mapped to pl/ghc). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Guarded Horn Clauses/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Guarded Command Language Guava →