Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sheaf
GHC
Commits
7752fa54
Commit
7752fa54
authored
6 years ago
by
Ömer Sinan Ağacan
Committed by
Marge Bot
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Minor documentation fix in GHC.ForeignPtr
parent
5544f608
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/base/GHC/ForeignPtr.hs
+3
-5
3 additions, 5 deletions
libraries/base/GHC/ForeignPtr.hs
with
3 additions
and
5 deletions
libraries/base/GHC/ForeignPtr.hs
+
3
−
5
View file @
7752fa54
...
...
@@ -250,7 +250,7 @@ mallocPlainForeignPtrAlignedBytes (I# size) (I# align) = IO $ \s ->
}
addForeignPtrFinalizer
::
FinalizerPtr
a
->
ForeignPtr
a
->
IO
()
-- ^This function adds a finalizer to the given foreign object. The
-- ^
This function adds a finalizer to the given foreign object. The
-- finalizer will run /before/ all other finalizers for the same
-- object which have already been registered.
addForeignPtrFinalizer
(
FunPtr
fp
)
(
ForeignPtr
p
c
)
=
case
c
of
...
...
@@ -269,10 +269,8 @@ addForeignPtrFinalizer (FunPtr fp) (ForeignPtr p c) = case c of
addForeignPtrFinalizerEnv
::
FinalizerEnvPtr
env
a
->
Ptr
env
->
ForeignPtr
a
->
IO
()
-- ^ Like 'addForeignPtrFinalizerEnv' but allows the finalizer to be
-- passed an additional environment parameter to be passed to the
-- finalizer. The environment passed to the finalizer is fixed by the
-- second argument to 'addForeignPtrFinalizerEnv'
-- ^ Like 'addForeignPtrFinalizer' but the finalizer is passed an additional
-- environment parameter.
addForeignPtrFinalizerEnv
(
FunPtr
fp
)
(
Ptr
ep
)
(
ForeignPtr
p
c
)
=
case
c
of
PlainForeignPtr
r
->
insertCFinalizer
r
fp
1
#
ep
p
()
MallocPtr
_
r
->
insertCFinalizer
r
fp
1
#
ep
p
c
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment