<commit_before>README
======

![look](Themes/info+repl.png)

Requirements
------------

Necessary:
* ghc and a recent Haskell Platform (>= 2012 should do fine)
* cabal

Not necessary, but useful
* [hsdev](http://hackage.haskell.org/package/hsdev) cabal package (`cabal install hsdev`) for inspection, enhanced completion, goto, symbol info etc.
* [SublimeREPL](https://github.com/wuub/SublimeREPL) package for repl commands
* [stylish-haskell](https://github.com/jaspervdj/stylish-haskell) (for code prettification, `cabal install stylish-haskell`)
* [ghc-mod](http://hackage.haskell.org/package/ghc-mod) (for import and LANGUAGE completions and type inference, `cabal install ghc-mod`, not used if `hsdev` enabled)
* [haskell-docs](http://hackage.haskell.org/package/haskell-docs) (for documentation in 'Symbol info' command, `cabal install haskell-docs`, not used if `hsdev` enabled)
* [hdevtools](https://github.com/bitc/hdevtools) (or [fork for windows](https://github.com/mvoidex/hdevtools)) (for type inference, `cabal install hdevtools`, not used if `hsdev` enabled)

Binaries:
* If your `cabal`, `ghc-mod`, `ghc` etc. are not installed in a system PATH, you have to adjust SublimeHaskell's `add_to_PATH` setting.

There are also [special theme](Themes/Hasky%20\(Dark\).gif) with enhanced haskell entities coloring<br>
Note different coloring for types and constructors (in import list, data declaration etc.), special coloring of generic variables in types, pragmas and module imports

![compare](Themes/Hasky%20\(Dark\).small.gif)

Installation
------------

1. Get Sublime Text 2/3: <http://www.sublimetext.com/>
2. Install the Sublime Package Control package: <http://wbond.net/sublime_packages/package_control/installation>
3. Use Package Control to install this package (SublimeHaskell)

Usage
-----

In short: Press `shift-ctrl-p` and type `haskell` to explore all commands.

When editing Haskell source files, automatic error highlighting and enhanced auto-completion is available.

Each time you save, any errors in your program will be listed at the bottom of the window and highlighted in the source code.

All source files in the project are scanned on change. Any symbols that they export are provided in the auto-complete suggestions.

Stylish-haskell can be used to stylish file or selected text.

Use `f12` to go to declaration and `ctrl+k ctrl+i` to show symbol info with documentation. These command are also available through context menu with right-click.

To show inferred types use `Show type` (`ctrl-k ctrl-h ctrl-t`) command.

To insert inferred type use `Insert type` (`ctrl-k ctrl-h ctrl-i`).

You can jump between the errors and warnings with `alt+d alt+e` and `alt+shift+d alt+shift+e`.
To show hidden error output, use command `Show error panel` (`ctrl-alt-e`)

Commands:
---

![InsertImport](Commands/InsertImport.gif)
* `SublimeHaskell: Insert import for symbol` — add import for declaration
* `SublimeHaskell: Find declarations` — find declarations in installed packages and in projects
* `SublimeHaskell: Search declarations everywhere` — search declarations in hayoo too
![BrowseModule](Commands/BrowseModule.gif)
* `SublimeHaskell: Browse module` — get declarations for module
* `SublimeHaskell: Browse declarations` — get declarations in scope of current file
![SymbolInfo](Commands/SymbolInfo.gif)
* `SublimeHaskell: Show symbol info` — get help for symbol, `ctrl+k ctrl+i`
![ToggleSymbolInfo](Commands/ToggleSymbolInfo.gif)
* `SublimeHaskell: Toggle symbol info panel` — toggle continuout symbol info panel, which show info about symbol under cursor. Useful when reading code.
![GoToModule](Commands/GoToModule.gif)
* `SublimeHaskell: Go to module` — go to module, `ctrl+k ctrl+p`
* `SublimeHaskell: Go to declaration` — overrides default, `f12`
* `Ctrl+R`, `Ctrl+Shift+R` — overrides default, goto symbol and goto symbol in project
* `SublimeHaskell: Show type` — show type/types for current expression, `ctrl-k ctrl-h ctrl-t`
* `SublimeHaskell: Expand selection to Expression` — expand selection to expression, `ctrl+shift+y`
![Types](Commands/Types.gif)
* `SublimeHaskell: Show/hide all types` — get all types and highlight while selection modifies, `ctrl+t, h`
* `SublimeHaskell: Insert type` — insert type for selected expression, `ctrl-k ctrl-h ctrl-i`
* `SublimeHaskell: Hayoo` — search in hayoo
![AutoFix](Commands/AutoFix.gif)
* `SublimeHaskell: Auto fix` — auto fix some of warnings and/or errors (for now redundant imports and hlint hints)
* `SublimeHaskell: Stylish` — stylish source with `stylish-haskell`
* `SublimeHaskell: Scan docs and infer types` — as long as scanning docs for sources and inferring types is long process, it's disabled by default, but this command can be used to scan docs and infer types for currently opened view
* `SublimeHaskell: Check & Lint` — check/lint/check & lint opened file. Enable option `check_lint_fly` to [check & lint](Commands/FlyCheck.gif) on idle, rescanning actual source, so that [completions are updated](Commands/ScanContents.gif)
* Eval commands — see [animation](Commands/Eval.gif)
  * `SublimeHaskell: Eval selection` — eval selected expression, for example
    * `[1..10]` ⤇ `[1,2,3,4,5,6,7,8,9,10]`
    * `replicate 10 'a'` ⤇ `aaaaaaaaaa` (note no double quotes for string result)
  * `SublimeHaskell: Apply to selection` — same as above, but applies function to each selection
    * `foobar` ⫤ `reverse` ⤇ `raboof`
    * `[1..10]` ⫤ `reverse` ⤇ `[10,9,8,7,6,5,4,3,2,1]`
    * `1`, `2`, `3` ⫤ `succ` ⤇ `2`, `3`, `4`
    * `[1..3]` ⫤ `intercalate ", " . map (\i -> "foo" ++ show i)` ⤇ `foo1, foo2, foo3`
  * `SublimeHaskell: Apply to selection list` — applies function to list made from selections
    * `foo`, `bar`, `baz` ⫤ `reverse` ⤇ `baz`, `bar`, `foo`<commit_msg>Show gifs after command names. Added autocompletion animation<commit_after>README
======

![look](Themes/info+repl.png)

Requirements
------------

Necessary:
* ghc and a recent Haskell Platform (>= 2012 should do fine)
* cabal

Not necessary, but useful
* [hsdev](http://hackage.haskell.org/package/hsdev) cabal package (`cabal install hsdev`) for inspection, enhanced completion, goto, symbol info etc.
* [SublimeREPL](https://github.com/wuub/SublimeREPL) package for repl commands
* [stylish-haskell](https://github.com/jaspervdj/stylish-haskell) (for code prettification, `cabal install stylish-haskell`)
* [ghc-mod](http://hackage.haskell.org/package/ghc-mod) (for import and LANGUAGE completions and type inference, `cabal install ghc-mod`, not used if `hsdev` enabled)
* [haskell-docs](http://hackage.haskell.org/package/haskell-docs) (for documentation in 'Symbol info' command, `cabal install haskell-docs`, not used if `hsdev` enabled)
* [hdevtools](https://github.com/bitc/hdevtools) (or [fork for windows](https://github.com/mvoidex/hdevtools)) (for type inference, `cabal install hdevtools`, not used if `hsdev` enabled)

Binaries:
* If your `cabal`, `ghc-mod`, `ghc` etc. are not installed in a system PATH, you have to adjust SublimeHaskell's `add_to_PATH` setting.

There are also [special theme](Themes/Hasky%20\(Dark\).gif) with enhanced haskell entities coloring<br>
Note different coloring for types and constructors (in import list, data declaration etc.), special coloring of generic variables in types, pragmas and module imports

![compare](Themes/Hasky%20\(Dark\).small.gif)

Installation
------------

1. Get Sublime Text 2/3: <http://www.sublimetext.com/>
2. Install the Sublime Package Control package: <http://wbond.net/sublime_packages/package_control/installation>
3. Use Package Control to install this package (SublimeHaskell)

Usage
-----

In short: Press `shift-ctrl-p` and type `haskell` to explore all commands.

When editing Haskell source files, automatic error highlighting and enhanced auto-completion is available.

Each time you save, any errors in your program will be listed at the bottom of the window and highlighted in the source code.

All source files in the project are scanned on change. Any symbols that they export are provided in the auto-complete suggestions.

Stylish-haskell can be used to stylish file or selected text.

Use `f12` to go to declaration and `ctrl+k ctrl+i` to show symbol info with documentation. These command are also available through context menu with right-click.

To show inferred types use `Show type` (`ctrl-k ctrl-h ctrl-t`) command.

To insert inferred type use `Insert type` (`ctrl-k ctrl-h ctrl-i`).

You can jump between the errors and warnings with `alt+d alt+e` and `alt+shift+d alt+shift+e`.
To show hidden error output, use command `Show error panel` (`ctrl-alt-e`)

Enhanced completion:
![AutoCompletion](Commands/AutoCompletion.gif)

Commands:
---

* `SublimeHaskell: Insert import for symbol` — add import for declaration
![InsertImport](Commands/InsertImport.gif)
* `SublimeHaskell: Find declarations` — find declarations in installed packages and in projects
* `SublimeHaskell: Search declarations everywhere` — search declarations in hayoo too
* `SublimeHaskell: Browse module` — get declarations for module
![BrowseModule](Commands/BrowseModule.gif)
* `SublimeHaskell: Browse declarations` — get declarations in scope of current file
* `SublimeHaskell: Show symbol info` — get help for symbol, `ctrl+k ctrl+i`
![SymbolInfo](Commands/SymbolInfo.gif)
* `SublimeHaskell: Toggle symbol info panel` — toggle continuout symbol info panel, which show info about symbol under cursor. Useful when reading code.
![ToggleSymbolInfo](Commands/ToggleSymbolInfo.gif)
* `SublimeHaskell: Go to module` — go to module, `ctrl+k ctrl+p`
![GoToModule](Commands/GoToModule.gif)
* `SublimeHaskell: Go to declaration` — overrides default, `f12`
* `Ctrl+R`, `Ctrl+Shift+R` — overrides default, goto symbol and goto symbol in project
* `SublimeHaskell: Show type` — show type/types for current expression, `ctrl-k ctrl-h ctrl-t`
* `SublimeHaskell: Expand selection to Expression` — expand selection to expression, `ctrl+shift+y`
* `SublimeHaskell: Show/hide all types` — get all types and highlight while selection modifies, `ctrl+t, h`
![Types](Commands/Types.gif)
* `SublimeHaskell: Insert type` — insert type for selected expression, `ctrl-k ctrl-h ctrl-i`
* `SublimeHaskell: Hayoo` — search in hayoo
* `SublimeHaskell: Auto fix` — auto fix some of warnings and/or errors (for now redundant imports and hlint hints)
![AutoFix](Commands/AutoFix.gif)
* `SublimeHaskell: Stylish` — stylish source with `stylish-haskell`
* `SublimeHaskell: Scan docs and infer types` — as long as scanning docs for sources and inferring types is long process, it's disabled by default, but this command can be used to scan docs and infer types for currently opened view
* `SublimeHaskell: Check & Lint` — check/lint/check & lint opened file. Enable option `check_lint_fly` to [check & lint](Commands/FlyCheck.gif) on idle, rescanning actual source, so that [completions are updated](Commands/ScanContents.gif)
* Eval commands — see [animation](Commands/Eval.gif)
  * `SublimeHaskell: Eval selection` — eval selected expression, for example
    * `[1..10]` ⤇ `[1,2,3,4,5,6,7,8,9,10]`
    * `replicate 10 'a'` ⤇ `aaaaaaaaaa` (note no double quotes for string result)
  * `SublimeHaskell: Apply to selection` — same as above, but applies function to each selection
    * `foobar` ⫤ `reverse` ⤇ `raboof`
    * `[1..10]` ⫤ `reverse` ⤇ `[10,9,8,7,6,5,4,3,2,1]`
    * `1`, `2`, `3` ⫤ `succ` ⤇ `2`, `3`, `4`
    * `[1..3]` ⫤ `intercalate ", " . map (\i -> "foo" ++ show i)` ⤇ `foo1, foo2, foo3`
  * `SublimeHaskell: Apply to selection list` — applies function to list made from selections
    * `foo`, `bar`, `baz` ⫤ `reverse` ⤇ `baz`, `bar`, `foo`
{'fraction_non_alphanumeric': 0.12207658699563094, 'fraction_numerical': 0.009937462520346097, 'mean_word_length': 4.95308516063233, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '4896842', 'n_tokens_mistral': 3884, 'n_tokens_neox': 3673, 'n_words': 1383}