Cabal-1.24.0.0: A framework for packaging Haskell software

CopyrightDuncan Coutts 2007-2008
Maintainercabal-devel@haskell.org
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Distribution.System

Contents

Description

Cabal often needs to do slightly different things on specific platforms. You probably know about the os however using that is very inconvenient because it is a string and different Haskell implementations do not agree on using the same strings for the same platforms! (In particular see the controversy over "windows" vs "mingw32"). So to make it more consistent and easy to use we have an OS enumeration.

Synopsis

Operating System

data OS

Instances

Eq OS 
Data OS 
Ord OS 
Read OS 
Show OS 
Generic OS 
Binary OS 
Text OS 
type Rep OS 

Machine Architecture

data Arch

Instances

Eq Arch 
Data Arch 
Ord Arch 
Read Arch 
Show Arch 
Generic Arch 
Binary Arch 
Text Arch 
type Rep Arch 

Platform is a pair of arch and OS

data Platform

Constructors

Platform Arch OS 

Instances

Eq Platform 
Data Platform 
Ord Platform 
Read Platform 
Show Platform 
Generic Platform 
Binary Platform 
Text Platform 
type Rep Platform 

buildPlatform :: Platform

The platform Cabal was compiled on. In most cases, LocalBuildInfo.hostPlatform should be used instead (the platform we're targeting).

platformFromTriple :: String -> Maybe Platform

Internal