theme-outside-main

A library file imports a theme.

compile error, shown by synod check.

The theme of a program is the theme its main file imports, or std/theme/default when it imports none. Only a main file selects a theme, because a library must look right under every theme. Move the import to the main file, or remove it.

Example

Check this program to see the diagnostic.

# package p
use std/theme/default

define One
  result 1

Diagnostic

p/p.synod:2:5: error[theme-outside-main]: "std/theme/default" is a theme, and only a main file imports a theme

Fix

Remove the import: the main file of the program selects its theme.

# package p
define One
  result 1