Commit 78c91301 authored by Simon Marlow's avatar Simon Marlow
Browse files

add test for #3319

parent 73fad543
{-# 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 ()
T3319.hs:1:0: Splicing declarations
CCall Unsafe "&" (mkName "foo") (AppT (ConT 'Ptr) (ConT '())))]
foreign import ccall unsafe "static &foo" foo :: Ptr GHC.Unit.()
......@@ -145,3 +145,4 @@ test('TH_pragma',
test('T3177', normal, compile, ['-v0'])
test('T3177a', normal, compile_fail, ['-v0'])
test('T3319', normal, compile, ['-ddump-splices -v0'])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment