miloszwasacz / haskell-formatter

Code formatter for Haskell extending hindent & stylish-haskell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Haskell formatter

VS Code formatter for Haskell extending hindent & stylish-haskell.

Requirements

This extension depends on hindent & stylish-haskell that you can install via stack:

stack install hindent
stack install stylish-haskell

or cabal:

cabal install hindent
cabal install stylish-haskell

Known Issues

Misidentifying = in guards

Example:

foo :: String -> String -> Double
foo a b
  | c == "Foo = 3" = 3.0
  | c == "BarBaz = 2" = 2.0
  where
    c = a ++ b

Workaround:

foo' :: String -> String -> Double
foo' a b
  | c == "Foo " ++ "=" ++ " 3" = 3.0
  | c == "BarBaz " ++ "=" ++ " 2" = 2.0
  where
    c = a ++ b

Release Notes

For detailed change list see CHANGELOG.

1.0.1

Minor bug fixes.

1.0.0

Initial release of Haskell Formatter.


Inspiration

This extension is based on stylish-hindent extension.

About

Code formatter for Haskell extending hindent & stylish-haskell

License:GNU Affero General Public License v3.0


Languages

Language:TypeScript 100.0%