Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
c73d8f07
Commit
c73d8f07
authored
Apr 28, 2006
by
Simon Marlow
Browse files
avoid running out of stack
parent
acc4ba42
Changes
1
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/ccall/should_run/ffi016.hs
View file @
c73d8f07
...
...
@@ -5,6 +5,7 @@ import Foreign.ForeignPtr
import
Foreign
import
GHC.TopHandler
import
Control.Concurrent
import
Data.List
foreign
export
ccall
fin
::
Ptr
Int
->
Ptr
Int
->
IO
()
foreign
import
ccall
"&fin"
finptr
::
FinalizerEnvPtr
Int
Int
...
...
@@ -20,4 +21,4 @@ main = do
a
<-
new
(
55
::
Int
)
env
<-
new
(
66
::
Int
)
fp
<-
newForeignPtrEnv
finptr
env
a
sum
[
1
..
10
00000
]
`
seq
`
return
()
foldl'
(
+
)
0
[
1
..
5
00000
]
`
seq
`
return
()
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