summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2022-04-22 23:50:59 +0200
committerTom Smeding <tom@tomsmeding.com>2022-04-22 23:50:59 +0200
commit6080ed0182e65d9cd51b9a1d7209ff82a5e41fa5 (patch)
tree89015f361fae6b8e7555ade239b6ff2179d24658 /src
parent84a8967044dc5b8879033a07f5ba7940852510d9 (diff)
Only works from ghc 8.10 onwards
Diffstat (limited to 'src')
-rw-r--r--src/GHC/GC_Hook.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/GHC/GC_Hook.hs b/src/GHC/GC_Hook.hs
index b3e1947..250441c 100644
--- a/src/GHC/GC_Hook.hs
+++ b/src/GHC/GC_Hook.hs
@@ -1,3 +1,7 @@
+{-|
+Make use of GHC's GC hook functionality from Haskell. This is still a very
+bare-bones API.
+-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TypeApplications #-}
@@ -109,8 +113,9 @@ enableGClogging yes = c_gchook_enable_logging (CBool (if yes then 1 else 0))
-- | Set a C function to be called after every GC. Use this in the following manner:
--
-- * Create a file @cbits/something.c@ in your project (the actual file name
--- doesn't matter), and add @c-sources: cbits/something.c@ to the stanza of
--- the correct component in your .cabal file.
+-- doesn't matter), and add @c-sources: cbits/something.c@ (and, if you wish,
+-- @cc-options: -Wall@) to the stanza of the correct component in your .cabal
+-- file.
-- * Put the following in it: (The function names are unimportant.)
--
-- > #include "Rts.h"