Safe Haskell | None |
---|---|
Language | Haskell98 |
All types.
Synopsis
- data OutputRestriction
- newtype Penalty = Penalty Int
- newtype TabStop = TabStop String
- newtype Printer a = Printer {
- unPrinter :: StateT PrintState (Search Penalty) a
- execPrinter :: Printer a -> PrintState -> Maybe (Penalty, PrintState)
- runPrinter :: Printer a -> PrintState -> Maybe (Penalty, (a, PrintState))
- data PrintState = PrintState {
- psBuffer :: !Buffer
- psIndentLevel :: !Int64
- psOnside :: !Int64
- psTabStops :: !(Map TabStop Int64)
- psUserState :: !FlexConfig
- psEolComment :: !Bool
- psOutputRestriction :: OutputRestriction
- psLine :: PrintState -> Int64
- psColumn :: PrintState -> Int64
- psNewline :: PrintState -> Bool
- data Style = Style {
- styleName :: !Text
- styleAuthor :: !Text
- styleDescription :: !Text
- styleInitialState :: !FlexConfig
- data FlexConfig = FlexConfig {
- cfgPenalty :: !PenaltyConfig
- cfgAlign :: !AlignConfig
- cfgIndent :: !IndentConfig
- cfgLayout :: !LayoutConfig
- cfgOp :: !OpConfig
- cfgGroup :: !GroupConfig
- cfgOptions :: !OptionConfig
- data NodeInfo = NodeInfo {
- nodeInfoSpan :: !SrcSpanInfo
- nodeInfoComments :: ![ComInfo]
- data ComInfo = ComInfo {
- comInfoComment :: !Comment
- comInfoLocation :: !(Maybe Location)
- data Location
Documentation
data OutputRestriction Source #
Instances
Eq OutputRestriction Source # | |
Defined in Floskell.Types (==) :: OutputRestriction -> OutputRestriction -> Bool # (/=) :: OutputRestriction -> OutputRestriction -> Bool # | |
Ord OutputRestriction Source # | |
Defined in Floskell.Types compare :: OutputRestriction -> OutputRestriction -> Ordering # (<) :: OutputRestriction -> OutputRestriction -> Bool # (<=) :: OutputRestriction -> OutputRestriction -> Bool # (>) :: OutputRestriction -> OutputRestriction -> Bool # (>=) :: OutputRestriction -> OutputRestriction -> Bool # max :: OutputRestriction -> OutputRestriction -> OutputRestriction # min :: OutputRestriction -> OutputRestriction -> OutputRestriction # | |
Show OutputRestriction Source # | |
Defined in Floskell.Types showsPrec :: Int -> OutputRestriction -> ShowS # show :: OutputRestriction -> String # showList :: [OutputRestriction] -> ShowS # |
A pretty printing monad.
Instances
Monad Printer Source # | |
Functor Printer Source # | |
Applicative Printer Source # | |
Alternative Printer Source # | |
MonadPlus Printer Source # | |
MonadSearch Penalty Printer Source # | |
MonadState PrintState Printer Source # | |
Defined in Floskell.Types get :: Printer PrintState # put :: PrintState -> Printer () # state :: (PrintState -> (a, PrintState)) -> Printer a # |
execPrinter :: Printer a -> PrintState -> Maybe (Penalty, PrintState) Source #
runPrinter :: Printer a -> PrintState -> Maybe (Penalty, (a, PrintState)) Source #
data PrintState Source #
The state of the pretty printer.
PrintState | |
|
Instances
MonadState PrintState Printer Source # | |
Defined in Floskell.Types get :: Printer PrintState # put :: PrintState -> Printer () # state :: (PrintState -> (a, PrintState)) -> Printer a # |
psLine :: PrintState -> Int64 Source #
psColumn :: PrintState -> Int64 Source #
psNewline :: PrintState -> Bool Source #
A printer style.
Style | |
|
data FlexConfig Source #
FlexConfig | |
|
Instances
Information for each node in the AST.
NodeInfo | |
|
Comment with some more info.
ComInfo | |
|
Instances
Bounded Location Source # | |
Enum Location Source # | |
Eq Location Source # | |
Ord Location Source # | |
Defined in Floskell.Config | |
Show Location Source # | |
Generic Location Source # | |
type Rep Location Source # | |