Ghi v0.2.2
Ghi v0.2.2
Language
- Plain enums declare distinct types, for example
enum Direction { North, South }withDirection.Northvalues. - Enums with explicit values require a
string,intorboolbacking type. Their cases are immutable primitive constants and can be passed directly to parameters of that type. - Enum case imports, aliases, default arguments, generic comparable constraints and canonical formatting are supported. Plain enum construction/conversion and case mutation are rejected.
- The English README includes the full enum syntax and rules, with a runnable
examples/enumsproject. Existing match semantics remain unchanged.
Editor integration
ghi check --stdin --filename /absolute/project/main.ghi /absolute/project checks an unsaved editor buffer without changing its existing production source file. Diagnostics refer to the original source path and positions. Other project files and dependencies are loaded normally. This is supported by Ghi for GoLand v0.1.1.
Installation and versions
Download a Windows setup wizard or a portable archive for Windows/macOS, Intel/AMD64 or ARM64. Bundled Mojave remains independently versioned at v0.1.0. Ghi for GoLand v0.1.1 is available in its own GitHub repository.
Native macOS v0.2.2 execution and Homebrew verification are deferred. No v0.2.2 .pkg is published; the previous v0.2.1 .pkg does not include these features. Installers are unsigned. GitHub Actions was not used.
Verification
The full compiler/language/toolchain/CLI suite and go vet passed during implementation after fixing nullable parsing integration. Final enum tests cover original diagnostics, imports, shadowing, primitive calls, JSON, immutability, conversion rejection and formatter idempotence. Existing DDD integration/unit tests and the runnable enum and README examples passed. Release CLI tests passed after the version update. All four portable archives and their embedded executable checksums were verified. The packaged Windows compiler reports v0.2.2, runs the enum example, and returns the original-file diagnostic for an unsaved enum mutation without changing disk. The Windows installer passed install/reinstall, both compiler examples, independent Mojave version, uninstall and exact PATH restoration checks.