Ticket #81 (new defect)

Opened 5 years ago

support --version flag

Reported by: guest Owned by: nobody
Priority: minor Milestone:
Component: hugs Version: 200609
Keywords: Cc: duncan@…

Description

Discovering hugs's version number is almost impossible and certainly impractical. The result is that Cabal does not know the hugs version number.

As far as I can see, the only way to find the version number is to start hugs, grep the banner and translate textual months into a sensible version number, then :q to exit hugs again. Note also that hugs considers itself to be unversioned:

$ hugs -98 System.Info
__   __ __  __  ____   ___      _________________________________________
||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__||  __||     Copyright (c) 1994-2005
||---||         ___||           World Wide Web: http://haskell.org/hugs
||   ||                         Report bugs to: hugs-bugs@haskell.org
||   || Version: March 2005     _________________________________________

Hugs mode: Restart with command line option +98 for Haskell 98 mode

Type :? for help
System.Info> compilerVersion
Version {versionBranch = [0,0], versionTags = []}
System.Info> 

Version 0.0 eh?

Most programs support a --version command line flag that spits out the version number (and sometimes some other (un)helpful information) and then terminates.

As for the format, I'd suggest:

hugs --version
Hugs version 2006.9

That is, a version number that can fit into the Data.Version format.

The reason this is important for Cabal support is that it'd allow Cabal itself or packages (via configurations) to conditionally enable/disable support for features depending on the version of hugs.

Note: See TracTickets for help on using tickets.