diff options
Diffstat (limited to 'README.markdown')
-rw-r--r-- | README.markdown | 64 |
1 files changed, 35 insertions, 29 deletions
diff --git a/README.markdown b/README.markdown index d271b4c..335d8c6 100644 --- a/README.markdown +++ b/README.markdown @@ -17,6 +17,8 @@ Features - Groups and wraps `{-# LANGUAGE #-}` pragmas, can remove (some) redundant pragmas - Removes trailing whitespace +- Aligns branches in `case` and fields in records +- Converts line endings (customizable) - Replaces tabs by four spaces (turned off by default) - Replaces some ASCII sequences by their Unicode equivalents (turned off by default) @@ -30,43 +32,46 @@ Example Turns: - {-# LANGUAGE ViewPatterns, TemplateHaskell #-} - {-# LANGUAGE GeneralizedNewtypeDeriving, - ViewPatterns, - ScopedTypeVariables #-} +```haskell +{-# LANGUAGE ViewPatterns, TemplateHaskell #-} +{-# LANGUAGE GeneralizedNewtypeDeriving, + ViewPatterns, + ScopedTypeVariables #-} - module Bad where +module Bad where - import Control.Applicative ((<$>)) - import System.Directory (doesFileExist) +import Control.Applicative ((<$>)) +import System.Directory (doesFileExist) - import qualified Data.Map as M - import Data.Map ((!), keys, Map) +import qualified Data.Map as M +import Data.Map ((!), keys, Map) - data Point = Point - { pointX, pointY :: Double - , pointName :: String - } deriving (Show) +data Point = Point + { pointX, pointY :: Double + , pointName :: String + } deriving (Show) +``` into: - {-# LANGUAGE GeneralizedNewtypeDeriving #-} - {-# LANGUAGE ScopedTypeVariables #-} - {-# LANGUAGE TemplateHaskell #-} +```haskell +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TemplateHaskell #-} - module Bad where +module Bad where - import Control.Applicative ((<$>)) - import System.Directory (doesFileExist) +import Control.Applicative ((<$>)) +import System.Directory (doesFileExist) - import Data.Map (Map, keys, (!)) - import qualified Data.Map as M - - data Point = Point - { pointX, pointY :: Double - , pointName :: String - } deriving (Show) +import Data.Map (Map, keys, (!)) +import qualified Data.Map as M +data Point = Point + { pointX, pointY :: Double + , pointName :: String + } deriving (Show) +``` Configuration ------------- @@ -111,11 +116,12 @@ automatically when you save a Haskell file. Emacs integration ----------------- -[haskell-mode] for Emacs supports `stylish-haskell`. For configuration, see -[Emacs/Formatting] on the HaskellWiki. +[haskell-mode] for Emacs supports `stylish-haskell`. For configuration, +see [the “Using external formatters” section][haskell-mode/format] of the +haskell-mode manual. [haskell-mode]: https://github.com/haskell/haskell-mode -[Emacs/Formatting]: http://wiki.haskell.org/Emacs/Formatting +[haskell-mode/format]: http://haskell.github.io/haskell-mode/manual/latest/Autoformating.html Atom integration ---------------- |