hotswap-0.1.8.0: Simple code hotswapping.

Safe HaskellSafe-Infered

System.Plugins.Hotswap

Synopsis

Documentation

newPlugin :: FilePath -> [FilePath] -> String -> IO (Plugin a)Source

Create a new plugin. Don't use this to reload plugins.

data Plugin a Source

Constructors

Plugin 

Fields

pluginObject :: FilePath

Path to object

pluginIncludes :: [FilePath]

Include paths.

pluginFunctionName :: String

Name of the symbol to find.

pluginFunction :: IORef a

Loaded function.

pluginModule :: IORef Module

Loaded module.

usePlugin :: Plugin (a -> b) -> a -> IO bSource

usePlugin provides a simple way to use plugins of type 'Plugin (a -> b)', ie, only single argumented ones.

reloadPlugin :: Plugin a -> IO ()Source

Reload a plugin in-place.