Safe Haskell | None |
---|---|
Language | Haskell98 |
- data Platform = Platform {
- platformArch :: Arch
- platformOs :: Os
- staticFileExtensionOfPlatform :: Platform -> String
- sharedFileExtensionOfPlatform :: Platform -> String
- data Arch
- archPointerWidth :: Arch -> Int
- data Os
- determineHostPlatform :: IO (Maybe Platform)
- determineHostArch :: IO (Maybe Arch)
- determineHostOs :: IO (Maybe Os)
- determineHostLlvmVersion :: Maybe FilePath -> IO (Maybe String)
Documentation
Describes a build or target platform.
Platform | |
|
staticFileExtensionOfPlatform :: Platform -> String Source
Get the file extension to use for a static library on this platform.
sharedFileExtensionOfPlatform :: Platform -> String Source
Get the file extension to use for a shared library on this platform.
Processor Architecture.
archPointerWidth :: Arch -> Int Source
Get the width of a pointer on the architecture, in bits.
Operating System.
Host platform
determineHostPlatform :: IO (Maybe Platform) Source
Determine the default host platform.
Uses the arch
and uname
commands which must be in the current path.
Returns Nothing
if arch
or uname
cannot be found, returned
an error, or we didn't recognise their response.
For Platforms like Darwin which can run both 32-bit and 64-bit binaries,
we return whatever the default is reported by arch
and uname
.
determineHostArch :: IO (Maybe Arch) Source
Determine the host archicture.
Uses the arch
command which must be in the current path.
determineHostOs :: IO (Maybe Os) Source
Determine the host OS.
Uses the uname
command which must be in the current path.