Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Options = Options {}
- defaultOptions :: Options
- data ImportAlign
- data ListAlign
- data LongListAlign
- data EmptyListAlign
- data ListPadding
- data GroupRule = GroupRule {}
- step :: Maybe Int -> Options -> Step
- printImport :: Bool -> IE GhcPs -> P ()
- parsePattern :: String -> Either String Pattern
- unsafeParsePattern :: String -> Pattern
Documentation
Options | |
|
data ImportAlign Source #
Instances
Show ImportAlign Source # | |
Defined in Language.Haskell.Stylish.Step.Imports showsPrec :: Int -> ImportAlign -> ShowS # show :: ImportAlign -> String # showList :: [ImportAlign] -> ShowS # | |
Eq ImportAlign Source # | |
Defined in Language.Haskell.Stylish.Step.Imports (==) :: ImportAlign -> ImportAlign -> Bool # (/=) :: ImportAlign -> ImportAlign -> Bool # |
data LongListAlign Source #
Instances
Show LongListAlign Source # | |
Defined in Language.Haskell.Stylish.Step.Imports showsPrec :: Int -> LongListAlign -> ShowS # show :: LongListAlign -> String # showList :: [LongListAlign] -> ShowS # | |
Eq LongListAlign Source # | |
Defined in Language.Haskell.Stylish.Step.Imports (==) :: LongListAlign -> LongListAlign -> Bool # (/=) :: LongListAlign -> LongListAlign -> Bool # |
data EmptyListAlign Source #
Instances
Show EmptyListAlign Source # | |
Defined in Language.Haskell.Stylish.Step.Imports showsPrec :: Int -> EmptyListAlign -> ShowS # show :: EmptyListAlign -> String # showList :: [EmptyListAlign] -> ShowS # | |
Eq EmptyListAlign Source # | |
Defined in Language.Haskell.Stylish.Step.Imports (==) :: EmptyListAlign -> EmptyListAlign -> Bool # (/=) :: EmptyListAlign -> EmptyListAlign -> Bool # |
data ListPadding Source #
Instances
Show ListPadding Source # | |
Defined in Language.Haskell.Stylish.Step.Imports showsPrec :: Int -> ListPadding -> ShowS # show :: ListPadding -> String # showList :: [ListPadding] -> ShowS # | |
Eq ListPadding Source # | |
Defined in Language.Haskell.Stylish.Step.Imports (==) :: ListPadding -> ListPadding -> Bool # (/=) :: ListPadding -> ListPadding -> Bool # |
A rule for grouping imports that specifies which module names belong in a group and (optionally) how to break them up into sub-groups.
See the documentation for the group_rules setting in data/stylish-haskell.yaml for more details.
parsePattern :: String -> Either String Pattern Source #
Parse a string into a compiled regular expression (Pattern
).
Returns a human-readable parse error message if the string is not valid regex syntax.
>>>
parsePattern "^([^.]+)"
Right "^([^.]+)"
>>>
parsePattern "("
Left "\"(\" (line 1, column 2):\nunexpected end of input\nexpecting empty () or anchor ^ or $ or an atom"
unsafeParsePattern :: String -> Pattern Source #
Parse a string into a regular expression, raising a runtime exception if the string is not valid regex syntax.
>>>
unsafeParsePattern "^([^.]+)"
"^([^.]+)"
>>>
unsafeParsePattern "("
"*** Exception: "(" (line 1, column 2): unexpected end of input expecting empty () or anchor ^ or $ or an atom