| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Rzk.Version
Description
Which build of rzk this is: the package version, the commit it was built from (when the build supplied one), the compiler and platform, and which Cabal flags it was built with.
The package version itself is generated by Cabal into Paths_rzk, an
autogenerated other module of the library, so a tool that links rzk cannot
import it. This module exposes it as part of the public API instead, together
with the rest of the build details, so a consumer (the rzk executable, the
rzk-game) can report which checker it is running.
Synopsis
- version :: Version
- versionString :: String
- data VersionInfo = VersionInfo {}
- data BuildFlag = BuildFlag {}
- data FlagState
- versionInfo :: VersionInfo
- buildFlags :: [BuildFlag]
- ppVersionInfo :: VersionInfo -> String
- isoCommitDate :: String -> String
The package version
versionString :: String Source #
The version of the rzk package, rendered as a string (e.g. "0.11.2").
This is what rzk version prints, and tools scrape it as such, so it is
deliberately just the version and nothing else.
The full build description
data VersionInfo Source #
Everything this build knows about itself.
Constructors
| VersionInfo | |
Fields
| |
Instances
| ToJSON VersionInfo Source # | |
Defined in Rzk.Version Methods toJSON :: VersionInfo -> Value # toEncoding :: VersionInfo -> Encoding # toJSONList :: [VersionInfo] -> Value # toEncodingList :: [VersionInfo] -> Encoding # omitField :: VersionInfo -> Bool # | |
| Show VersionInfo Source # | |
Defined in Rzk.Version Methods showsPrec :: Int -> VersionInfo -> ShowS # show :: VersionInfo -> String # showList :: [VersionInfo] -> ShowS # | |
| Eq VersionInfo Source # | |
Defined in Rzk.Version | |
A Cabal flag of the rzk package, with the state this build has.
Constructors
| BuildFlag | |
Fields | |
Whether a Cabal flag is on for this build.
versionInfo :: VersionInfo Source #
The build description of the running rzk.
buildFlags :: [BuildFlag] Source #
Every Cabal flag of the package, each with the state this build has.
A tool that wants a language server can look up lsp here rather than run
rzk lsp and see whether it fails.
Note that the state is what was compiled in, not what was asked for: the
JavaScript and WebAssembly backends have no LSP support whatever the lsp
flag says, and lsp reads as off in such a build.
ppVersionInfo :: VersionInfo -> String Source #
Render a build description as a block of lines, as printed by
rzk version --full.
isoCommitDate :: String -> String Source #
Git's default commit date (Fri Aug 21 21:14:42 2026 +0300) as a plain ISO
date (2026-08-21), which is the form rustc -vV reports. A date that does
not parse is passed through unchanged.