Merge branch 'master' of https://github.com/Tehnix/atom-beautify into Tehnix-master
This commit is contained in:
commit
5edfb25971
|
@ -1,6 +1,8 @@
|
||||||
# Next
|
# Next
|
||||||
|
- Add hindent and brittany beautifiers for haskell
|
||||||
- Breaking change to `pybeautifier`: Fix typo, change `formater` to `formatter`. See [#1898](https://github.com/Glavin001/atom-beautify/pull/1898).
|
- Breaking change to `pybeautifier`: Fix typo, change `formater` to `formatter`. See [#1898](https://github.com/Glavin001/atom-beautify/pull/1898).
|
||||||
- Fixes [#1773](https://github.com/Glavin001/atom-beautify/issues/1773) and [#793](https://github.com/Glavin001/atom-beautify/issues/793). ruby-beautify with Rubocop now respects `Exclude` settings, and properly loads inherited config files (like `~/.rubocop.yml`)
|
- Fixes [#1773](https://github.com/Glavin001/atom-beautify/issues/1773) and [#793](https://github.com/Glavin001/atom-beautify/issues/793). ruby-beautify with Rubocop now respects `Exclude` settings, and properly loads inherited config files (like `~/.rubocop.yml`)
|
||||||
|
- Add hindent and brittany beautifiers for haskell
|
||||||
- Fix [#1862](https://github.com/Glavin001/atom-beautify/issues/1862) Add support for ocp-indent as an executable
|
- Fix [#1862](https://github.com/Glavin001/atom-beautify/issues/1862) Add support for ocp-indent as an executable
|
||||||
- See [#601](https://github.com/Glavin001/atom-beautify/issues/1862) Add support for tsx files
|
- See [#601](https://github.com/Glavin001/atom-beautify/issues/1862) Add support for tsx files
|
||||||
- See [#1497](https://github.com/Glavin001/atom-beautify/issues/1497) and [#802](https://github.com/Glavin001/atom-beautify/issues/802)
|
- See [#1497](https://github.com/Glavin001/atom-beautify/issues/1497) and [#802](https://github.com/Glavin001/atom-beautify/issues/802)
|
||||||
|
|
|
@ -91,6 +91,7 @@ Some of the supported beautifiers are developed for Node.js and are automaticall
|
||||||
| align-yaml | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
| align-yaml | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
||||||
| autopep8 | :warning: 2 executables | :warning: Only 1 of 2 executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [autopep8 (`autopep8`)](https://github.com/hhatto/autopep8) with `docker pull unibeautify/autopep8`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [autopep8 (`autopep8`)](https://github.com/hhatto/autopep8) by following https://github.com/hhatto/autopep8#installation<br/>2. Install [isort (`isort`)](https://github.com/timothycrosley/isort) by following https://github.com/timothycrosley/isort#installing-isort<br/> |
|
| autopep8 | :warning: 2 executables | :warning: Only 1 of 2 executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [autopep8 (`autopep8`)](https://github.com/hhatto/autopep8) with `docker pull unibeautify/autopep8`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [autopep8 (`autopep8`)](https://github.com/hhatto/autopep8) by following https://github.com/hhatto/autopep8#installation<br/>2. Install [isort (`isort`)](https://github.com/timothycrosley/isort) by following https://github.com/timothycrosley/isort#installing-isort<br/> |
|
||||||
| beautysh | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [beautysh (`beautysh`)](https://github.com/bemeurer/beautysh) with `docker pull unibeautify/beautysh`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [beautysh (`beautysh`)](https://github.com/bemeurer/beautysh) by following https://github.com/bemeurer/beautysh#installation<br/> |
|
| beautysh | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [beautysh (`beautysh`)](https://github.com/bemeurer/beautysh) with `docker pull unibeautify/beautysh`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [beautysh (`beautysh`)](https://github.com/bemeurer/beautysh) by following https://github.com/bemeurer/beautysh#installation<br/> |
|
||||||
|
| brittany | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/lspitzner/brittany and follow the instructions. |
|
||||||
| clang-format | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [ClangFormat (`clang-format`)](https://clang.llvm.org/docs/ClangFormat.html) with `docker pull unibeautify/clang-format`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [ClangFormat (`clang-format`)](https://clang.llvm.org/docs/ClangFormat.html) by following https://clang.llvm.org/docs/ClangFormat.html<br/> |
|
| clang-format | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [ClangFormat (`clang-format`)](https://clang.llvm.org/docs/ClangFormat.html) with `docker pull unibeautify/clang-format`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [ClangFormat (`clang-format`)](https://clang.llvm.org/docs/ClangFormat.html) by following https://clang.llvm.org/docs/ClangFormat.html<br/> |
|
||||||
| cljfmt | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
| cljfmt | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
||||||
| Coffee Formatter | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
| Coffee Formatter | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
||||||
|
@ -107,6 +108,7 @@ Some of the supported beautifiers are developed for Node.js and are automaticall
|
||||||
| gofmt | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://golang.org/cmd/gofmt/ and follow the instructions. |
|
| gofmt | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://golang.org/cmd/gofmt/ and follow the instructions. |
|
||||||
| goimports | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [goimports (`goimports`)](https://godoc.org/golang.org/x/tools/cmd/goimports) with `docker pull unibeautify/goimports`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [goimports (`goimports`)](https://godoc.org/golang.org/x/tools/cmd/goimports) by following https://godoc.org/golang.org/x/tools/cmd/goimports<br/> |
|
| goimports | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [goimports (`goimports`)](https://godoc.org/golang.org/x/tools/cmd/goimports) with `docker pull unibeautify/goimports`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [goimports (`goimports`)](https://godoc.org/golang.org/x/tools/cmd/goimports) by following https://godoc.org/golang.org/x/tools/cmd/goimports<br/> |
|
||||||
| hh_format | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to http://hhvm.com/ and follow the instructions. |
|
| hh_format | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to http://hhvm.com/ and follow the instructions. |
|
||||||
|
| hindent | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/commercialhaskell/hindent and follow the instructions. |
|
||||||
| HTML Beautifier | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/threedaymonk/htmlbeautifier and follow the instructions. |
|
| HTML Beautifier | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/threedaymonk/htmlbeautifier and follow the instructions. |
|
||||||
| JS Beautify | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
| JS Beautify | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
||||||
| JSCS Fixer | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
| JSCS Fixer | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
||||||
|
@ -166,7 +168,7 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti
|
||||||
| Go | `Go` |`.go` | **[`gofmt`](https://golang.org/cmd/gofmt/)**, [`goimports`](https://godoc.org/golang.org/x/tools/cmd/goimports) |
|
| Go | `Go` |`.go` | **[`gofmt`](https://golang.org/cmd/gofmt/)**, [`goimports`](https://godoc.org/golang.org/x/tools/cmd/goimports) |
|
||||||
| Golang Template | `HTML (Go)`, `Go Template` |`.gohtml` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| Golang Template | `HTML (Go)`, `Go Template` |`.gohtml` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
| Handlebars | `Handlebars`, `HTML (Handlebars)` |`.hbs`, `.handlebars` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
|
| Handlebars | `Handlebars`, `HTML (Handlebars)` |`.hbs`, `.handlebars` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
|
||||||
| Haskell | `Haskell` |`.hs` | **[`stylish-haskell`](https://github.com/jaspervdj/stylish-haskell)** |
|
| Haskell | `Haskell` |`.hs` | **[`brittany`](https://github.com/lspitzner/brittany)**, [`hindent`](https://github.com/commercialhaskell/hindent), [`stylish-haskell`](https://github.com/jaspervdj/stylish-haskell) |
|
||||||
| HTML | `HTML` |`.html` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
|
| HTML | `HTML` |`.html` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
|
||||||
| Jade | `Jade`, `Pug` |`.jade`, `.pug` | **[`Pug Beautify`](https://github.com/vingorius/pug-beautify)** |
|
| Jade | `Jade`, `Pug` |`.jade`, `.pug` | **[`Pug Beautify`](https://github.com/vingorius/pug-beautify)** |
|
||||||
| Java | `Java` |`.java` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)** |
|
| Java | `Java` |`.java` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)** |
|
||||||
|
|
|
@ -60,6 +60,11 @@
|
||||||
Beautifiers
|
Beautifiers
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href='class/Brittany.html'>
|
||||||
|
Brittany
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -150,6 +155,11 @@
|
||||||
HTMLBeautifier
|
HTMLBeautifier
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href='class/Hindent.html'>
|
||||||
|
Hindent
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -419,6 +429,15 @@
|
||||||
(src/languages)
|
(src/languages)
|
||||||
</small>
|
</small>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href='file/src/beautifiers/brittany.coffee.html'>
|
||||||
|
brittany.coffee
|
||||||
|
</a>
|
||||||
|
<small>
|
||||||
|
(src/beautifiers)
|
||||||
|
</small>
|
||||||
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -713,6 +732,15 @@
|
||||||
(src/languages)
|
(src/languages)
|
||||||
</small>
|
</small>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href='file/src/beautifiers/hindent.coffee.html'>
|
||||||
|
hindent.coffee
|
||||||
|
</a>
|
||||||
|
<small>
|
||||||
|
(src/beautifiers)
|
||||||
|
</small>
|
||||||
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
=
|
=
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<pre><code class='coffeescript'>['uncrustify', 'autopep8', 'coffee-formatter', 'coffee-fmt', 'cljfmt', 'clang-format', 'crystal', 'dfmt', 'elm-format', 'htmlbeautifier', 'csscomb', 'gherkin', 'gofmt', 'latex-beautify', 'fortran-beautifier', 'js-beautify', 'jscs', 'lua-beautifier', 'ocp-indent', 'perltidy', 'php-cs-fixer', 'phpcbf', 'prettydiff', 'pug-beautify', 'puppet-fix', 'remark', 'rubocop', 'ruby-beautify', 'rustfmt', 'sass-convert', 'sqlformat', 'stylish-haskell', 'tidy-markdown', 'typescript-formatter', 'vue-beautifier', 'yapf', 'erl_tidy', 'marko-beautifier', 'formatR', 'beautysh']</code></pre>
|
<pre><code class='coffeescript'>['uncrustify', 'autopep8', 'brittany', 'coffee-formatter', 'coffee-fmt', 'cljfmt', 'clang-format', 'crystal', 'dfmt', 'elm-format', 'htmlbeautifier', 'csscomb', 'gherkin', 'gofmt', 'latex-beautify', 'fortran-beautifier', 'hindent', 'js-beautify', 'jscs', 'lua-beautifier', 'ocp-indent', 'perltidy', 'php-cs-fixer', 'phpcbf', 'prettydiff', 'pug-beautify', 'puppet-fix', 'remark', 'rubocop', 'ruby-beautify', 'rustfmt', 'sass-convert', 'sqlformat', 'stylish-haskell', 'tidy-markdown', 'typescript-formatter', 'vue-beautifier', 'yapf', 'erl_tidy', 'marko-beautifier', 'formatR', 'beautysh']</code></pre>
|
||||||
<div class='docstring'>
|
<div class='docstring'>
|
||||||
<p>List of beautifier names</p><p>To register a beautifier add its name here</p>
|
<p>List of beautifier names</p><p>To register a beautifier add its name here</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -0,0 +1,204 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Atom-Beautify Documentation</title>
|
||||||
|
<script src='../javascript/application.js'></script>
|
||||||
|
<script src='../javascript/search.js'></script>
|
||||||
|
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id='base' data-path='../'></div>
|
||||||
|
<div id='header'>
|
||||||
|
<div id='menu'>
|
||||||
|
<a href='../extra/README.md.html' title='Atom-Beautify'>
|
||||||
|
Atom-Beautify
|
||||||
|
</a>
|
||||||
|
»
|
||||||
|
<a href='../alphabetical_index.html' title='Index'>
|
||||||
|
Index
|
||||||
|
</a>
|
||||||
|
»
|
||||||
|
<span class='title'>Brittany</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id='content'>
|
||||||
|
<h1>
|
||||||
|
Class:
|
||||||
|
Brittany
|
||||||
|
</h1>
|
||||||
|
<table class='box'>
|
||||||
|
<tr>
|
||||||
|
<td>Defined in:</td>
|
||||||
|
<td>src/beautifiers/brittany.coffee</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Inherits:</td>
|
||||||
|
<td>
|
||||||
|
<a href='../class/Beautifier.html'>Beautifier</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h2>Variables Summary</h2>
|
||||||
|
<dl class='constants'>
|
||||||
|
<dt id='name-variable'>
|
||||||
|
name
|
||||||
|
=
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<pre><code class='coffeescript'>"brittany"</code></pre>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt id='link-variable'>
|
||||||
|
link
|
||||||
|
=
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<pre><code class='coffeescript'>"https://github.com/lspitzner/brittany"</code></pre>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt id='options-variable'>
|
||||||
|
options
|
||||||
|
=
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<pre><code class='coffeescript'>{
|
||||||
|
Haskell: true
|
||||||
|
}</code></pre>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<h3 class='inherited'>
|
||||||
|
Variable inherited from
|
||||||
|
<a href='../class/Beautifier.html'>Beautifier</a>
|
||||||
|
</h3>
|
||||||
|
<p class='inherited'>
|
||||||
|
<a href='../class/Beautifier.html#Promise-variable'>Promise</a>
|
||||||
|
<a href='../class/Beautifier.html#name-variable'>name</a>
|
||||||
|
<a href='../class/Beautifier.html#options-variable'>options</a>
|
||||||
|
<a href='../class/Beautifier.html#languages-variable'>languages</a>
|
||||||
|
<a href='../class/Beautifier.html#beautify-variable'>beautify</a>
|
||||||
|
<a href='../class/Beautifier.html#_envCache-variable'>_envCache</a>
|
||||||
|
<a href='../class/Beautifier.html#_envCacheDate-variable'>_envCacheDate</a>
|
||||||
|
<a href='../class/Beautifier.html#_envCacheExpiry-variable'>_envCacheExpiry</a>
|
||||||
|
<a href='../class/Beautifier.html#logger-variable'>logger</a>
|
||||||
|
</p>
|
||||||
|
<h2>Instance Method Summary</h2>
|
||||||
|
<ul class='summary'>
|
||||||
|
<li>
|
||||||
|
<span class='signature'>
|
||||||
|
<a href='#beautify-dynamic'>
|
||||||
|
#
|
||||||
|
(void)
|
||||||
|
<b>beautify</b><span>(text, language, options)</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
<span class='desc'>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h2>
|
||||||
|
<small>Inherited Method Summary</small>
|
||||||
|
<h3 class='inherited'>
|
||||||
|
Methods inherited from
|
||||||
|
<a href='../class/Beautifier.html'>Beautifier</a>
|
||||||
|
</h3>
|
||||||
|
<p class='inherited'>
|
||||||
|
<a href='../class/Beautifier.html#deprecate-dynamic'>#deprecate</a>
|
||||||
|
<a href='../class/Beautifier.html#tempFile-dynamic'>#tempFile</a>
|
||||||
|
<a href='../class/Beautifier.html#readFile-dynamic'>#readFile</a>
|
||||||
|
<a href='../class/Beautifier.html#findFile-dynamic'>#findFile</a>
|
||||||
|
<a href='../class/Beautifier.html#getShellEnvironment-dynamic'>#getShellEnvironment</a>
|
||||||
|
<a href='../class/Beautifier.html#which-dynamic'>#which</a>
|
||||||
|
<a href='../class/Beautifier.html#commandNotFoundError-dynamic'>#commandNotFoundError</a>
|
||||||
|
<a href='../class/Beautifier.html#run-dynamic'>#run</a>
|
||||||
|
<a href='../class/Beautifier.html#spawn-dynamic'>#spawn</a>
|
||||||
|
<a href='../class/Beautifier.html#setupLogger-dynamic'>#setupLogger</a>
|
||||||
|
</p>
|
||||||
|
</h2>
|
||||||
|
<h2>Instance Method Details</h2>
|
||||||
|
<div class='methods'>
|
||||||
|
<div class='method_details'>
|
||||||
|
<p class='signature' id='beautify-dynamic'>
|
||||||
|
#
|
||||||
|
(void)
|
||||||
|
<b>beautify</b><span>(text, language, options)</span>
|
||||||
|
<br>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id='footer'>
|
||||||
|
By
|
||||||
|
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||||
|
Codo
|
||||||
|
</a>
|
||||||
|
2.1.2
|
||||||
|
✲
|
||||||
|
Press H to see the keyboard shortcuts
|
||||||
|
✲
|
||||||
|
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||||
|
✲
|
||||||
|
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||||
|
</div>
|
||||||
|
<iframe id='search_frame'></iframe>
|
||||||
|
<div id='fuzzySearch'>
|
||||||
|
<input type='text'>
|
||||||
|
<ol></ol>
|
||||||
|
</div>
|
||||||
|
<div id='help'>
|
||||||
|
<p>
|
||||||
|
Quickly fuzzy find classes, mixins, methods, file:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<span>T</span>
|
||||||
|
Open fuzzy finder dialog
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
Control the navigation frame:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<span>L</span>
|
||||||
|
Toggle list view
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>C</span>
|
||||||
|
Show class list
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>I</span>
|
||||||
|
Show mixin list
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>F</span>
|
||||||
|
Show file list
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>M</span>
|
||||||
|
Show method list
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>E</span>
|
||||||
|
Show extras list
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
You can focus and blur the search input:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<span>S</span>
|
||||||
|
Focus search input
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>Esc</span>
|
||||||
|
Blur search input
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,204 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Atom-Beautify Documentation</title>
|
||||||
|
<script src='../javascript/application.js'></script>
|
||||||
|
<script src='../javascript/search.js'></script>
|
||||||
|
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id='base' data-path='../'></div>
|
||||||
|
<div id='header'>
|
||||||
|
<div id='menu'>
|
||||||
|
<a href='../extra/README.md.html' title='Atom-Beautify'>
|
||||||
|
Atom-Beautify
|
||||||
|
</a>
|
||||||
|
»
|
||||||
|
<a href='../alphabetical_index.html' title='Index'>
|
||||||
|
Index
|
||||||
|
</a>
|
||||||
|
»
|
||||||
|
<span class='title'>Hindent</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id='content'>
|
||||||
|
<h1>
|
||||||
|
Class:
|
||||||
|
Hindent
|
||||||
|
</h1>
|
||||||
|
<table class='box'>
|
||||||
|
<tr>
|
||||||
|
<td>Defined in:</td>
|
||||||
|
<td>src/beautifiers/hindent.coffee</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Inherits:</td>
|
||||||
|
<td>
|
||||||
|
<a href='../class/Beautifier.html'>Beautifier</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<h2>Variables Summary</h2>
|
||||||
|
<dl class='constants'>
|
||||||
|
<dt id='name-variable'>
|
||||||
|
name
|
||||||
|
=
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<pre><code class='coffeescript'>"hindent"</code></pre>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt id='link-variable'>
|
||||||
|
link
|
||||||
|
=
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<pre><code class='coffeescript'>"https://github.com/commercialhaskell/hindent"</code></pre>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt id='options-variable'>
|
||||||
|
options
|
||||||
|
=
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<pre><code class='coffeescript'>{
|
||||||
|
Haskell: true
|
||||||
|
}</code></pre>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<h3 class='inherited'>
|
||||||
|
Variable inherited from
|
||||||
|
<a href='../class/Beautifier.html'>Beautifier</a>
|
||||||
|
</h3>
|
||||||
|
<p class='inherited'>
|
||||||
|
<a href='../class/Beautifier.html#Promise-variable'>Promise</a>
|
||||||
|
<a href='../class/Beautifier.html#name-variable'>name</a>
|
||||||
|
<a href='../class/Beautifier.html#options-variable'>options</a>
|
||||||
|
<a href='../class/Beautifier.html#languages-variable'>languages</a>
|
||||||
|
<a href='../class/Beautifier.html#beautify-variable'>beautify</a>
|
||||||
|
<a href='../class/Beautifier.html#_envCache-variable'>_envCache</a>
|
||||||
|
<a href='../class/Beautifier.html#_envCacheDate-variable'>_envCacheDate</a>
|
||||||
|
<a href='../class/Beautifier.html#_envCacheExpiry-variable'>_envCacheExpiry</a>
|
||||||
|
<a href='../class/Beautifier.html#logger-variable'>logger</a>
|
||||||
|
</p>
|
||||||
|
<h2>Instance Method Summary</h2>
|
||||||
|
<ul class='summary'>
|
||||||
|
<li>
|
||||||
|
<span class='signature'>
|
||||||
|
<a href='#beautify-dynamic'>
|
||||||
|
#
|
||||||
|
(void)
|
||||||
|
<b>beautify</b><span>(text, language, options)</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
<span class='desc'>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h2>
|
||||||
|
<small>Inherited Method Summary</small>
|
||||||
|
<h3 class='inherited'>
|
||||||
|
Methods inherited from
|
||||||
|
<a href='../class/Beautifier.html'>Beautifier</a>
|
||||||
|
</h3>
|
||||||
|
<p class='inherited'>
|
||||||
|
<a href='../class/Beautifier.html#deprecate-dynamic'>#deprecate</a>
|
||||||
|
<a href='../class/Beautifier.html#tempFile-dynamic'>#tempFile</a>
|
||||||
|
<a href='../class/Beautifier.html#readFile-dynamic'>#readFile</a>
|
||||||
|
<a href='../class/Beautifier.html#findFile-dynamic'>#findFile</a>
|
||||||
|
<a href='../class/Beautifier.html#getShellEnvironment-dynamic'>#getShellEnvironment</a>
|
||||||
|
<a href='../class/Beautifier.html#which-dynamic'>#which</a>
|
||||||
|
<a href='../class/Beautifier.html#commandNotFoundError-dynamic'>#commandNotFoundError</a>
|
||||||
|
<a href='../class/Beautifier.html#run-dynamic'>#run</a>
|
||||||
|
<a href='../class/Beautifier.html#spawn-dynamic'>#spawn</a>
|
||||||
|
<a href='../class/Beautifier.html#setupLogger-dynamic'>#setupLogger</a>
|
||||||
|
</p>
|
||||||
|
</h2>
|
||||||
|
<h2>Instance Method Details</h2>
|
||||||
|
<div class='methods'>
|
||||||
|
<div class='method_details'>
|
||||||
|
<p class='signature' id='beautify-dynamic'>
|
||||||
|
#
|
||||||
|
(void)
|
||||||
|
<b>beautify</b><span>(text, language, options)</span>
|
||||||
|
<br>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id='footer'>
|
||||||
|
By
|
||||||
|
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||||
|
Codo
|
||||||
|
</a>
|
||||||
|
2.1.2
|
||||||
|
✲
|
||||||
|
Press H to see the keyboard shortcuts
|
||||||
|
✲
|
||||||
|
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||||
|
✲
|
||||||
|
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||||
|
</div>
|
||||||
|
<iframe id='search_frame'></iframe>
|
||||||
|
<div id='fuzzySearch'>
|
||||||
|
<input type='text'>
|
||||||
|
<ol></ol>
|
||||||
|
</div>
|
||||||
|
<div id='help'>
|
||||||
|
<p>
|
||||||
|
Quickly fuzzy find classes, mixins, methods, file:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<span>T</span>
|
||||||
|
Open fuzzy finder dialog
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
Control the navigation frame:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<span>L</span>
|
||||||
|
Toggle list view
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>C</span>
|
||||||
|
Show class list
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>I</span>
|
||||||
|
Show mixin list
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>F</span>
|
||||||
|
Show file list
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>M</span>
|
||||||
|
Show method list
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>E</span>
|
||||||
|
Show extras list
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
You can focus and blur the search input:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<span>S</span>
|
||||||
|
Focus search input
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>Esc</span>
|
||||||
|
Blur search input
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,123 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Atom-Beautify Documentation</title>
|
||||||
|
<script src='../../../javascript/application.js'></script>
|
||||||
|
<script src='../../../javascript/search.js'></script>
|
||||||
|
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id='base' data-path='../../../'></div>
|
||||||
|
<div id='header'>
|
||||||
|
<div id='menu'>
|
||||||
|
<a href='../../../extra/README.md.html' title='Atom-Beautify'>
|
||||||
|
Atom-Beautify
|
||||||
|
</a>
|
||||||
|
»
|
||||||
|
<a href='../../../alphabetical_index.html' title='Index'>
|
||||||
|
Index
|
||||||
|
</a>
|
||||||
|
»
|
||||||
|
<span class='title'>src</span>
|
||||||
|
»
|
||||||
|
<span class='title'>beautifiers</span>
|
||||||
|
»
|
||||||
|
<span class='title'>brittany.coffee</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id='content'>
|
||||||
|
<h1>
|
||||||
|
File:
|
||||||
|
brittany.coffee
|
||||||
|
</h1>
|
||||||
|
<table class='box'>
|
||||||
|
<tr>
|
||||||
|
<td>Defined in:</td>
|
||||||
|
<td>src/beautifiers</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Classes:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href='../../../class/Brittany.html'>
|
||||||
|
StylishHaskell
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div id='footer'>
|
||||||
|
By
|
||||||
|
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||||
|
Codo
|
||||||
|
</a>
|
||||||
|
2.1.2
|
||||||
|
✲
|
||||||
|
Press H to see the keyboard shortcuts
|
||||||
|
✲
|
||||||
|
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||||
|
✲
|
||||||
|
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||||
|
</div>
|
||||||
|
<iframe id='search_frame'></iframe>
|
||||||
|
<div id='fuzzySearch'>
|
||||||
|
<input type='text'>
|
||||||
|
<ol></ol>
|
||||||
|
</div>
|
||||||
|
<div id='help'>
|
||||||
|
<p>
|
||||||
|
Quickly fuzzy find classes, mixins, methods, file:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<span>T</span>
|
||||||
|
Open fuzzy finder dialog
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
Control the navigation frame:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<span>L</span>
|
||||||
|
Toggle list view
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>C</span>
|
||||||
|
Show class list
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>I</span>
|
||||||
|
Show mixin list
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>F</span>
|
||||||
|
Show file list
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>M</span>
|
||||||
|
Show method list
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>E</span>
|
||||||
|
Show extras list
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
You can focus and blur the search input:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<span>S</span>
|
||||||
|
Focus search input
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>Esc</span>
|
||||||
|
Blur search input
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,123 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Atom-Beautify Documentation</title>
|
||||||
|
<script src='../../../javascript/application.js'></script>
|
||||||
|
<script src='../../../javascript/search.js'></script>
|
||||||
|
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id='base' data-path='../../../'></div>
|
||||||
|
<div id='header'>
|
||||||
|
<div id='menu'>
|
||||||
|
<a href='../../../extra/README.md.html' title='Atom-Beautify'>
|
||||||
|
Atom-Beautify
|
||||||
|
</a>
|
||||||
|
»
|
||||||
|
<a href='../../../alphabetical_index.html' title='Index'>
|
||||||
|
Index
|
||||||
|
</a>
|
||||||
|
»
|
||||||
|
<span class='title'>src</span>
|
||||||
|
»
|
||||||
|
<span class='title'>beautifiers</span>
|
||||||
|
»
|
||||||
|
<span class='title'>hindent.coffee</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id='content'>
|
||||||
|
<h1>
|
||||||
|
File:
|
||||||
|
hindent.coffee
|
||||||
|
</h1>
|
||||||
|
<table class='box'>
|
||||||
|
<tr>
|
||||||
|
<td>Defined in:</td>
|
||||||
|
<td>src/beautifiers</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Classes:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href='../../../class/Hindent.html'>
|
||||||
|
StylishHaskell
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div id='footer'>
|
||||||
|
By
|
||||||
|
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||||
|
Codo
|
||||||
|
</a>
|
||||||
|
2.1.2
|
||||||
|
✲
|
||||||
|
Press H to see the keyboard shortcuts
|
||||||
|
✲
|
||||||
|
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||||
|
✲
|
||||||
|
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||||
|
</div>
|
||||||
|
<iframe id='search_frame'></iframe>
|
||||||
|
<div id='fuzzySearch'>
|
||||||
|
<input type='text'>
|
||||||
|
<ol></ol>
|
||||||
|
</div>
|
||||||
|
<div id='help'>
|
||||||
|
<p>
|
||||||
|
Quickly fuzzy find classes, mixins, methods, file:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<span>T</span>
|
||||||
|
Open fuzzy finder dialog
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
Control the navigation frame:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<span>L</span>
|
||||||
|
Toggle list view
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>C</span>
|
||||||
|
Show class list
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>I</span>
|
||||||
|
Show mixin list
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>F</span>
|
||||||
|
Show file list
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>M</span>
|
||||||
|
Show method list
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>E</span>
|
||||||
|
Show extras list
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
You can focus and blur the search input:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<span>S</span>
|
||||||
|
Focus search input
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span>Esc</span>
|
||||||
|
Blur search input
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -65,6 +65,14 @@
|
||||||
src/beautifiers
|
src/beautifiers
|
||||||
</small>
|
</small>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href='file/src/beautifiers/brittany.coffee.html' target='main'>
|
||||||
|
brittany.coffee
|
||||||
|
</a>
|
||||||
|
<small class='namespace'>
|
||||||
|
src/beautifiers
|
||||||
|
</small>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href='file/src/beautifiers/clang-format.coffee.html' target='main'>
|
<a href='file/src/beautifiers/clang-format.coffee.html' target='main'>
|
||||||
clang-format.coffee
|
clang-format.coffee
|
||||||
|
@ -193,6 +201,14 @@
|
||||||
src/beautifiers
|
src/beautifiers
|
||||||
</small>
|
</small>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href='file/src/beautifiers/hindent.coffee.html' target='main'>
|
||||||
|
hindent.coffee
|
||||||
|
</a>
|
||||||
|
<small class='namespace'>
|
||||||
|
src/beautifiers
|
||||||
|
</small>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href='file/src/beautifiers/htmlbeautifier.coffee.html' target='main'>
|
<a href='file/src/beautifiers/htmlbeautifier.coffee.html' target='main'>
|
||||||
htmlbeautifier.coffee
|
htmlbeautifier.coffee
|
||||||
|
|
|
@ -4315,13 +4315,13 @@ Maximum characters per line (0 disables) (Supported by JS Beautify, Pretty Diff)
|
||||||
|
|
||||||
#### [Haskell](#haskell)
|
#### [Haskell](#haskell)
|
||||||
|
|
||||||
**Supported Beautifiers**: [`stylish-haskell`](#stylish-haskell)
|
**Supported Beautifiers**: [`brittany`](#brittany) [`hindent`](#hindent) [`stylish-haskell`](#stylish-haskell)
|
||||||
|
|
||||||
| Option | stylish-haskell |
|
| Option | brittany | hindent | stylish-haskell |
|
||||||
| --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| `disabled` | :white_check_mark: |
|
| `disabled` | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||||
| `default_beautifier` | :white_check_mark: |
|
| `default_beautifier` | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||||
| `beautify_on_save` | :white_check_mark: |
|
| `beautify_on_save` | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||||
|
|
||||||
**Description**:
|
**Description**:
|
||||||
|
|
||||||
|
@ -4352,7 +4352,7 @@ Disable Haskell Beautification
|
||||||
|
|
||||||
**Type**: `string`
|
**Type**: `string`
|
||||||
|
|
||||||
**Enum**: `stylish-haskell`
|
**Enum**: `brittany` `hindent` `stylish-haskell`
|
||||||
|
|
||||||
**Description**:
|
**Description**:
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
{-# LANGUAGE Wat #-}
|
|
||||||
import Bar
|
|
||||||
import Foo
|
|
||||||
|
|
||||||
import qualified Baz as Bang
|
|
||||||
|
|
||||||
data Person = Person {
|
|
||||||
name :: String,
|
|
||||||
address :: String
|
|
||||||
}
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
module TypeFun where
|
||||||
|
import Foo
|
||||||
|
import Bar
|
||||||
|
import qualified Baz as Bang
|
||||||
|
import Data.Typeable
|
||||||
|
|
||||||
|
data Person = Person {
|
||||||
|
name :: String,
|
||||||
|
address :: String
|
||||||
|
}
|
||||||
|
|
||||||
|
main :: IO ()
|
||||||
|
main = do
|
||||||
|
doSomethingOnType 'c'
|
||||||
|
doSomethingOnType (35 :: Integer)
|
||||||
|
doSomethingOnType "a string"
|
||||||
|
|
||||||
|
doSomethingOnType :: Typeable a => a -> IO ()
|
||||||
|
doSomethingOnType a = case show (typeOf a) of
|
||||||
|
"Char" -> print $ performActionOnChar a
|
||||||
|
"Integer" -> print $ performActionOnInt a
|
||||||
|
_ -> print "undefined!"
|
||||||
|
|
||||||
|
performActionOnChar :: Typeable a => a -> String
|
||||||
|
performActionOnChar a = case cast a :: Maybe Char of
|
||||||
|
Just c -> "Concatenating with string: " ++ [c]
|
||||||
|
Nothing -> "Cast went wrong..."
|
||||||
|
|
||||||
|
performActionOnInt :: Typeable a => a -> String
|
||||||
|
performActionOnInt a = case cast a :: Maybe Integer of
|
||||||
|
Just i -> "Concatenating with string: " ++ show (i + 10)
|
||||||
|
Nothing -> "Cast went wrong..."
|
|
@ -0,0 +1,38 @@
|
||||||
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
|
||||||
|
module TypeFun where
|
||||||
|
|
||||||
|
import Bar
|
||||||
|
import qualified Baz as Bang
|
||||||
|
import Data.Typeable
|
||||||
|
import Foo
|
||||||
|
|
||||||
|
data Person = Person
|
||||||
|
{ name :: String
|
||||||
|
, address :: String
|
||||||
|
}
|
||||||
|
|
||||||
|
main :: IO ()
|
||||||
|
main = do
|
||||||
|
doSomethingOnType 'c'
|
||||||
|
doSomethingOnType (35 :: Integer)
|
||||||
|
doSomethingOnType "a string"
|
||||||
|
|
||||||
|
doSomethingOnType :: Typeable a => a -> IO ()
|
||||||
|
doSomethingOnType a =
|
||||||
|
case show (typeOf a) of
|
||||||
|
"Char" -> print $ performActionOnChar a
|
||||||
|
"Integer" -> print $ performActionOnInt a
|
||||||
|
_ -> print "undefined!"
|
||||||
|
|
||||||
|
performActionOnChar :: Typeable a => a -> String
|
||||||
|
performActionOnChar a =
|
||||||
|
case cast a :: Maybe Char of
|
||||||
|
Just c -> "Concatenating with string: " ++ [c]
|
||||||
|
Nothing -> "Cast went wrong..."
|
||||||
|
|
||||||
|
performActionOnInt :: Typeable a => a -> String
|
||||||
|
performActionOnInt a =
|
||||||
|
case cast a :: Maybe Integer of
|
||||||
|
Just i -> "Concatenating with string: " ++ show (i + 10)
|
||||||
|
Nothing -> "Cast went wrong..."
|
|
@ -0,0 +1,36 @@
|
||||||
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
module TypeFun where
|
||||||
|
import Bar
|
||||||
|
import qualified Baz as Bang
|
||||||
|
import Data.Typeable
|
||||||
|
import Foo
|
||||||
|
|
||||||
|
data Person = Person {
|
||||||
|
name :: String,
|
||||||
|
address :: String
|
||||||
|
}
|
||||||
|
|
||||||
|
main :: IO ()
|
||||||
|
main = do
|
||||||
|
doSomethingOnType 'c'
|
||||||
|
doSomethingOnType (35 :: Integer)
|
||||||
|
doSomethingOnType "a string"
|
||||||
|
|
||||||
|
doSomethingOnType :: Typeable a => a -> IO ()
|
||||||
|
doSomethingOnType a =
|
||||||
|
case show (typeOf a) of
|
||||||
|
"Char" -> print $ performActionOnChar a
|
||||||
|
"Integer" -> print $ performActionOnInt a
|
||||||
|
_ -> print "undefined!"
|
||||||
|
|
||||||
|
performActionOnChar :: Typeable a => a -> String
|
||||||
|
performActionOnChar a =
|
||||||
|
case cast a :: Maybe Char of
|
||||||
|
Just c -> "Concatenating with string: " ++ [c]
|
||||||
|
Nothing -> "Cast went wrong..."
|
||||||
|
|
||||||
|
performActionOnInt :: Typeable a => a -> String
|
||||||
|
performActionOnInt a =
|
||||||
|
case cast a :: Maybe Integer of
|
||||||
|
Just i -> "Concatenating with string: " ++ show (i + 10)
|
||||||
|
Nothing -> "Cast went wrong..."
|
|
@ -1,10 +1,36 @@
|
||||||
{-# LANGUAGE Wat #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
module TypeFun where
|
||||||
import Foo
|
import Foo
|
||||||
import Bar
|
import Bar
|
||||||
|
|
||||||
import qualified Baz as Bang
|
import qualified Baz as Bang
|
||||||
|
import Data.Typeable
|
||||||
|
|
||||||
data Person = Person {
|
data Person = Person {
|
||||||
name :: String,
|
name :: String,
|
||||||
address :: String
|
address :: String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
main :: IO ()
|
||||||
|
main = do
|
||||||
|
doSomethingOnType 'c'
|
||||||
|
doSomethingOnType (35 :: Integer)
|
||||||
|
doSomethingOnType "a string"
|
||||||
|
|
||||||
|
doSomethingOnType :: Typeable a => a -> IO ()
|
||||||
|
doSomethingOnType a =
|
||||||
|
case show (typeOf a) of
|
||||||
|
"Char" -> print $ performActionOnChar a
|
||||||
|
"Integer" -> print $ performActionOnInt a
|
||||||
|
_ -> print "undefined!"
|
||||||
|
|
||||||
|
performActionOnChar :: Typeable a => a -> String
|
||||||
|
performActionOnChar a =
|
||||||
|
case cast a :: Maybe Char of
|
||||||
|
Just c -> "Concatenating with string: " ++ [c]
|
||||||
|
Nothing -> "Cast went wrong..."
|
||||||
|
|
||||||
|
performActionOnInt :: Typeable a => a -> String
|
||||||
|
performActionOnInt a =
|
||||||
|
case cast a :: Maybe Integer of
|
||||||
|
Just i -> "Concatenating with string: " ++ show (i + 10)
|
||||||
|
Nothing -> "Cast went wrong..."
|
||||||
|
|
|
@ -150,6 +150,11 @@
|
||||||
{
|
{
|
||||||
"name": "Steven Zeck",
|
"name": "Steven Zeck",
|
||||||
"url": "https://github.com/szeck87"
|
"url": "https://github.com/szeck87"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Christian Kjær Laustsen",
|
||||||
|
"email": "ckl@codetalk.io",
|
||||||
|
"url": "https://github.com/Tehnix"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -344,6 +349,8 @@
|
||||||
"gherkin",
|
"gherkin",
|
||||||
"fortran",
|
"fortran",
|
||||||
"haskell",
|
"haskell",
|
||||||
|
"hindent",
|
||||||
|
"brittany",
|
||||||
"jade",
|
"jade",
|
||||||
"jsx",
|
"jsx",
|
||||||
"latex",
|
"latex",
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
###
|
||||||
|
Requires https://github.com/lspitzner/brittany
|
||||||
|
###
|
||||||
|
|
||||||
|
"use strict"
|
||||||
|
Beautifier = require('./beautifier')
|
||||||
|
|
||||||
|
module.exports = class Brittany extends Beautifier
|
||||||
|
name: "brittany"
|
||||||
|
link: "https://github.com/lspitzner/brittany"
|
||||||
|
isPreInstalled: false
|
||||||
|
|
||||||
|
options: {
|
||||||
|
Haskell: true
|
||||||
|
}
|
||||||
|
|
||||||
|
beautify: (text, language, options) ->
|
||||||
|
@run("brittany", [
|
||||||
|
@tempFile("input", text)
|
||||||
|
], {
|
||||||
|
help: {
|
||||||
|
link: "https://github.com/lspitzner/brittany"
|
||||||
|
}
|
||||||
|
})
|
|
@ -0,0 +1,27 @@
|
||||||
|
###
|
||||||
|
Requires https://github.com/commercialhaskell/hindent
|
||||||
|
###
|
||||||
|
|
||||||
|
"use strict"
|
||||||
|
Beautifier = require('./beautifier')
|
||||||
|
|
||||||
|
module.exports = class Hindent extends Beautifier
|
||||||
|
name: "hindent"
|
||||||
|
link: "https://github.com/commercialhaskell/hindent"
|
||||||
|
isPreInstalled: false
|
||||||
|
|
||||||
|
options: {
|
||||||
|
Haskell: true
|
||||||
|
}
|
||||||
|
|
||||||
|
beautify: (text, language, options) ->
|
||||||
|
@run("hindent", [
|
||||||
|
tempFile = @tempFile("temp", text)
|
||||||
|
], {
|
||||||
|
help: {
|
||||||
|
link: "https://github.com/commercialhaskell/hindent"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(=>
|
||||||
|
@readFile(tempFile)
|
||||||
|
)
|
|
@ -37,6 +37,7 @@ module.exports = class Beautifiers extends EventEmitter
|
||||||
'uncrustify'
|
'uncrustify'
|
||||||
'align-yaml'
|
'align-yaml'
|
||||||
'autopep8'
|
'autopep8'
|
||||||
|
'brittany'
|
||||||
'coffee-formatter'
|
'coffee-formatter'
|
||||||
'coffee-fmt'
|
'coffee-fmt'
|
||||||
'cljfmt'
|
'cljfmt'
|
||||||
|
@ -52,6 +53,7 @@ module.exports = class Beautifiers extends EventEmitter
|
||||||
'goimports'
|
'goimports'
|
||||||
'latex-beautify'
|
'latex-beautify'
|
||||||
'fortran-beautifier'
|
'fortran-beautifier'
|
||||||
|
'hindent'
|
||||||
'js-beautify'
|
'js-beautify'
|
||||||
'jscs'
|
'jscs'
|
||||||
'eslint'
|
'eslint'
|
||||||
|
|
|
@ -17,6 +17,8 @@ module.exports = {
|
||||||
"hs"
|
"hs"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
defaultBeautifier: "stylish-haskell"
|
||||||
|
|
||||||
options: []
|
options: []
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2395,6 +2395,8 @@
|
||||||
"description": "Options for language Haskell",
|
"description": "Options for language Haskell",
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"beautifiers": [
|
"beautifiers": [
|
||||||
|
"brittany",
|
||||||
|
"hindent",
|
||||||
"stylish-haskell"
|
"stylish-haskell"
|
||||||
],
|
],
|
||||||
"grammars": [
|
"grammars": [
|
||||||
|
@ -2415,9 +2417,11 @@
|
||||||
"title": "Default Beautifier",
|
"title": "Default Beautifier",
|
||||||
"order": -2,
|
"order": -2,
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "stylish-haskell",
|
"default": "brittany",
|
||||||
"description": "Default Beautifier to be used for Haskell",
|
"description": "Default Beautifier to be used for Haskell",
|
||||||
"enum": [
|
"enum": [
|
||||||
|
"brittany",
|
||||||
|
"hindent",
|
||||||
"stylish-haskell"
|
"stylish-haskell"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue