<commit_before>- infos = Information about the haskell plugin is in keys below
- infos/author = e1528532 <<EMAIL>>
- infos/licence = BSD
- infos/needs =
- infos/provides =
- infos/recommends =
- infos/placements = postgetstorage presetstorage
- infos/status = maintained experimental global
- infos/metadata =
- infos/description = base for haskell plugins

## Introduction

A plugin which typechecks specifications before setting keys and after getting keys from
a mounted specification. 

## 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.

Use the cmake command add_haskell_plugin which can used by including LibAddHaskellPlugin.
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't have to be done again.

## Dependencies

* Elektra Haskell bindings installed
* ghc, tested with 8.1.2, may work with older versions as well
* ghc-pkg, usually bundled with ghc
* cabal, the haskell build system, usually bundled with ghc

## Limitations

None.<commit_msg>typechecker-prototype: extend readme how the typechecker can be used<commit_after>- infos = Information about the typechecker plugin is in keys below
- infos/author = e1528532 <<EMAIL>>
- infos/licence = BSD
- infos/needs = 
- infos/provides = typechecker
- infos/recommends =
- infos/placements = postgetstorage presetstorage
- infos/status = maintained experimental global
- infos/metadata =
- infos/description = a plugin which typechecks configuration specifications

## Introduction

A plugin which typechecks specifications before setting keys and after getting keys from
a mounted specification. 

## Usage

To see its functionality there will be a test specification installed into 
`/usr/local/share/elektra/specifications/simpleTestSpecification.ini`. This
path may vary slightly depending on the build configuration. The file can be
typechecked by mounting it along with the typechecker plugin by calling

`kdb mount simpleTestSpecification.ini spec/examples ini typechecker`

This test specification has no errors by default and will thus report nothing,
but if you alter it you can experiment with the typechecker. If Elektra is compiled
with the ENABLE_LOGGER flag, it will log the inferred types in all cases so the
type behavior can be observed when getting/setting a key in a specification.

## Dependencies

* ghc, tested with 8.1.2, may work with older versions as well
* ghc-pkg, usually bundled with ghc
* cabal, the haskell build system, usually bundled with ghc

## Limitations

Very experimental. Typechecking currently only happens when getting or setting
a key in a mounted specification. Errors are currently very raw and haskell-focused.
{'fraction_non_alphanumeric': 0.051517290049400144, 'fraction_numerical': 0.007057163020465773, 'mean_word_length': 4.625, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6939686', 'n_tokens_mistral': 783, 'n_tokens_neox': 736, 'n_words': 357}