<commit_before>homepage: ''
changelog-type: ''
hash: 7909290d0c96eca65d924d2b86dd4829a753d18f3250becc24390100ab0bbee5
test-bench-deps: {}
maintainer: https://github.com/haskell/haskell-language-server/contributors
synopsis: Eval plugin for Haskell Language Server
changelog: ''
basic-deps:
  shake: -any
  ghc: -any
  extra: -any
  base: '>=4.12 && <5'
  time: -any
  parser-combinators: -any
  Diff: -any
  unordered-containers: -any
  text: -any
  safe-exceptions: -any
  filepath: -any
  containers: -any
  ghcide: -any
  ghc-paths: -any
  pretty-simple: -any
  hashable: -any
  transformers: -any
  haskell-lsp-types: -any
  temporary: -any
  deepseq: -any
  QuickCheck: -any
  ghc-boot-th: -any
  hls-plugin-api: -any
  aeson: -any
  haskell-lsp: -any
  directory: -any
all-versions:
- 0.1.0.0
- 0.1.0.1
- 0.1.0.2
- 0.1.0.3
- 0.1.0.4
author: https://github.com/haskell/haskell-language-server/contributors
latest: 0.1.0.4
description-type: markdown
description: |+
  # Eval plugin for the [Haskell Language Server](https://github.com/haskell/haskell-language-server#readme)

  The Eval plugin evaluates code inserted in comments.

  This is mainly useful to test and document functions and to quickly evaluate small expressions.

  Every line of code to be evaluated is introduced by __>>>__

  A quick calculation:

  ```
  -- >>> 2**4.5/pi
  -- 7.202530529256849
  ```

  A little test for the `double` function:

  ```
  {- |
  A doubling function.

  >>> double 11
  22
  -}
  double = (2*)
  ```

  # Demo

  ![Eval](demo.gif)

  # Test Structure

  A test is composed by a sequence of contiguous lines, the result of their evaluation is inserted after the test body:

  ```
  >>> "AB" ++ "CD"
  >>> "CD" ++ "AB"
  "ABCD"
  "CDAB"
  ```

  You execute a test by clicking on the _Evaluate_ code lens that appears above it (or _Refresh_, if the test has been run previously).

  All tests in the same comment block are executed together.


  Tests can appear in all kind of comments:
  * plain comments (both single and multi line)<commit_msg>Update from Hackage at 2021-01-14T12:55:02Z<commit_after>homepage: ''
changelog-type: ''
hash: 92d419804772926956028cd1cb0dcfbeddb6a086a17d09d88b9c4cf7a26474d4
test-bench-deps: {}
maintainer: https://github.com/haskell/haskell-language-server/contributors
synopsis: Eval plugin for Haskell Language Server
changelog: ''
basic-deps:
  shake: -any
  ghc: -any
  extra: -any
  base: '>=4.12 && <5'
  time: -any
  parser-combinators: -any
  Diff: -any
  unordered-containers: -any
  text: -any
  safe-exceptions: -any
  filepath: -any
  containers: -any
  ghcide: -any
  ghc-paths: -any
  pretty-simple: -any
  hashable: -any
  transformers: -any
  haskell-lsp-types: -any
  temporary: -any
  deepseq: -any
  QuickCheck: -any
  ghc-boot-th: -any
  hls-plugin-api: -any
  aeson: -any
  haskell-lsp: -any
  directory: -any
all-versions:
- 0.1.0.0
- 0.1.0.1
- 0.1.0.2
- 0.1.0.3
- 0.1.0.4
- 0.1.0.5
author: https://github.com/haskell/haskell-language-server/contributors
latest: 0.1.0.5
description-type: markdown
description: |+
  # Eval plugin for the [Haskell Language Server](https://github.com/haskell/haskell-language-server#readme)

  The Eval plugin evaluates code inserted in comments.

  This is mainly useful to test and document functions and to quickly evaluate small expressions.

  Every line of code to be evaluated is introduced by __>>>__

  A quick calculation:

  ```
  -- >>> 2**4.5/pi
  -- 7.202530529256849
  ```

  A little test for the `double` function:

  ```
  {- |
  A doubling function.

  >>> double 11
  22
  -}
  double = (2*)
  ```

  # Demo

  ![Eval Demo](https://raw.githubusercontent.com/haskell/haskell-language-server/master/plugins/hls-eval-plugin/demo.gif)

  # Test Structure

  A test is composed by a sequence of contiguous lines, the result of their evaluation is inserted after the test body:

  ```
  >>> "AB" ++ "CD"
  >>> "CD" ++ "AB"
  "ABCD"
  "CDAB"
  ```

  You execute a test by clicking on the _Evaluate_ code lens that appears above it (or _Refresh_, if the test has been run previously).

  All tests in the same comment block are executed together.


  Tests can appear in all kind of comments:
  * plain comments (both single and multi line)
{'fraction_non_alphanumeric': 0.12370405278039585, 'fraction_numerical': 0.04806786050895382, 'mean_word_length': 3.1863905325443787, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 13, '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': '2864904', 'n_tokens_mistral': 1677, 'n_tokens_neox': 1502, 'n_words': 449}