GHC.Linker.Unit

ghc-9.14.0.20251028: The GHC API

Safe Haskell | None
Language | GHC2021

GHC.Linker.Unit

Description

Linking Haskell units

Synopsis

- data UnitLinkOpts = UnitLinkOpts {
  - hsLibs :: [String]
  - extraLibs :: [String]
  - otherFlags :: [String]
  }
- collectLinkOpts :: GhcNameVersion -> Ways -> [UnitInfo] -> UnitLinkOpts
- collectArchives :: GhcNameVersion -> Ways -> UnitInfo -> IO [FilePath]
- getUnitLinkOpts :: GhcNameVersion -> Ways -> UnitEnv -> [UnitId] -> IO UnitLinkOpts
- getLibs :: GhcNameVersion -> Ways -> UnitEnv -> [UnitId] -> IO [(String, String)]

# Documentation

data UnitLinkOpts Source #

Linker flags collected from units

Constructors

UnitLinkOpts |
Fields hsLibs :: [String] Haskell libraries (as a list of "-lHSfoo...") extraLibs :: [String] External libraries (as a list of "-lfoo...") otherFlags :: [String] Extra linker options

#### Instances

Instances details

Show UnitLinkOpts Source # |
Instance details Defined in GHC.Linker.Unit Methods showsPrec :: Int -> UnitLinkOpts -> ShowS Source # show :: UnitLinkOpts -> String Source # showList :: [UnitLinkOpts] -> ShowS Source #

collectLinkOpts :: GhcNameVersion -> Ways -> [UnitInfo] -> UnitLinkOpts Source #

collectArchives :: GhcNameVersion -> Ways -> UnitInfo -> IO [FilePath] Source #

getUnitLinkOpts :: GhcNameVersion -> Ways -> UnitEnv -> [UnitId] -> IO UnitLinkOpts Source #

Find all the link options in these and the preload packages, returning (package hs lib options, extra library options, other flags)

getLibs :: GhcNameVersion -> Ways -> UnitEnv -> [UnitId] -> IO [(String, String)] Source #