T3319.hs 306 Bytes
Newer Older
Simon Marlow's avatar
Simon Marlow committed
1 2 3 4 5 6 7 8 9 10 11
{-# LANGUAGE TemplateHaskell,ForeignFunctionInterface #-}

module T3319 where

import Foreign.Ptr
import Language.Haskell.TH

$(return [ForeignD (ImportF CCall Unsafe "&" (mkName "foo") (AppT (ConT ''Ptr) (ConT ''())))])

-- Should generate the same as this:
foreign import ccall unsafe "&" foo1 :: Ptr ()