Safe Haskell | None |
---|---|
Language | Haskell2010 |
Information about the current system:
- operating system —
currentOperatingSystem
. - architecture —
currentArchitecture
. - endianness —
currentEndianness
. - processor —
currentProcessorBits
,currentNumberOfCPUs
.
/TODO: respect cross-compilation, i.e. the targetruntime system.//
And information about the current compiler:
- haskell compiler —
currentCompiler
.
(This module is similar to the Foundation.System
module in the foundation
package.)
Synopsis
- data IsHyperthreading
- data CPUsSummary = CPUsSummary {}
- data KnownHaskellCompiler
- data ProcessorBits
- data Endianness
- data KnownManufacturer
- data KnownArchitecture = KnownArchitecture {}
- data KnownOperatingSystem
- pattern ARM64 :: KnownArchitecture
- pattern ARM :: KnownArchitecture
- pattern Sparc64 :: KnownArchitecture
- pattern Sparc :: KnownArchitecture
- pattern PowerPC64 :: KnownArchitecture
- pattern PowerPC :: KnownArchitecture
- pattern X86_64 :: KnownArchitecture
- pattern I386 :: KnownArchitecture
- currentOperatingSystem :: Either String KnownOperatingSystem
- allKnownArchitectures :: [KnownArchitecture]
- currentArchitecture :: Either String KnownArchitecture
- currentManufacturer :: Maybe KnownManufacturer
- currentEndianness :: Maybe Endianness
- currentProcessorBits :: Maybe ProcessorBits
- currentCompiler :: Either String KnownHaskellCompiler
- currentNumberOfCPUs :: IO Natural
- getCPUsVerbose :: IO [CPU]
- getCPUsSummary :: IO CPUsSummary
Documentation
data IsHyperthreading Source #
Whether the system is currently using any Hyperthreading.
Instances
data CPUsSummary Source #
Instances
data KnownHaskellCompiler Source #
Enumeration of the known GHC-based compilers.
Instances
data ProcessorBits Source #
Whether the processor is 64-bit
or 32-bit
.
https://en.wikipedia.org/wiki/64-bit_computing: "In computer architecture, 64-bit computing is the use of processors that have datapath widths, integer size, and memory address widths of 64 bits (eight octets)."
Instances
data Endianness Source #
Whether the processor is little-endian or big-endian.
https://en.wikipedia.org/wiki/Endianness: "Endianness is the sequential order in which bytes are arranged into larger numerical values when stored in memory or when transmitted over digital links."
Instances
data KnownManufacturer Source #
Instances
data KnownArchitecture Source #
Enumeration of the known GHC supported architecture.
Instances
data KnownOperatingSystem Source #
Enumeration of the known GHC supported operating systems.
Instances
pattern ARM64 :: KnownArchitecture Source #
pattern ARM :: KnownArchitecture Source #
pattern Sparc64 :: KnownArchitecture Source #
pattern Sparc :: KnownArchitecture Source #
pattern PowerPC64 :: KnownArchitecture Source #
pattern PowerPC :: KnownArchitecture Source #
pattern X86_64 :: KnownArchitecture Source #
pattern I386 :: KnownArchitecture Source #
currentManufacturer :: Maybe KnownManufacturer Source #
Get the manufacturer (if known) of the architecture on which the program is running.
Uses base
's arch
function.
currentEndianness :: Maybe Endianness Source #
The endianness of the current machine's architecture.
Nothing
represents:
- unknown endianness.
These endiannesses aren't represented:
- Bi-endianness. (the endianness, if swapped before the haskell program starts up, may differ).
For example, PowerPC processors start in big-endian, but PowerPC itself is bi-endian.
currentProcessorBits :: Maybe ProcessorBits Source #
Get the number of bits (if known) of the processor on which the program is running.
Uses base
's arch
function.
currentCompiler :: Either String KnownHaskellCompiler Source #
get the compiler name
This function uses the base
's compilerName
function.
currentNumberOfCPUs :: IO Natural Source #
returns the number of CPUs the machine has
getCPUsVerbose :: IO [CPU] Source #