33 lines · 945 B · Text
RawDownload
||| Sets and display version of Idris.module Idris.Version import YafflePaths ||| Semantic versioning with optional tag||| See [semver](https://semver.org/) for proper definition of semantic versioningpublic exportrecord Version where  constructor MkVersion  ||| Semantic version  ||| Should follow the (major, minor, patch) convention  semVer : (Nat, Nat, Nat)  ||| Optional tag  ||| Usually contains git sha1 of this software's build in between releases  versionTag : Maybe String exportversion : Versionversion with (yversion)  | (s,"") = MkVersion s Nothing  | (s,t) = MkVersion s (Just t) exportshowVersion : Bool -> Version -> StringshowVersion tag (MkVersion (maj,min,patch) versionTag) =  concat (intersperse "." (map show [ maj, min, patch])) ++         if tag then showTag else ""  where    showTag : String    showTag = case versionTag of                Nothing => ""                Just tag => "-" ++ tag

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t