summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-06-08 18:34:30 +0100
committerIan Lynagh <igloo@earth.li>2011-06-08 18:37:05 +0100
commit07d93083a41ce0e137595ba0a51143a7fcba234f (patch)
treea4ca4e7d7426e28bb8f98b91ad38bf263e620133 /compiler/utils
parent35ce906d57d3135a749069b8bfe3e98587258e46 (diff)
downloadhaskell-07d93083a41ce0e137595ba0a51143a7fcba234f.tar.gz
Whitespace only in utils/Platform.hs
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/Platform.hs92
1 files changed, 46 insertions, 46 deletions
diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs
index e4f97bdda7..dcf287d3f2 100644
--- a/compiler/utils/Platform.hs
+++ b/compiler/utils/Platform.hs
@@ -1,16 +1,16 @@
-- | A description of the platform we're compiling for.
--- Used by the native code generator.
--- In the future, this module should be the only one that references
--- the evil #defines for each TARGET_ARCH and TARGET_OS
+-- Used by the native code generator.
+-- In the future, this module should be the only one that references
+-- the evil #defines for each TARGET_ARCH and TARGET_OS
--
module Platform (
- Platform(..),
- Arch(..),
- OS(..),
+ Platform(..),
+ Arch(..),
+ OS(..),
- defaultTargetPlatform,
- osElfTarget
+ defaultTargetPlatform,
+ osElfTarget
)
where
@@ -19,38 +19,38 @@ where
-- | Contains enough information for the native code generator to emit
--- code for this platform.
+-- code for this platform.
data Platform
- = Platform
- { platformArch :: Arch
- , platformOS :: OS }
+ = Platform
+ { platformArch :: Arch
+ , platformOS :: OS }
-- | Architectures that the native code generator knows about.
--- TODO: It might be nice to extend these constructors with information
--- about what instruction set extensions an architecture might support.
+-- TODO: It might be nice to extend these constructors with information
+-- about what instruction set extensions an architecture might support.
--
data Arch
- = ArchUnknown
- | ArchX86
- | ArchX86_64
- | ArchPPC
- | ArchPPC_64
- | ArchSPARC
- deriving (Show, Eq)
-
+ = ArchUnknown
+ | ArchX86
+ | ArchX86_64
+ | ArchPPC
+ | ArchPPC_64
+ | ArchSPARC
+ deriving (Show, Eq)
+
-- | Operating systems that the native code generator knows about.
--- Having OSUnknown should produce a sensible default, but no promises.
+-- Having OSUnknown should produce a sensible default, but no promises.
data OS
- = OSUnknown
- | OSLinux
- | OSDarwin
- | OSSolaris2
- | OSMinGW32
- | OSFreeBSD
- | OSOpenBSD
- deriving (Show, Eq)
+ = OSUnknown
+ | OSLinux
+ | OSDarwin
+ | OSSolaris2
+ | OSMinGW32
+ | OSFreeBSD
+ | OSOpenBSD
+ deriving (Show, Eq)
-- | This predicates tells us whether the OS supports ELF-like shared libraries.
@@ -62,44 +62,44 @@ osElfTarget OSSolaris2 = True
osElfTarget _ = False
-- | This is the target platform as far as the #ifdefs are concerned.
--- These are set in includes/ghcplatform.h by the autoconf scripts
+-- These are set in includes/ghcplatform.h by the autoconf scripts
defaultTargetPlatform :: Platform
defaultTargetPlatform
- = Platform defaultTargetArch defaultTargetOS
+ = Platform defaultTargetArch defaultTargetOS
-- | Move the evil TARGET_ARCH #ifdefs into Haskell land.
defaultTargetArch :: Arch
#if i386_TARGET_ARCH
-defaultTargetArch = ArchX86
+defaultTargetArch = ArchX86
#elif x86_64_TARGET_ARCH
-defaultTargetArch = ArchX86_64
+defaultTargetArch = ArchX86_64
#elif powerpc_TARGET_ARCH
-defaultTargetArch = ArchPPC
+defaultTargetArch = ArchPPC
#elif powerpc64_TARGET_ARCH
-defaultTargetArch = ArchPPC_64
+defaultTargetArch = ArchPPC_64
#elif sparc_TARGET_ARCH
-defaultTargetArch = ArchSPARC
+defaultTargetArch = ArchSPARC
#else
-defaultTargetArch = ArchUnknown
+defaultTargetArch = ArchUnknown
#endif
-- | Move the evil TARGET_OS #ifdefs into Haskell land.
defaultTargetOS :: OS
#if linux_TARGET_OS
-defaultTargetOS = OSLinux
+defaultTargetOS = OSLinux
#elif darwin_TARGET_OS
-defaultTargetOS = OSDarwin
+defaultTargetOS = OSDarwin
#elif solaris2_TARGET_OS
-defaultTargetOS = OSSolaris2
+defaultTargetOS = OSSolaris2
#elif mingw32_TARGET_OS
-defaultTargetOS = OSMinGW32
+defaultTargetOS = OSMinGW32
#elif freebsd_TARGET_OS
-defaultTargetOS = OSFreeBSD
+defaultTargetOS = OSFreeBSD
#elif openbsd_TARGET_OS
-defaultTargetOS = OSOpenBSD
+defaultTargetOS = OSOpenBSD
#else
-defaultTargetOS = OSUnknown
+defaultTargetOS = OSUnknown
#endif