Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,325
Issues
4,325
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
377
Merge Requests
377
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
d6ff372f
Commit
d6ff372f
authored
Apr 03, 2012
by
pcapriotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add testcase for
#5664
.
parent
47c2cb0c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
testsuite/tests/ffi/should_fail/T5664.hs
testsuite/tests/ffi/should_fail/T5664.hs
+25
-0
testsuite/tests/ffi/should_fail/T5664.stderr
testsuite/tests/ffi/should_fail/T5664.stderr
+13
-0
testsuite/tests/ffi/should_fail/all.T
testsuite/tests/ffi/should_fail/all.T
+1
-0
No files found.
testsuite/tests/ffi/should_fail/T5664.hs
0 → 100644
View file @
d6ff372f
module
T5664
where
import
Foreign
import
Foreign.C
data
D
=
D
newtype
I
=
I
CInt
foreign
import
ccall
"dynamic"
mkFun1
::
FunPtr
(
CInt
->
IO
()
)
->
CInt
->
IO
()
foreign
import
ccall
"dynamic"
mkFun2
::
FunPtr
(
I
->
IO
()
)
->
CInt
->
IO
()
foreign
import
ccall
"dynamic"
mkFun3
::
FunPtr
(
D
->
IO
()
)
->
CInt
->
IO
()
foreign
import
ccall
"wrapper"
mkCallBack1
::
IO
CInt
->
IO
(
FunPtr
(
IO
CInt
))
foreign
import
ccall
"wrapper"
mkCallBack2
::
IO
CInt
->
IO
(
FunPtr
(
IO
I
))
foreign
import
ccall
"wrapper"
mkCallBack3
::
IO
CInt
->
IO
(
FunPtr
(
IO
D
))
testsuite/tests/ffi/should_fail/T5664.stderr
0 → 100644
View file @
d6ff372f
T5664.hs:15:1:
Unacceptable argument type in foreign declaration:
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: IO (FunPtr (IO D))
When checking declaration:
foreign import ccall safe "wrapper" mkCallBack3
:: IO CInt -> IO (FunPtr (IO D))
testsuite/tests/ffi/should_fail/all.T
View file @
d6ff372f
...
@@ -10,3 +10,4 @@ test('ccfail004', only_compiler_types(['ghc']), multimod_compile_fail, ['ccfail0
...
@@ -10,3 +10,4 @@ test('ccfail004', only_compiler_types(['ghc']), multimod_compile_fail, ['ccfail0
test
('
ccfail005
',
only_compiler_types
(['
ghc
']),
compile_fail
,
[''])
test
('
ccfail005
',
only_compiler_types
(['
ghc
']),
compile_fail
,
[''])
test
('
ccall_value
',
normal
,
compile_fail
,
[''])
test
('
ccall_value
',
normal
,
compile_fail
,
[''])
test
('
capi_value_function
',
normal
,
compile_fail
,
[''])
test
('
capi_value_function
',
normal
,
compile_fail
,
[''])
test
('
T5664
',
normal
,
compile_fail
,
['
-v0
'])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment