
Malcolm Wallace
I remember Mark Jones suggesting more-or-less exactly this idea back in about 1998/1999. It has been implemented in nhc98 ever since, but I finally deleted it from CVS recently because no other systems supported it. And (probably the more major reason) because I frequently forgot to keep it up to date. Here was the signature:
module Haskell where
import Time import Locale
systemName :: String -- "Hugs", "GHC", "hbc", "nhc", "qhc", .. . haskellVersion :: Int -- 13, 14, 98, 2000, ... ^^^^^^^^^^^^^^^^^^^^^
I wholeheartedly endorse this, but these days I think (Version, [String]) would be a better type, i.e., (haskell98, ["Standard FFI", "Multi-parameter type classes", "Functional Dependencies", ...]. Knowing the Haskell version number by itself won't be much good until the Haskell 2.0 standard, but knowing which extensions are present (independent of the compiler version) would be a very good thing (listing syntactic extensions isn't an entirely useless thing; I'm sure it would make Autoconf's job easier).
releaseDate :: CalendarTime -- ... version :: String -- some combination of the above
<snip> Jon Cast

On Wednesday 07 April 2004 12:54 pm, Jon Cast wrote:
Malcolm Wallace
wrote: <snip>
I remember Mark Jones suggesting more-or-less exactly this idea back in about 1998/1999. It has been implemented in nhc98 ever since, but I finally deleted it from CVS recently because no other systems supported it. And (probably the more major reason) because I frequently forgot to keep it up to date. Here was the signature:
module Haskell where
import Time import Locale
systemName :: String -- "Hugs", "GHC", "hbc", "nhc", "qhc", .. . haskellVersion :: Int -- 13, 14, 98, 2000, ...
^^^^^^^^^^^^^^^^^^^^^
I wholeheartedly endorse this, but these days I think (Version, [String]) would be a better type, i.e., (haskell98, ["Standard FFI", "Multi-parameter type classes", "Functional Dependencies", ...]. Knowing the Haskell version number by itself won't be much good until the Haskell 2.0 standard, but knowing which extensions are present (independent of the compiler version) would be a very good thing (listing syntactic extensions isn't an entirely useless thing; I'm sure it would make Autoconf's job easier).
releaseDate :: CalendarTime -- ... version :: String -- some combination of the above
Why not have a record encoding the major/minor version number, stability, extensions, etc.? -- Andy Moran Ph. (503) 626 6616, x113 Galois Connections Inc. Fax. (503) 350 0833 12725 SW Millikan Way, Suite #290 http://www.galois.com Beaverton, OR 97005 moran@galois.com
participants (2)
-
Andy Moran
-
Jon Cast