summaryrefslogtreecommitdiff
path: root/testsuite/tests/ffi/should_run/fptr02.hs
blob: 4691427c3e8a7fc44ff9332e3a8c82ed362ab29c (plain)
1
2
3
4
5
6
7
8
9
10
{-# LANGUAGE ForeignFunctionInterface #-}

module Main where

import Foreign
import Control.Monad

foreign import ccall "&free" pfree :: FunPtr (Ptr a -> IO ())

main = replicateM_ 1000000 $ newForeignPtr pfree nullPtr