Commit f1b395c2 authored by Ian Lynagh's avatar Ian Lynagh

Add a couple more cases to ccfail004

parent 1e3708f4
......@@ -3,8 +3,14 @@ module Ccfail004 where
import Ccfail004A
-- Both these should be rejected as the NInt constructor isn't in scope
newtype NT = NT [NT]
-- All these should be rejected as the newtype constructors aren't in scope
foreign import ccall f1 :: NInt -> IO Int
foreign import ccall f2 :: Int -> IO NInt
foreign import ccall f3 :: Int -> NIO Int
-- Both these should be rejected as NT is recursive
foreign import ccall f4 :: NT -> IO ()
foreign import ccall f5 :: IO NT
ccfail004.hs:7:1:
ccfail004.hs:9:1:
Unacceptable argument type in foreign declaration: NInt
When checking declaration:
foreign import ccall safe "static f1" f1 :: NInt -> IO Int
ccfail004.hs:8:1:
ccfail004.hs:10:1:
Unacceptable result type in foreign declaration: IO NInt
When checking declaration:
foreign import ccall safe "static f2" f2 :: Int -> IO NInt
ccfail004.hs:9:1:
ccfail004.hs:11:1:
Unacceptable result type in foreign declaration: NIO Int
When checking declaration:
foreign import ccall safe "static f3" f3 :: Int -> NIO Int
ccfail004.hs:14:1:
Unacceptable argument type in foreign declaration: [NT]
When checking declaration:
foreign import ccall safe "static f4" f4 :: NT -> IO ()
ccfail004.hs:15:1:
Unacceptable result type in foreign declaration: IO [NT]
When checking declaration:
foreign import ccall safe "static f5" f5 :: IO NT
Markdown is supported
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