From bc40fe4099d0b9fdc9534a649da7a8515128f243 Mon Sep 17 00:00:00 2001 From: zach Date: Mon, 22 Apr 2024 14:11:29 -0700 Subject: [PATCH] doc: cleanup markdown --- src/Extism/HostFunction.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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