Haddock documentation for HEAD is available.
Add a source-repository-package in the cabal.project file, see
documentation
for details.
Add an extra-deps entry in the stack.yaml file, see
documentation
for details.
Here's an example overlay.
pkgsSelf: pkgsSuper:
let
src = pkgsSelf.fetchFromGitHub {
owner = "tweag";
repo = "inline-js";
rev = "<rev>";
sha256 = pkgsSelf.lib.fakeSha256;
};
in
{
haskellPackages = pkgsSuper.haskellPackages.override {
overrides = self: _: {
inline-js-core = (self.callCabal2nixWithOptions "inline-js-core" src
"--subpath inline-js-core"
{ }).overrideAttrs (_: {
preBuild = ''
substituteInPlace src/Language/JavaScript/Inline/Core/NodePath.hs --replace '"node"' '"${pkgsSelf.nodejs-16_x}/bin/node"'
'';
});
inline-js =
self.callCabal2nixWithOptions "inline-js" src "--subpath inline-js" { };
};
};
}See documentation for details.
- Manage
nodesessions which run the eval server script for Haskell/JavaScript interop - Evaluate expressions with
require()/import()support - Export Haskell functions to async/sync JavaScript functions
- Load third party libraries in user-specified
node_modules - Garbage-collected
JSValreferences in Haskell - Support
Promise-based async evaluation - Type classes for Haskell/JavaScript data marshaling, with
aesonsupport - Template Haskell QuasiQuoters for lifting Haskell variables into JavaScript code
- Doesn't require
nodenative addon or third party libraries
- Integrate with TypeScript compiler, generate Haskell code from TypeScript
.d.tscode - Integrate with headless browser testing frameworks like
playwright/puppeteerfor running JavaScript in browsers
Supported GHC versions:
ghc-8.6, tested withghc-8.6.5ghc-8.8, tested withghc-8.8.4ghc-8.10, tested withghc-8.10.7ghc-9.0, tested withghc-9.0.1
Supported platforms:
- Windows 10 x64, tested with Windows Server 2019
- Linux x64, tested with Ubuntu 20.04
- macOS x64, tested with macOS 10.15
Supported node versions:
node-v10, minimumv10.20.0node-v12and later
See the CI config for details.
inline-js is maintained by Tweag I/O.
Have questions? Need help? Tweet at @tweagio.