- Support for asynchronous execution added in module
Python.Inline.Async. It uses API modelled afterasyncpackage. Such computations could be interrupted usingcancelPyeven when they're running python code or haskell callback/ - When threaded runtime is used
runPyInMaincould be reliably interrupted by asynchronous exceptions. - Python module
inline_pythonis now available. It contains exception types used by library:AsyncCancelledandHaskellErrorwhich wraps haskell exception from callback. Python.Inline.MonadandPython.Inline.Monad.QQmodules providing monadic API. It usesMonadPytype class which allows user code to carry around python dictionaries with global and local scopes.- Package now uses
Custombuild type. It now supports configuring python usingpython3-configinstead ofpkg-configwhen-fpython3-configmanual cabal flag is set. Default behavior is unchanged. - Haskell exception raised in haskell callback will be rethrown if not caught by
python instead of being converted to
PyError. - Memory leak in exception handling is fixed. Python exception object were never freed when exception propagated to haskell side.
From/ToPyinstance forInteger&Naturaladded.vector-0.13.2is required.- Python>=3.10 is supported. Boolean marshaling with python<3.12 is fixed. Previously it caused crashes on counter decrement.
- Documentation fixes.
FromPy/ToPyinstances added for:Complex, both strict and lazyText&ByteString,ShortByteString,Maybe a.- Module
Python.Inline.Evaladded which support for eval/exec with user supplied global and local variables. - QuasiQuotes
Python.Inline.QQ.pycodeadded for creatingPyQuotedata type.
- Crash of python's main thread when one attempts to interrupt it fixed.
- Number of deadlocks in
runPyInMainfixed:- It no longer deadlocks if exception is thrown
- Nested calls no longer deadlock.
- Calling it from python callback.
ToPyinstance added forPy b,a -> Py b,a1 -> a2 -> Py b
Initial release