diff --git a/src/Extism/HostFunction.hs b/src/Extism/HostFunction.hs index bb47439..6ecad41 100644 --- a/src/Extism/HostFunction.hs +++ b/src/Extism/HostFunction.hs @@ -226,22 +226,22 @@ hostFunctionWithNamespace' ns name params results f v = nparams = fromIntegral $ length params nresults = fromIntegral $ length results --- | 'hostFunction "function_name" inputTypes outputTypes callback userData' creates a new --- | 'Function' in the default namespace that can be called from a 'Plugin' +-- | @hostFunction "function_name" inputTypes outputTypes callback userData@ creates a new +-- | 'Extism.Function' in the default namespace that can be called from a 'Extism.Plugin' hostFunction :: String -> [ValType] -> [ValType] -> (CurrentPlugin -> a -> IO ()) -> a -> IO Function hostFunction = hostFunctionWithNamespace' Nothing --- | 'hostFunction' "namespace" "function_name" inputTypes outputTypes callback userData' creates a new --- | 'Function' in the provided namespace that can be called from a 'Plugin' +-- | @hostFunction' "namespace" "function_name" inputTypes outputTypes callback userData@ creates a new +-- | 'Extism.Function' in the provided namespace that can be called from a 'Extism.Plugin' hostFunction' :: String -> String -> [ValType] -> [ValType] -> (CurrentPlugin -> a -> IO ()) -> a -> IO Function hostFunction' ns = hostFunctionWithNamespace' (Just ns) --- | 'newFunction "function_name" inputTypes outputTypes callback userData' creates a new --- | 'Function' in the default namespace that can be called from a 'Plugin' +-- | @newFunction' "function_name" inputTypes outputTypes userData callback@ creates a new +-- | 'Extism.Function' in the default namespace that can be called from a 'Extism.Plugin' newFunction :: String -> [ValType] -> [ValType] -> a -> (CurrentPlugin -> a -> IO ()) -> IO Function newFunction name params results x f = hostFunctionWithNamespace' Nothing name params results f x --- | 'newFunction' "namespace" "function_name" inputTypes outputTypes callback userData' creates a new --- | 'Function' in the provided namespace that can be called from a 'Plugin' +-- | @newFunction' "namespace" "function_name" inputTypes outputTypes userData callback@ creates a new +-- | 'Extism.Function' in the provided namespace that can be called from a 'Extism.Plugin' newFunction' :: String -> String -> [ValType] -> [ValType] -> a -> (CurrentPlugin -> a -> IO ()) -> IO Function newFunction' ns name params results x f = hostFunctionWithNamespace' (Just ns) name params results f x