summaryrefslogtreecommitdiff
path: root/testsuite/tests/rts/T13617.hs
blob: b3c8b35dd34f8bd92ba4c4b97fe180d8f3c4a360 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module Main where

import Foreign
import Foreign.Ptr
import Foreign.C

import Foreign.Marshal.Array

foreign import ccall unsafe "mult" mult :: Ptr CInt -> Ptr CInt
                                        -> CInt -> IO CInt

main = do res <- withArray [1..10] $ \a ->
                 withArray [5..15] $ \b ->
                   mult a b 10
          print res