License | BSD-style |
---|---|
Maintainer | foundation |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
- data OS
- os :: Either [Char] OS
- data Arch
- arch :: Either [Char] Arch
- cpus :: IO Int
- data Endianness :: *
- endianness :: Endianness
- compilerName :: String
- compilerVersion :: Version
- data Version :: * = Version {
- versionBranch :: [Int]
- versionTags :: [String]
Operation System info
CPU info
Enumeration of the known GHC supported architecture.
endianness of the current architecture
Compiler info
compilerName :: String Source #
get the compiler name
get the compilerName from base package but convert it into a strict String
The version of compilerName
with which the program was compiled
or is being interpreted.
A Version
represents the version of a software entity.
An instance of Eq
is provided, which implements exact equality
modulo reordering of the tags in the versionTags
field.
An instance of Ord
is also provided, which gives lexicographic
ordering on the versionBranch
fields (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2,
etc.). This is expected to be sufficient for many uses, but note that
you may need to use a more specific ordering for your versioning
scheme. For example, some versioning schemes may include pre-releases
which have tags "pre1"
, "pre2"
, and so on, and these would need to
be taken into account when determining ordering. In some cases, date
ordering may be more appropriate, so the application would have to
look for date
tags in the versionTags
field and compare those.
The bottom line is, don't always assume that compare
and other Ord
operations are the right thing for every Version
.
Similarly, concrete representations of versions may differ. One
possible concrete representation is provided (see showVersion
and
parseVersion
), but depending on the application a different concrete
representation may be more appropriate.
Version | |
|