
\begin{DoxyItemize}
\item infos = Information about the haskell plugin is in keys below
\item infos/author = e1528532 \href{mailto:e1528532@libelektra.org}{\tt e1528532@libelektra.\+org}
\item infos/licence = B\+SD
\item infos/needs =
\item infos/provides =
\item infos/recommends =
\item infos/placements = getstorage setstorage
\item infos/status = maintained memleak experimental
\item infos/metadata =
\item infos/description = base for haskell plugins
\end{DoxyItemize}

A plugin which takes care about initializing the haskell run-\/time.

\subsection*{Usage}

This plugin on its own provides a minimalistic implementation to test the basic functionality, but acts as a base for developing further haskell plugins. To be precise, the following files are required and should use the following naming scheme, with {\ttfamily $<$P\+L\+U\+G\+I\+N\+\_\+\+N\+A\+ME$>$} being the name of this plugin ({\ttfamily haskell} in this case)\+:


\begin{DoxyItemize}
\item C\+Make\+Lists.\+txt which includes and calls the Lib\+Add\+Haskell\+Plugin macro
\item {\ttfamily $<$P\+L\+U\+G\+I\+N\+\_\+\+N\+A\+ME$>$.cabal.\+in} which is the cabal build file for the plugin, ensure that\+:
\begin{DoxyItemize}
\item {\ttfamily hs-\/source-\/dirs\+:} is set to {\ttfamily \char`\"{}@\+C\+M\+A\+K\+E\+\_\+\+C\+U\+R\+R\+E\+N\+T\+\_\+\+S\+O\+U\+R\+C\+E\+\_\+\+D\+I\+R@\char`\"{}}
\item {\ttfamily build-\/depends\+:} includes {\ttfamily libelektra-\/haskell} for the haskell bindings
\item {\ttfamily build-\/type\+:} is set to {\ttfamily Custom}
\item {\ttfamily @C\+A\+B\+A\+L\+\_\+\+C\+U\+S\+T\+O\+M\+\_\+\+S\+E\+T\+UP@} is included somewhere in case the default Setup.\+hs is used
\end{DoxyItemize}
\item {\ttfamily testmod\+\_\+$<$P\+L\+U\+G\+I\+N\+\_\+\+N\+A\+ME$>$.c} which includes the tests for the plugin
\end{DoxyItemize}

Use the cmake command add\+\_\+haskell\+\_\+plugin which can be used by including Lib\+Add\+Haskell\+Plugin. This command will take care about the proper linking of your haskell plugin. Furthermore it uses the c wrapper provided by this plugin so this doesn\textquotesingle{}t have to be done again.

By default plugins get built in a cabal sandbox shared with all other Haskell plugins-\/ and the Haskell bindings to speed up compilation by compiling commonly used dependencies just once. Dependencies are automatically resolved according to the cabal build configuration.

\subsection*{Dependencies}


\begin{DoxyItemize}
\item Elektra\textquotesingle{}s haskell bindings
\item ghc, tested with 8.\+1.\+2, may work with older versions as well
\item ghc-\/pkg, usually bundled with ghc
\item cabal, the haskell build system, usually bundled with ghc
\end{DoxyItemize}

\subsection*{Limitations}

Currently the Haskell plugin only executes tests written in C and not directly in Haskell.

\subsection*{Other}

Unfortunately the haskell runtime itself leaks some memory, but as haskell plugins are generally executed in an isolated process it should not matter too much. 