From 28f0e8acacd0c72f24f59985e651c617f5284bfc Mon Sep 17 00:00:00 2001 From: alex-eg Date: Fri, 9 Oct 2026 18:05:08 +0300 Subject: [PATCH] pub-import the modules a unit's interface holds by value sexc now checks that importers can see every type a pub form holds, and asks for pub where the type comes from another import. Co-Authored-By: Claude Opus 5.5 --- src/hover.sex | 6 +++--- src/ores.sex | 4 ++-- src/rivers.sex | 4 ++-- src/search.sex | 4 ++-- src/settings.sex | 2 +- src/strata.sex | 4 ++-- src/terra.sex | 8 ++++---- src/tiles.sex | 6 +++--- src/verify.sex | 2 +- src/worldgen.sex | 4 ++-- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/hover.sex b/src/hover.sex index 3edd225..fca6158 100644 --- a/src/hover.sex +++ b/src/hover.sex @@ -17,12 +17,12 @@ (import noise) (import shape) (import json) -(import worldgen) +(pub import worldgen) (import fastnoise) -(import rivers) +(pub import rivers) (import terra) (import strata) -(import ores) +(pub import ores) ;;; MINERAL is the mineral whose reading is wanted, or -1. (pub record hover-query ((x int) (z int) (mode int) (value int) (mineral int))) diff --git a/src/ores.sex b/src/ores.sex index 1c6cb70..2369268 100644 --- a/src/ores.sex +++ b/src/ores.sex @@ -25,11 +25,11 @@ ;; dependency order. (import cs) (import maps) -(import lcg) +(pub import lcg) (import noise) (import shape) (import json) -(import worldgen) +(pub import worldgen) (import fastnoise) (import rivers) (import terra) diff --git a/src/rivers.sex b/src/rivers.sex index 7136c90..6ddefc5 100644 --- a/src/rivers.sex +++ b/src/rivers.sex @@ -14,12 +14,12 @@ ;; the types its interface needs; until then, every dependency, in ;; dependency order. (import maps) -(import lcg) +(pub import lcg) (import noise) (import shape) (import json) (import worldgen) -(import fastnoise) +(pub import fastnoise) (pub record river-config ((min-fork-angle int) (fork-variation int) (normal-angle int) diff --git a/src/search.sex b/src/search.sex index f9256ff..62d594b 100644 --- a/src/search.sex +++ b/src/search.sex @@ -19,9 +19,9 @@ (import noise) (import shape) (import json) -(import worldgen) +(pub import worldgen) (import fastnoise) -(import rivers) +(pub import rivers) (import terra) (import strata) (import ores) diff --git a/src/settings.sex b/src/settings.sex index 4fa199d..8114857 100644 --- a/src/settings.sex +++ b/src/settings.sex @@ -13,7 +13,7 @@ (import noise) (import shape) (import save) -(import worldgen) +(pub import worldgen) ;;; Settings plus the seed as the user would type it. (pub record world-source ((settings world-settings) (seed-text [char 128]))) diff --git a/src/strata.sex b/src/strata.sex index e15ef96..ebd00dd 100644 --- a/src/strata.sex +++ b/src/strata.sex @@ -13,7 +13,7 @@ ;; TODO sex#58: import only the modules used here once an import brings ;; the types its interface needs; until then, every dependency, in ;; dependency order. -(import maps) +(pub import maps) (import lcg) (import noise) (import shape) @@ -21,7 +21,7 @@ (import worldgen) (import fastnoise) (import rivers) -(import terra) +(pub import terra) (pub define MAX-ROCKS 32) ;;; A column entry below any rock: the mantle at y = 0. diff --git a/src/terra.sex b/src/terra.sex index 20d91bc..9090049 100644 --- a/src/terra.sex +++ b/src/terra.sex @@ -13,14 +13,14 @@ ;; TODO sex#58: import only the modules used here once an import brings ;; the types its interface needs; until then, every dependency, in ;; dependency order. -(import maps) +(pub import maps) (import lcg) (import noise) (import shape) (import json) -(import worldgen) -(import fastnoise) -(import rivers) +(pub import worldgen) +(pub import fastnoise) +(pub import rivers) ;;; NewSimplexNoiseLayer -------------------------------------------- diff --git a/src/tiles.sex b/src/tiles.sex index 09a520d..6a04878 100644 --- a/src/tiles.sex +++ b/src/tiles.sex @@ -20,10 +20,10 @@ (import maps) (import lcg) (import noise) -(import shape) -(import worldgen) +(pub import shape) +(pub import worldgen) (import fastnoise) -(import rivers) +(pub import rivers) (import terra) (import strata) (import ores) diff --git a/src/verify.sex b/src/verify.sex index b11359c..54a29bb 100644 --- a/src/verify.sex +++ b/src/verify.sex @@ -14,7 +14,7 @@ (import save) (import worldgen) (import fastnoise) -(import rivers) +(pub import rivers) (import terra) (import strata) (import ores) diff --git a/src/worldgen.sex b/src/worldgen.sex index 7a8f119..adb9ab2 100644 --- a/src/worldgen.sex +++ b/src/worldgen.sex @@ -5,10 +5,10 @@ (include stdio.h stdlib.h string.h math.h) (import maps) -(import lcg) +(pub import lcg) (import noise) (import json) -(import shape) +(pub import shape) (pub define MAX-PROVINCES 32)