0 | module Prim.Array
  1 |
  2 | import System.FFI
  3 |
  4 | import Prim.Lib
  5 |
  6 | export
  7 | %foreign (lib "get_array_char")
  8 | prim__getArrayChar : Ptr Char -> Bits64 -> Char
  9 |
 10 | export
 11 | %foreign (lib "get_array_char_ptr")
 12 | prim__getArrayString : Ptr String -> Bits64 -> String
 13 |
 14 | export
 15 | %foreign (lib "get_array_bool")
 16 | prim__getArrayBool : Ptr Bool -> Bits64 -> Bool
 17 |
 18 | export
 19 | %foreign (lib "get_array_int8_t")
 20 | prim__getArrayInt8 : Ptr Int8 -> Bits64 -> Int8
 21 |
 22 | export
 23 | %foreign (lib "get_array_int16_t")
 24 | prim__getArrayInt16 : Ptr Int16 -> Bits64 -> Int16
 25 |
 26 | export
 27 | %foreign (lib "get_array_int32_t")
 28 | prim__getArrayInt32 : Ptr Int32 -> Bits64 -> Int32
 29 |
 30 | export
 31 | %foreign (lib "get_array_int64_t")
 32 | prim__getArrayInt64 : Ptr Int64 -> Bits64 -> Int64
 33 |
 34 | export
 35 | %foreign (lib "get_array_uint8_t")
 36 | prim__getArrayBits8 : Ptr Bits8 -> Bits64 -> Bits8
 37 |
 38 | export
 39 | %foreign (lib "get_array_uint16_t")
 40 | prim__getArrayBits16 : Ptr Bits16 -> Bits64 -> Bits16
 41 |
 42 | export
 43 | %foreign (lib "get_array_uint32_t")
 44 | prim__getArrayBits32 : Ptr Bits32 -> Bits64 -> Bits32
 45 |
 46 | export
 47 | %foreign (lib "get_array_uint64_t")
 48 | prim__getArrayBits64 : Ptr Bits64 -> Bits64 -> Bits64
 49 |
 50 | export
 51 | %foreign (lib "get_array_double")
 52 | prim__getArrayDouble : Ptr Double -> Bits64 -> Double
 53 |
 54 | export
 55 | %foreign (lib "set_array_char")
 56 | prim__setArrayChar : Ptr Char -> Bits64 -> Char -> PrimIO ()
 57 |
 58 | export
 59 | %foreign (lib "set_array_char_ptr")
 60 | prim__setArrayString : Ptr String -> Bits64 -> String -> PrimIO ()
 61 |
 62 | export
 63 | %foreign (lib "set_array_bool")
 64 | prim__setArrayBool : Ptr Bool -> Bits64 -> Bool -> PrimIO ()
 65 |
 66 | export
 67 | %foreign (lib "set_array_int8_t")
 68 | prim__setArrayInt8 : Ptr Int8 -> Bits64 -> Int8 -> PrimIO ()
 69 |
 70 | export
 71 | %foreign (lib "set_array_int16_t")
 72 | prim__setArrayInt16 : Ptr Int16 -> Bits64 -> Int16 -> PrimIO ()
 73 |
 74 | export
 75 | %foreign (lib "set_array_int32_t")
 76 | prim__setArrayInt32 : Ptr Int32 -> Bits64 -> Int32 -> PrimIO ()
 77 |
 78 | export
 79 | %foreign (lib "set_array_int64_t")
 80 | prim__setArrayInt64 : Ptr Int64 -> Bits64 -> Int64 -> PrimIO ()
 81 |
 82 | export
 83 | %foreign (lib "set_array_uint8_t")
 84 | prim__setArrayBits8 : Ptr Bits8 -> Bits64 -> Bits8 -> PrimIO ()
 85 |
 86 | export
 87 | %foreign (lib "set_array_uint16_t")
 88 | prim__setArrayBits16 : Ptr Bits16 -> Bits64 -> Bits16 -> PrimIO ()
 89 |
 90 | export
 91 | %foreign (lib "set_array_uint32_t")
 92 | prim__setArrayBits32 : Ptr Bits32 -> Bits64 -> Bits32 -> PrimIO ()
 93 |
 94 | export
 95 | %foreign (lib "set_array_uint64_t")
 96 | prim__setArrayBits64 : Ptr Bits64 -> Bits64 -> Bits64 -> PrimIO ()
 97 |
 98 | export
 99 | %foreign (lib "set_array_double")
100 | prim__setArrayDouble : Ptr Double -> Bits64 -> Double -> PrimIO ()
101 |