module System.Arch
( Arch(..)
, getSystemArch
) where
data Arch = X86
| X86_64
| PPC
| PPC64
| Sparc
| Arm
| Mips
| SH
| IA64
| S390
| Alpha
| Hppa
| Rs6000
| M68K
| VAX
deriving (Show,Eq)
getSystemArch :: Arch
#if defined(ARCH_X86)
getSystemArch = X86
#elif defined(ARCH_X86_64)
getSystemArch = X86_64
#elif defined(ARCH_PPC)
getSystemArch = PPC
#elif defined(ARCH_PPC64)
getSystemArch = PPC64
#elif defined(ARCH_SPARC)
getSystemArch = Sparc
#elif defined(ARCH_ARM)
getSystemArch = Arm
#elif defined(ARCH_MIPS)
getSystemArch = Mips
#elif defined(ARCH_SH)
getSystemArch = SH
#elif defined(ARCH_IA64)
getSystemArch = IA64
#elif defined(ARCH_S390)
getSystemArch = S390
#elif defined(ARCH_ALPHA)
getSystemArch = Alpha
#elif defined(ARCH_HPPA)
getSystemArch = Hppa
#elif defined(ARCH_RS6000)
getSystemArch = Rs6000
#elif defined(ARCH_M68K)
getSystemArch = M68K
#elif defined(ARCH_VAX)
getSystemArch = VAX
#else
getSystemArch = undefined
#endif