Skip to content

Commit

Permalink
Improve documentation around tags
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Oct 1, 2023
1 parent f0b145d commit c0ffb22
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
8 changes: 8 additions & 0 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ All of the following are valid arguments to `ghcup install ghc`:

If the argument is omitted, the default is `recommended`.

Other tags include:

- `prerelease`: a prerelease version
- `latest-prerelease`: the latest prerelease version
- `nightly`: a nightly version
- `latest-nightly`: the latest nightly version


## Manpages

For man pages to work you need [man-db](http://man-db.nongnu.org/) as your `man` provider, then issue `man ghc`. Manpages only work for the currently set ghc.
Expand Down
17 changes: 11 additions & 6 deletions lib/GHCup/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,17 @@ instance NFData VersionInfo

-- | A tag. These are currently attached to a version of a tool.
data Tag = Latest
| Recommended
| Prerelease
| LatestPrerelease
| Nightly
| LatestNightly
| Base PVP
| Recommended -- ^ the recommended version of a tool
| Prerelease -- ^ denotes a prerelease version
-- (a version should either be 'Prerelease' or
-- 'LatestPrerelease', but not both)
| LatestPrerelease -- ^ the latest prerelease (there should be only
-- one per tool)
| Nightly -- ^ denotes a nightly version
-- (a version should either be 'Nightly' or
-- 'LatestNightly', but not both)
| LatestNightly -- ^ the latest nightly (there should be only one per tool)
| Base PVP -- ^ the base version shipped with GHC
| Old -- ^ old versions are hidden by default in TUI
| UnknownTag String -- ^ used for upwardscompat
deriving (Ord, Eq, GHC.Generic, Show) -- FIXME: manual JSON instance
Expand Down

0 comments on commit c0ffb22

Please sign in to comment.