summaryrefslogtreecommitdiff
path: root/compiler/utils/Platform.hs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-10-18 18:41:29 +0100
committerIan Lynagh <igloo@earth.li>2011-10-18 18:41:29 +0100
commitf75f26cc4eed3c3cfc256ebfb9e77b8e82a766fc (patch)
tree4ee881272f86bf58ed5c66e06e3e30f7f6dec6c0 /compiler/utils/Platform.hs
parentead78579ce9c32d53f848d03921a718e6d33f05d (diff)
downloadhaskell-f75f26cc4eed3c3cfc256ebfb9e77b8e82a766fc.tar.gz
Remove OSUnknown
It doesn't make sense. If platformOS is OSUnknown then we don't know the answer to any questions about the OS. So now if we don't recognise the OS we just fail, and the new OS will need to be added to the datatype.
Diffstat (limited to 'compiler/utils/Platform.hs')
-rw-r--r--compiler/utils/Platform.hs9
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs
index 362d7822d0..7446fc1099 100644
--- a/compiler/utils/Platform.hs
+++ b/compiler/utils/Platform.hs
@@ -48,11 +48,9 @@ data Arch
deriving (Show, Eq)
--- | Operating systems that the native code generator knows about.
--- Having OSUnknown should produce a sensible default, but no promises.
+-- | Operating systems that we know about.
data OS
- = OSUnknown
- | OSLinux
+ = OSLinux
| OSDarwin
| OSSolaris2
| OSMinGW32
@@ -96,7 +94,6 @@ osElfTarget OSOpenBSD = True
osElfTarget OSSolaris2 = True
osElfTarget OSDarwin = False
osElfTarget OSMinGW32 = False
-osElfTarget OSUnknown = panic "Don't know if OSUnknown is elf"
-- | This is the target platform as far as the #ifdefs are concerned.
@@ -142,7 +139,7 @@ defaultTargetOS = OSFreeBSD
#elif openbsd_TARGET_OS
defaultTargetOS = OSOpenBSD
#else
-defaultTargetOS = OSUnknown
+#error Unknown OS
#endif
#if arm_TARGET_ARCH