-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell source code formatter -- -- The Haskell Formatter formats Haskell source code. It is strict in -- that it fundamentally rearranges code. @package haskell-formatter @version 2.0.2 module Language.Haskell.Formatter.Internal.Newline -- | Unicode newline strings ordered by descending length. This corresponds -- to the set of newlines from -- http://www.unicode.org/standard/reports/tr13/tr13-5.html. newlines :: [String] -- | Concatenates strings with default newlines "\n" between. -- -- Unlike unlines, this does not append a newline to the last -- string. -- --
-- >>> joinSeparatedLines ["apple", "pine"] -- "apple\npine" --joinSeparatedLines :: [String] -> String -- | Breaks a string up into its lines at newlines. The resulting -- strings do not contain newlines. -- -- Unlike lines, this interprets a newline as a separator, not a -- terminator. Thus, if the input string ends with a newline, the output -- list ends with the empty string. -- --
-- >>> splitSeparatedLines "0\n1\r2\r\n3\n\r4" -- ["0","1","2","3","","4"] ---- --
-- last (splitSeparatedLines $ s ++ "\LF") == "" --splitSeparatedLines :: String -> [String] module Language.Haskell.Formatter.Internal.MapTree data MapTree k a Leaf :: a -> MapTree k a Node :: MapForest k a -> MapTree k a type MapForest k a = Map k (MapTree k a) isEmpty :: MapTree k a -> Bool summarizeLeaves :: (Ord k, Monoid b) => MapForest k (Either a b) -> MapTree k (Either a (Map k b)) indentTree :: MapTree String String -> String instance (GHC.Show.Show a, GHC.Show.Show k) => GHC.Show.Show (Language.Haskell.Formatter.Internal.MapTree.MapTree k a) instance (GHC.Classes.Ord a, GHC.Classes.Ord k) => GHC.Classes.Ord (Language.Haskell.Formatter.Internal.MapTree.MapTree k a) instance (GHC.Classes.Eq a, GHC.Classes.Eq k) => GHC.Classes.Eq (Language.Haskell.Formatter.Internal.MapTree.MapTree k a) instance GHC.Base.Functor (Language.Haskell.Formatter.Internal.MapTree.MapTree k) module Language.Haskell.Formatter.Internal.TreeFormat type TreeFormat a = MapForest String (Leaf a) data Leaf a Boolean :: RawLeaf Bool a -> Leaf a LimitedInteger :: RawLeaf Int a -> Leaf a SingleFloating :: RawLeaf Float a -> Leaf a parseYamlFile :: TreeFormat a -> a -> FilePath -> IO (Either String a) module Language.Haskell.Formatter data Configuration defaultConfiguration :: Configuration data Error isAssertionError :: Error -> Bool defaultFormat :: String -> Either Error String format :: Configuration -> String -> Either Error String -- | Creates a StreamName. show is guaranteed to return this -- string. -- --
-- show (createStreamName s) == s --createStreamName :: String -> StreamName -- | The standard input stream (stdin). standardInput :: StreamName -- | An informal reference to a data stream. For example, this could be the -- name of a file stream to be used in error messages. data StreamName -- | Number of characters used to indent. type Indentation = Int data Style defaultStyle :: Style module Language.Haskell.Formatter.Internal.StyleFileFormat treeFormat :: TreeFormat Style