1{-# LANGUAGE CPP, MagicHash #-} 2-- | 3-- Module : Data.Primitive.MachDeps 4-- Copyright : (c) Roman Leshchinskiy 2009-2012 5-- License : BSD-style 6-- 7-- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au> 8-- Portability : non-portable 9-- 10-- Machine-dependent constants 11-- 12 13module Data.Primitive.MachDeps where 14 15#include "MachDeps.h" 16 17import GHC.Exts 18 19sIZEOF_CHAR, 20 aLIGNMENT_CHAR, 21 22 sIZEOF_INT, 23 aLIGNMENT_INT, 24 25 sIZEOF_WORD, 26 aLIGNMENT_WORD, 27 28 sIZEOF_DOUBLE, 29 aLIGNMENT_DOUBLE, 30 31 sIZEOF_FLOAT, 32 aLIGNMENT_FLOAT, 33 34 sIZEOF_PTR, 35 aLIGNMENT_PTR, 36 37 sIZEOF_FUNPTR, 38 aLIGNMENT_FUNPTR, 39 40 sIZEOF_STABLEPTR, 41 aLIGNMENT_STABLEPTR, 42 43 sIZEOF_INT8, 44 aLIGNMENT_INT8, 45 46 sIZEOF_WORD8, 47 aLIGNMENT_WORD8, 48 49 sIZEOF_INT16, 50 aLIGNMENT_INT16, 51 52 sIZEOF_WORD16, 53 aLIGNMENT_WORD16, 54 55 sIZEOF_INT32, 56 aLIGNMENT_INT32, 57 58 sIZEOF_WORD32, 59 aLIGNMENT_WORD32, 60 61 sIZEOF_INT64, 62 aLIGNMENT_INT64, 63 64 sIZEOF_WORD64, 65 aLIGNMENT_WORD64 :: Int 66 67 68sIZEOF_CHAR = SIZEOF_HSCHAR 69aLIGNMENT_CHAR = ALIGNMENT_HSCHAR 70 71sIZEOF_INT = SIZEOF_HSINT 72aLIGNMENT_INT = ALIGNMENT_HSINT 73 74sIZEOF_WORD = SIZEOF_HSWORD 75aLIGNMENT_WORD = ALIGNMENT_HSWORD 76 77sIZEOF_DOUBLE = SIZEOF_HSDOUBLE 78aLIGNMENT_DOUBLE = ALIGNMENT_HSDOUBLE 79 80sIZEOF_FLOAT = SIZEOF_HSFLOAT 81aLIGNMENT_FLOAT = ALIGNMENT_HSFLOAT 82 83sIZEOF_PTR = SIZEOF_HSPTR 84aLIGNMENT_PTR = ALIGNMENT_HSPTR 85 86sIZEOF_FUNPTR = SIZEOF_HSFUNPTR 87aLIGNMENT_FUNPTR = ALIGNMENT_HSFUNPTR 88 89sIZEOF_STABLEPTR = SIZEOF_HSSTABLEPTR 90aLIGNMENT_STABLEPTR = ALIGNMENT_HSSTABLEPTR 91 92sIZEOF_INT8 = SIZEOF_INT8 93aLIGNMENT_INT8 = ALIGNMENT_INT8 94 95sIZEOF_WORD8 = SIZEOF_WORD8 96aLIGNMENT_WORD8 = ALIGNMENT_WORD8 97 98sIZEOF_INT16 = SIZEOF_INT16 99aLIGNMENT_INT16 = ALIGNMENT_INT16 100 101sIZEOF_WORD16 = SIZEOF_WORD16 102aLIGNMENT_WORD16 = ALIGNMENT_WORD16 103 104sIZEOF_INT32 = SIZEOF_INT32 105aLIGNMENT_INT32 = ALIGNMENT_INT32 106 107sIZEOF_WORD32 = SIZEOF_WORD32 108aLIGNMENT_WORD32 = ALIGNMENT_WORD32 109 110sIZEOF_INT64 = SIZEOF_INT64 111aLIGNMENT_INT64 = ALIGNMENT_INT64 112 113sIZEOF_WORD64 = SIZEOF_WORD64 114aLIGNMENT_WORD64 = ALIGNMENT_WORD64 115 116#if WORD_SIZE_IN_BITS == 32 117type Word64_# = Word64# 118type Int64_# = Int64# 119#else 120type Word64_# = Word# 121type Int64_# = Int# 122#endif 123 124