-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLanguageForgeModule.affine
More file actions
51 lines (44 loc) · 1.36 KB
/
Copy pathLanguageForgeModule.affine
File metadata and controls
51 lines (44 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// SPDX-License-Identifier: AGPL-3.0-or-later
// Copyright (c) 2026 Jonathan D.A. Jewell
//
// LanguageForgeModule.affine — capability registration for the
// nextgen-languages panel.
//
// Translation of src/modules/LanguageForgeModule.res (60 LoC). Same shape
// as the other module files.
//
// Refs: standards#279, standards#252.
module LanguageForgeModule;
use prelude::{Option, Some, None, contains};
type LanguageForgeCapability =
| LanguageDashboard
| CompilationStatus
| MoscowView
| WasmTargetTracker
type LanguageForgeModuleConfig = {
id: String,
name: String,
version: String,
description: String,
capabilities: [LanguageForgeCapability],
icon: Option<String>,
}
const config: LanguageForgeModuleConfig = #{
id: "language-forge",
name: "Language Forge",
version: "0.1.0",
description: "Monitor and develop the 14 nextgen-languages portfolio — scores, phases, WASM readiness",
capabilities: [LanguageDashboard, CompilationStatus, MoscowView, WasmTargetTracker],
icon: Some("hammer"),
};
fn hasCapability(cap: LanguageForgeCapability) -> Bool {
contains(config.capabilities, cap)
}
fn capabilityLabel(cap: LanguageForgeCapability) -> String {
match cap {
LanguageDashboard => "Language Dashboard",
CompilationStatus => "Compilation Status",
MoscowView => "MoSCoW View",
WasmTargetTracker => "WASM Target Tracker",
}
}