Compiler Versions

George Russell ger at informatik.uni-bremen.de
Tue Apr 13 17:34:09 EDT 2004


Simon Marlow wrote (snipped):
> I agree it's not worth arguing, it's more important to decide whether we
> can implement Read Version.

Why is the Read instance for Version so important?  I don't really see
one using it much.  The only occasion I can imagine when you would actually
want to create a Version value for GHC is when you send a new release out
the door.

I don't really the instance of Ord being that important either.  What one
wants to know is whether
(1) version X was released later than some given date;
(2) version X is lexicographically subsequent to [sequence of integers]
     (so GHC 6.02.1 comes after GHC 4.08.1);
(3) version X is a subversion of [sequence of integers], as
     6.2.1 is a subversion of 6.2;
(4) version X has a tag attached meaning "DANGER.  Do not use unless your
     name is Simon".

Some way of converting a Version value to a short form (as in
"GHC 6.02.1 (simony,hacked_for_windows) 13th April 2004") might be
useful.  For example you could do that with a date-like format
string.  Also you need some way Haskell can write a Version to a file
so that it can be read again.  But I think it's much more important to
approach this from the angle of how people will actually want to use
Version, instead of asking "How will we fit this into the standard
Haskell classes?"




More information about the Libraries mailing list