0.0.3 • Published 11 months ago
@haskell-org/ghc-compat v0.0.3
Node.js GHC Extensions
Allows Node.js to be invoked as a companion tool by the Glasgow Haskell Compiler (GHC) during the build process.
Use Cases Covered:
- When building modules with the
TemplateHaskellextension enabled, the process involves invokingNode.jsto executeTemplateHaskellexpressions within the targeted environment during the linking phase. The communication protocol betweenGHCand the helper tool, whereNode.jsfunctions as the executor, utilizes unnamed pipes. The behavior of unnamed pipes varies slightly across supported host platforms. OnWindows, in particular, unnamed pipes need to be converted fromHANDLEs to POSIX-compatibleFile Descriptors within the child process.