hs-duktape-1.0.0: Haskell bindings for a very compact embedded ECMAScript (JavaScript) engine.

Safe HaskellNone
LanguageHaskell2010

Scripting.Duktape.Raw

Synopsis

Documentation

type DukAllocFunction = Ptr () -> CSize -> IO (Ptr ()) Source #

type DukReallocFunction = Ptr () -> Ptr () -> CSize -> IO (Ptr ()) Source #

type DukFreeFunction = Ptr () -> Ptr () -> IO () Source #

newtype InternalUData Source #

Constructors

InternalUData 

Fields

execTimeoutCheck :: DukExecTimeoutCheckFunction Source #

Will always be invoked regularly by duktape runtime but returns false (do not timeout) unless it receives a TimeoutCheck through udata

createGovernedHeap :: FunPtr DukAllocFunction -> FunPtr DukReallocFunction -> FunPtr DukFreeFunction -> TimeoutCheck -> FunPtr DukFatalFunction -> IO (Maybe DuktapeCtx) Source #

A TimeoutCheck is an IO action that returns True when the current script evaluation should timeout (interpreter throws RangeError).