hs-duktape (hackage):   [Index] [Quick Jump]  Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.  Package maintainers  For package maintainers and hackage trustees  Candidates         Haskell bindings for duktape, a very compact embedded ECMAScript (JavaScript) engine.  Here's a simple REPL example:  Aeson's Value type is used for exchanging values between Haskell and ECMAScript. lens-aeson is a good library for working with Value, um, values.  You can also call functions that are on the global object (or any object that's on the global object):  And expose Haskell functions (same as with calls: set on global or a property of global):  The functions must be of type IO (), IO Value, Value -> IO Value, Value -> Value -> IO Value... and so on. (Or with any ToJSON/FromJSON values instead of Value)  Instead of createDuktapeCtx, you can use createGovernedHeap to enforce termination via a timeout:  Note: The duktape configure script invoked by Cabal/Stack requires python 2 with the PyYAML library installed. pip install PyYAML is one way to achieve this.  Use stack to build.  Please feel free to submit pull requests!  By participating in this project you agree to follow the Contributor Code of Conduct.  The list of contributors is available on GitHub.  Licensed under the MIT license (see to the LICENSE file). Haskell bindings: Copyright (c) 2015-2018 Greg V greg@unrelenting.technology Duktape: Copyright (c) 2013-2016 by Duktape authors (see duktape/AUTHORS.rst)
Keywords: library|mit|web