HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleunix-2.8.7.0Haskell2010

System.Posix.DynamicLinker.Prim

dlopen(3) and friends Derived from GModule.chs by M.Weber & M.Chakravarty which is part of c2hs. I left the API more or less the same, mostly the flags are different.

  • 2 types
  • 8 values
  • Packageunix-2.8.7.0
  • Exports10
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourcePrim.hsc

low level API

10 declarations
valuehaveRtldNext :: Bool
#

On some hosts (e.g. SuSe and Ubuntu Linux) RTLD_NEXT (and RTLD_DEFAULT) are not visible without setting the macro _GNU_SOURCE. Since we don't want to define this macro, you can use the function haveRtldNext to check whether the flag Next is available. Ideally, this will be optimized by the compiler so that it should be as efficient as an #ifdef.

If you fail to test the flag and use it although it is undefined, packDL will throw an error.