Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
417f4d59
Commit
417f4d59
authored
Jun 08, 2011
by
Ian Lynagh
Browse files
Add a target32Bit function to Platform
parent
9932074a
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/utils/Platform.hs
View file @
417f4d59
...
...
@@ -9,11 +9,14 @@ module Platform (
OS
(
..
),
defaultTargetPlatform
,
target32Bit
,
osElfTarget
)
where
import
Panic
#
include
"HsVersions.h"
...
...
@@ -52,6 +55,16 @@ data OS
deriving
(
Show
,
Eq
)
target32Bit
::
Platform
->
Bool
target32Bit
p
=
case
platformArch
p
of
ArchUnknown
->
panic
"Don't know if ArchUnknown is 32bit"
ArchX86
->
True
ArchX86_64
->
False
ArchPPC
->
True
ArchPPC_64
->
False
ArchSPARC
->
True
-- | This predicates tells us whether the OS supports ELF-like shared libraries.
osElfTarget
::
OS
->
Bool
osElfTarget
OSLinux
=
True
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment