summaryrefslogtreecommitdiff
path: root/testsuite/tests/ffi
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2022-09-13 10:22:05 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-09-13 10:27:53 -0400
commit362cca13858faf7e1158273780ea900e7dad5827 (patch)
tree468c06697b2a6ef3f65b79a469a131d279f71deb /testsuite/tests/ffi
parent65a0bd69ac1fb59047cd4c8554a8fc756c7b3476 (diff)
downloadhaskell-362cca13858faf7e1158273780ea900e7dad5827.tar.gz
Diagnostic codes: acccept test changes
The testsuite output now contains diagnostic codes, so many tests need to be updated at once. We decided it was best to keep the diagnostic codes in the testsuite output, so that contributors don't inadvertently make changes to the diagnostic codes.
Diffstat (limited to 'testsuite/tests/ffi')
-rw-r--r--testsuite/tests/ffi/should_compile/T1357.stderr6
-rw-r--r--testsuite/tests/ffi/should_fail/NonreducingFfiSignature.stderr7
-rw-r--r--testsuite/tests/ffi/should_fail/T10461.stderr2
-rw-r--r--testsuite/tests/ffi/should_fail/T16702.stderr8
-rw-r--r--testsuite/tests/ffi/should_fail/T20116.stderr2
-rw-r--r--testsuite/tests/ffi/should_fail/T21305_fail.stderr4
-rw-r--r--testsuite/tests/ffi/should_fail/T3066.stderr2
-rw-r--r--testsuite/tests/ffi/should_fail/T5664.stderr28
-rw-r--r--testsuite/tests/ffi/should_fail/T7243.stderr8
-rw-r--r--testsuite/tests/ffi/should_fail/T7506.stderr14
-rw-r--r--testsuite/tests/ffi/should_fail/capi_value_function.stderr8
-rw-r--r--testsuite/tests/ffi/should_fail/capi_wrapper.stderr2
-rw-r--r--testsuite/tests/ffi/should_fail/ccall_value.stderr2
-rw-r--r--testsuite/tests/ffi/should_fail/ccfail001.stderr10
-rw-r--r--testsuite/tests/ffi/should_fail/ccfail002.stderr12
-rw-r--r--testsuite/tests/ffi/should_fail/ccfail003.stderr20
-rw-r--r--testsuite/tests/ffi/should_fail/ccfail004.stderr10
-rw-r--r--testsuite/tests/ffi/should_fail/ccfail005.stderr16
18 files changed, 81 insertions, 80 deletions
diff --git a/testsuite/tests/ffi/should_compile/T1357.stderr b/testsuite/tests/ffi/should_compile/T1357.stderr
index 9980c89e7a..7a61e35412 100644
--- a/testsuite/tests/ffi/should_compile/T1357.stderr
+++ b/testsuite/tests/ffi/should_compile/T1357.stderr
@@ -1,5 +1,5 @@
-T1357.hs:5:1: warning: [-Wdodgy-foreign-imports (in -Wdefault)]
- possible missing & in foreign import of FunPtr
- When checking declaration:
+T1357.hs:5:1: warning: [GHC-57989] [-Wdodgy-foreign-imports (in -Wdefault)]
+ • possible missing & in foreign import of FunPtr
+ • When checking declaration:
foreign import ccall safe "f" f :: FunPtr (Int -> IO ())
diff --git a/testsuite/tests/ffi/should_fail/NonreducingFfiSignature.stderr b/testsuite/tests/ffi/should_fail/NonreducingFfiSignature.stderr
index 22a6c7dc26..880e167232 100644
--- a/testsuite/tests/ffi/should_fail/NonreducingFfiSignature.stderr
+++ b/testsuite/tests/ffi/should_fail/NonreducingFfiSignature.stderr
@@ -1,6 +1,7 @@
-NonreducingFfiSignature.hs:12:1:
- Unacceptable result type in foreign declaration:
+
+NonreducingFfiSignature.hs:12:1: error: [GHC-89401]
+ • Unacceptable result type in foreign declaration:
‘Foo Int’ cannot be marshalled in a foreign call
- When checking declaration:
+ • When checking declaration:
foreign import ccall safe "math.h pow" c_pow
:: CDouble -> CDouble -> Foo Int
diff --git a/testsuite/tests/ffi/should_fail/T10461.stderr b/testsuite/tests/ffi/should_fail/T10461.stderr
index 47df47b97f..cbdac0bb19 100644
--- a/testsuite/tests/ffi/should_fail/T10461.stderr
+++ b/testsuite/tests/ffi/should_fail/T10461.stderr
@@ -1,5 +1,5 @@
-T10461.hs:6:1: error:
+T10461.hs:6:1: error: [GHC-10964]
• Unacceptable result type in foreign declaration:
‘Word#’ cannot be marshalled in a foreign call
UnliftedFFITypes is required to marshal unlifted types
diff --git a/testsuite/tests/ffi/should_fail/T16702.stderr b/testsuite/tests/ffi/should_fail/T16702.stderr
index 2ab7c751d0..e407fed1a9 100644
--- a/testsuite/tests/ffi/should_fail/T16702.stderr
+++ b/testsuite/tests/ffi/should_fail/T16702.stderr
@@ -1,5 +1,5 @@
-T16702.hs:12:1: error:
+T16702.hs:12:1: error: [GHC-92994]
• Unacceptable result type in foreign declaration:
Unexpected nested forall
• When checking declaration:
@@ -7,21 +7,21 @@ T16702.hs:12:1: error:
:: CDouble
-> forall (a :: Type). CDouble -> forall (b :: Type). CDouble
-T16702.hs:17:1: error:
+T16702.hs:17:1: error: [GHC-92994]
• Unacceptable result type in foreign declaration:
Unexpected nested forall
• When checking declaration:
foreign import ccall safe "malloc" malloc1
:: CSize -> forall a. IO (Ptr a)
-T16702.hs:20:1: error:
+T16702.hs:20:1: error: [GHC-89401]
• Unacceptable argument type in foreign declaration:
‘Show a’ cannot be marshalled in a foreign call
• When checking declaration:
foreign import ccall safe "malloc" malloc2
:: Show a => CSize -> IO (Ptr a)
-T16702.hs:23:1: error:
+T16702.hs:23:1: error: [GHC-89401]
• Unacceptable argument type in foreign declaration:
‘Show a’ cannot be marshalled in a foreign call
• When checking declaration:
diff --git a/testsuite/tests/ffi/should_fail/T20116.stderr b/testsuite/tests/ffi/should_fail/T20116.stderr
index dbc06bf9a0..1c2422bcc8 100644
--- a/testsuite/tests/ffi/should_fail/T20116.stderr
+++ b/testsuite/tests/ffi/should_fail/T20116.stderr
@@ -1,5 +1,5 @@
-T20116.hs:8:1: error:
+T20116.hs:8:1: error: [GHC-49692]
• `foreign import prim' requires GHCForeignImportPrim.
• When checking declaration:
foreign import prim safe "test_lt" lt_s :: Int64# -> Int64# -> Int#
diff --git a/testsuite/tests/ffi/should_fail/T21305_fail.stderr b/testsuite/tests/ffi/should_fail/T21305_fail.stderr
index fae7053d9f..542d401167 100644
--- a/testsuite/tests/ffi/should_fail/T21305_fail.stderr
+++ b/testsuite/tests/ffi/should_fail/T21305_fail.stderr
@@ -1,5 +1,5 @@
-T21305_fail.hs:7:1: error:
+T21305_fail.hs:7:1: error: [GHC-64097]
• Unacceptable argument type in foreign declaration:
Expected kind ‘Type’ or ‘UnliftedType’,
but ‘Any’ has kind ‘TYPE ('BoxedRep l)’
@@ -7,7 +7,7 @@ T21305_fail.hs:7:1: error:
foreign import prim safe "g" g
:: forall (l :: Levity). Any @(TYPE (BoxedRep l)) -> Any
-T21305_fail.hs:9:1: error:
+T21305_fail.hs:9:1: error: [GHC-64097]
• Unacceptable argument type in foreign declaration:
Expected kind ‘Type’ or ‘UnliftedType’,
but ‘Any’ has kind ‘TYPE 'IntRep’
diff --git a/testsuite/tests/ffi/should_fail/T3066.stderr b/testsuite/tests/ffi/should_fail/T3066.stderr
index 280905136a..8923162029 100644
--- a/testsuite/tests/ffi/should_fail/T3066.stderr
+++ b/testsuite/tests/ffi/should_fail/T3066.stderr
@@ -1,5 +1,5 @@
-T3066.hs:7:1: error:
+T3066.hs:7:1: error: [GHC-31136]
• Unacceptable argument type in foreign declaration:
‘forall u. Ptr ()’ is not a data type
• When checking declaration:
diff --git a/testsuite/tests/ffi/should_fail/T5664.stderr b/testsuite/tests/ffi/should_fail/T5664.stderr
index c1652c2288..9af431626f 100644
--- a/testsuite/tests/ffi/should_fail/T5664.stderr
+++ b/testsuite/tests/ffi/should_fail/T5664.stderr
@@ -1,16 +1,16 @@
-T5664.hs:15:1:
- Unacceptable argument type in foreign declaration:
- Expected: Ptr/FunPtr (Int32 -> IO ()),
- Actual: FunPtr (D -> IO ())
- When checking declaration:
- foreign import ccall safe "dynamic" mkFun3
- :: FunPtr (D -> IO ()) -> CInt -> IO ()
+T5664.hs:15:1: error: [GHC-27555]
+ • Unacceptable argument type in foreign declaration:
+ Expected: Ptr/FunPtr (Int32 -> IO ()),
+ Actual: FunPtr (D -> IO ())
+ • When checking declaration:
+ foreign import ccall safe "dynamic" mkFun3
+ :: FunPtr (D -> IO ()) -> CInt -> IO ()
-T5664.hs:24:1:
- Unacceptable result type in foreign declaration:
- Expected: Ptr/FunPtr (IO Int32),
- Actual: FunPtr (IO D)
- When checking declaration:
- foreign import ccall safe "wrapper" mkCallBack3
- :: IO CInt -> IO (FunPtr (IO D))
+T5664.hs:24:1: error: [GHC-27555]
+ • Unacceptable result type in foreign declaration:
+ Expected: Ptr/FunPtr (IO Int32),
+ Actual: FunPtr (IO D)
+ • When checking declaration:
+ foreign import ccall safe "wrapper" mkCallBack3
+ :: IO CInt -> IO (FunPtr (IO D))
diff --git a/testsuite/tests/ffi/should_fail/T7243.stderr b/testsuite/tests/ffi/should_fail/T7243.stderr
index 727ae0f653..c00c085d74 100644
--- a/testsuite/tests/ffi/should_fail/T7243.stderr
+++ b/testsuite/tests/ffi/should_fail/T7243.stderr
@@ -1,5 +1,5 @@
-T7243.hs:4:1:
- Unacceptable type in foreign declaration: One argument expected
- When checking declaration:
- foreign import ccall safe "wrapper" foo :: IO (FunPtr ())
+T7243.hs:4:1: error: [GHC-91490]
+ • Unacceptable type in foreign declaration: One argument expected
+ • When checking declaration:
+ foreign import ccall safe "wrapper" foo :: IO (FunPtr ())
diff --git a/testsuite/tests/ffi/should_fail/T7506.stderr b/testsuite/tests/ffi/should_fail/T7506.stderr
index 9a1aa25a8e..c2a70ff345 100644
--- a/testsuite/tests/ffi/should_fail/T7506.stderr
+++ b/testsuite/tests/ffi/should_fail/T7506.stderr
@@ -1,8 +1,8 @@
-T7506.hs:6:1:
- Unacceptable type in foreign declaration:
- ‘Int -> IO ()’ cannot be marshalled in a foreign call
- A foreign-imported address (via &foo) must have type (Ptr a) or (FunPtr a)
- When checking declaration:
- foreign import ccall safe "stdio.h &putchar" c_putchar
- :: Int -> IO ()
+T7506.hs:6:1: error: [GHC-26070]
+ • Unacceptable type in foreign declaration:
+ ‘Int -> IO ()’ cannot be marshalled in a foreign call
+ A foreign-imported address (via &foo) must have type (Ptr a) or (FunPtr a)
+ • When checking declaration:
+ foreign import ccall safe "stdio.h &putchar" c_putchar
+ :: Int -> IO ()
diff --git a/testsuite/tests/ffi/should_fail/capi_value_function.stderr b/testsuite/tests/ffi/should_fail/capi_value_function.stderr
index 6732c5c2da..0d63ec7b4e 100644
--- a/testsuite/tests/ffi/should_fail/capi_value_function.stderr
+++ b/testsuite/tests/ffi/should_fail/capi_value_function.stderr
@@ -1,5 +1,5 @@
-capi_value_function.hs:8:1:
- `value' imports cannot have function types
- When checking declaration:
- foreign import capi safe "math.h value sqrt" f :: CInt -> CInt
+capi_value_function.hs:8:1: error: [GHC-76251]
+ • `value' imports cannot have function types
+ • When checking declaration:
+ foreign import capi safe "math.h value sqrt" f :: CInt -> CInt
diff --git a/testsuite/tests/ffi/should_fail/capi_wrapper.stderr b/testsuite/tests/ffi/should_fail/capi_wrapper.stderr
index 607e228ddd..4a763269f8 100644
--- a/testsuite/tests/ffi/should_fail/capi_wrapper.stderr
+++ b/testsuite/tests/ffi/should_fail/capi_wrapper.stderr
@@ -1,3 +1,3 @@
-capi_wrapper.hs:4:21: error:
+capi_wrapper.hs:4:21: error: [GHC-72744]
Wrapper stubs can't be used with CApiFFI.
diff --git a/testsuite/tests/ffi/should_fail/ccall_value.stderr b/testsuite/tests/ffi/should_fail/ccall_value.stderr
index b7e870f0ed..b449d33fad 100644
--- a/testsuite/tests/ffi/should_fail/ccall_value.stderr
+++ b/testsuite/tests/ffi/should_fail/ccall_value.stderr
@@ -1,2 +1,2 @@
-ccall_value.hs:11:22: Malformed entity string
+ccall_value.hs:11:22: error: [GHC-26204] Malformed entity string
diff --git a/testsuite/tests/ffi/should_fail/ccfail001.stderr b/testsuite/tests/ffi/should_fail/ccfail001.stderr
index 01c7ea5d15..f160066e64 100644
--- a/testsuite/tests/ffi/should_fail/ccfail001.stderr
+++ b/testsuite/tests/ffi/should_fail/ccfail001.stderr
@@ -1,6 +1,6 @@
-ccfail001.hs:10:1:
- Unacceptable result type in foreign declaration:
- ‘State# RealWorld’ cannot be marshalled in a foreign call
- When checking declaration:
- foreign import ccall safe foo :: Int -> State# RealWorld
+ccfail001.hs:10:1: error: [GHC-89401]
+ • Unacceptable result type in foreign declaration:
+ ‘State# RealWorld’ cannot be marshalled in a foreign call
+ • When checking declaration:
+ foreign import ccall safe foo :: Int -> State# RealWorld
diff --git a/testsuite/tests/ffi/should_fail/ccfail002.stderr b/testsuite/tests/ffi/should_fail/ccfail002.stderr
index c3c04e25d5..abe495a6c8 100644
--- a/testsuite/tests/ffi/should_fail/ccfail002.stderr
+++ b/testsuite/tests/ffi/should_fail/ccfail002.stderr
@@ -1,7 +1,7 @@
-ccfail002.hs:10:1:
- Unacceptable result type in foreign declaration:
- ‘(# Int#, Int#, Int# #)’ cannot be marshalled in a foreign call
- When checking declaration:
- foreign import ccall unsafe "foo" foo
- :: Int# -> Int# -> Int# -> (# Int#, Int#, Int# #)
+ccfail002.hs:10:1: error: [GHC-89401]
+ • Unacceptable result type in foreign declaration:
+ ‘(# Int#, Int#, Int# #)’ cannot be marshalled in a foreign call
+ • When checking declaration:
+ foreign import ccall unsafe "foo" foo
+ :: Int# -> Int# -> Int# -> (# Int#, Int#, Int# #)
diff --git a/testsuite/tests/ffi/should_fail/ccfail003.stderr b/testsuite/tests/ffi/should_fail/ccfail003.stderr
index 6afdd7678f..9f82542199 100644
--- a/testsuite/tests/ffi/should_fail/ccfail003.stderr
+++ b/testsuite/tests/ffi/should_fail/ccfail003.stderr
@@ -1,12 +1,12 @@
-ccfail003.hs:7:1:
- Unacceptable argument type in foreign declaration:
- ‘Int#’ cannot be marshalled in a foreign call
- When checking declaration:
- foreign export ccall "foo" foo :: Int# -> IO ()
+ccfail003.hs:7:1: error: [GHC-89401]
+ • Unacceptable argument type in foreign declaration:
+ ‘Int#’ cannot be marshalled in a foreign call
+ • When checking declaration:
+ foreign export ccall "foo" foo :: Int# -> IO ()
-ccfail003.hs:10:1:
- Unacceptable result type in foreign declaration:
- ‘Int#’ cannot be marshalled in a foreign call
- When checking declaration:
- foreign export ccall "bar" bar :: Int -> Int#
+ccfail003.hs:10:1: error: [GHC-89401]
+ • Unacceptable result type in foreign declaration:
+ ‘Int#’ cannot be marshalled in a foreign call
+ • When checking declaration:
+ foreign export ccall "bar" bar :: Int -> Int#
diff --git a/testsuite/tests/ffi/should_fail/ccfail004.stderr b/testsuite/tests/ffi/should_fail/ccfail004.stderr
index f10945d510..b597a6d73e 100644
--- a/testsuite/tests/ffi/should_fail/ccfail004.stderr
+++ b/testsuite/tests/ffi/should_fail/ccfail004.stderr
@@ -1,5 +1,5 @@
-ccfail004.hs:9:1: error:
+ccfail004.hs:9:1: error: [GHC-72317]
• Unacceptable argument type in foreign declaration:
‘NInt’ cannot be marshalled in a foreign call
because its data constructor is not in scope
@@ -7,7 +7,7 @@ ccfail004.hs:9:1: error:
foreign import ccall safe f1 :: NInt -> IO Int
Suggested fix: Import the data constructor to bring it into scope
-ccfail004.hs:10:1: error:
+ccfail004.hs:10:1: error: [GHC-72317]
• Unacceptable result type in foreign declaration:
‘NInt’ cannot be marshalled in a foreign call
because its data constructor is not in scope
@@ -15,7 +15,7 @@ ccfail004.hs:10:1: error:
foreign import ccall safe f2 :: Int -> IO NInt
Suggested fix: Import the data constructor to bring it into scope
-ccfail004.hs:11:1: error:
+ccfail004.hs:11:1: error: [GHC-72317]
• Unacceptable result type in foreign declaration:
‘NIO Int’ cannot be marshalled in a foreign call
because the data constructor for ‘NIO’ is not in scope
@@ -23,13 +23,13 @@ ccfail004.hs:11:1: error:
foreign import ccall safe f3 :: Int -> NIO Int
Suggested fix: Import the data constructor to bring it into scope
-ccfail004.hs:14:1: error:
+ccfail004.hs:14:1: error: [GHC-89401]
• Unacceptable argument type in foreign declaration:
‘[NT]’ cannot be marshalled in a foreign call
• When checking declaration:
foreign import ccall safe f4 :: NT -> IO ()
-ccfail004.hs:15:1: error:
+ccfail004.hs:15:1: error: [GHC-89401]
• Unacceptable result type in foreign declaration:
‘[NT]’ cannot be marshalled in a foreign call
• When checking declaration: foreign import ccall safe f5 :: IO NT
diff --git a/testsuite/tests/ffi/should_fail/ccfail005.stderr b/testsuite/tests/ffi/should_fail/ccfail005.stderr
index d5e2a27901..676d2410e2 100644
--- a/testsuite/tests/ffi/should_fail/ccfail005.stderr
+++ b/testsuite/tests/ffi/should_fail/ccfail005.stderr
@@ -1,10 +1,10 @@
-ccfail005.hs:14:1:
- Unacceptable argument type in foreign declaration:
- ‘D’ cannot be marshalled in a foreign call
- When checking declaration: foreign import ccall safe f1 :: F Bool
+ccfail005.hs:14:1: error: [GHC-89401]
+ • Unacceptable argument type in foreign declaration:
+ ‘D’ cannot be marshalled in a foreign call
+ • When checking declaration: foreign import ccall safe f1 :: F Bool
-ccfail005.hs:15:1:
- Unacceptable result type in foreign declaration:
- ‘D’ cannot be marshalled in a foreign call
- When checking declaration: foreign import ccall safe f2 :: F Char
+ccfail005.hs:15:1: error: [GHC-89401]
+ • Unacceptable result type in foreign declaration:
+ ‘D’ cannot be marshalled in a foreign call
+ • When checking declaration: foreign import ccall safe f2 :: F Char