LibTmux.Version
Parse stable tmux releases and check the supported release range.
Source and package
- Qualified name
-
LibTmux. Version - Package
- libtmux-haskell
- Source
- src/LibTmux/Version.hs
- LibTmux.Version
-
Description#
These functions consume supplied text. They neither execute
tmux -Vnor contact a server. Admission checks the inclusive 3.3a through 3.8 range; individual features still need capability and conformance checks.Use
parseVersionfor input,requireSupportedfor supported-range admission andrenderVersionfor canonical output.>>> :set -XOverloadedStrings>>> fmap renderVersion (parseVersion "tmux 3.3a\n" >>= requireSupported)Right "3.3a"
Members5#
Common operations1#
- VersionError data type Invalid release syntax or a release outside the supported range.
Other members4#
- parseVersion function Parse a stable release or the output of
tmux -V, allowing one final LF. Development builds and trailing data are rejected rather than assigned capabilities from a guessed stable version. Diagnostics retain at most 64 chars. - renderVersion function Render the canonical release without the executable name or newline.
- requireSupported function Admit every stable release from 3.3a through 3.8, including intermediate releases. Versions outside that range fail. Individual features need their own capability checks; passing this check does not qualify an entire release.
- TmuxVersion data type A stable release, constructed by
parseVersionand rendered byrenderVersion. Ordering compares numeric components before the patch letter.
Guides#
Pages that discuss LibTmux.Version.