At 17:35 +0000 1999/01/20, Mark P Jones wrote:
>| With regard to this, I would like to suggest the addition of a new
>| command (:v) which could give the version number to the user...
..
> - Is a command the best way to provide this functionality?  For
>   example, if there was a standard library with a signature:
>
>    module Haskell where      -- Possible values:
>     systemName     :: String --  "Hugs", "GHC", "hbc", "nhc", "qhc",...
>     haskellVersion :: Int    --  3, 14, 98, 99, 2000, 2, ...
>     releaseDate    :: Date   --  ...
>     version        :: String --  some combination of the above
>
>   then programs would be able to inspect and test which version of
>   Haskell they were using at run-time, and a user could just evaluate
>   Haskell.version in a Hugs session to find out which version they
>   were using.  Something like this might also form the basis for a
>   conditional compilation mechanism, although that needs more thought
>   and more careful design.

I think this is definitely the way, because I have encountered people
trying to combine different version number Hugs and Preludes (which does
not work).

I think this should be added to Haskell, so that the compiler can give an
error message at startup time. One can even think of giving Prelude files a
checksum number, so that the compiler can detect if the prelude file has
been changed, and give a warning if so is the case.

  Hans Aberg
                  * Email: Hans Aberg <mailto:[EMAIL PROTECTED]>
                  * Home Page: <http://www.matematik.su.se/~haberg/>
                  * AMS member listing: <http://www.ams.org/cml/>


Reply via email to