Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
1e3708f4
Commit
1e3708f4
authored
Sep 30, 2011
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add another case to cc015
parent
8a051fca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
testsuite/tests/ffi/should_compile/cc015.hs
testsuite/tests/ffi/should_compile/cc015.hs
+6
-0
No files found.
testsuite/tests/ffi/should_compile/cc015.hs
View file @
1e3708f4
...
...
@@ -3,6 +3,8 @@
module
Cc015
where
import
Foreign.C
type
S
a
=
a
type
IOS
a
=
IO
a
...
...
@@ -15,6 +17,7 @@ newtype G1F = G1F (F (S Int))
newtype
G2
=
G2
Char
newtype
G3
=
G3
(
IO
Int
)
newtype
G4
=
G4
G3
newtype
NIO
a
=
NIO
(
IO
a
)
-- Type synonyms should be transparent to the typechecker
foreign
import
ccall
f1
::
S
Int
->
IOS
Int
...
...
@@ -28,4 +31,7 @@ foreign export ccall "g3" f3 :: G1 -> G2 -> G4
-- And a combination
foreign
import
ccall
f4
::
G1F
->
F
Bool
->
S
G4
foreign
export
ccall
"g4"
f4
::
G1F
->
F
Bool
->
S
G4
-- And a newtyped IO
foreign
import
ccall
f5
::
NIO
Int
foreign
export
ccall
"g5"
f5
::
NIO
Int
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