| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Floskell.Types
Description
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 #
Constructors
| Anything | |
| NoOverflow | |
| NoOverflowOrLinebreak |
Instances
| Eq OutputRestriction Source # | |
Defined in Floskell.Types Methods (==) :: OutputRestriction -> OutputRestriction -> Bool # (/=) :: OutputRestriction -> OutputRestriction -> Bool # | |
| Ord OutputRestriction Source # | |
Defined in Floskell.Types Methods 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 Methods 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 Methods 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.
Constructors
| PrintState | |
Fields
| |
Instances
| MonadState PrintState Printer Source # | |
Defined in Floskell.Types Methods 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.
Constructors
| Style | |
Fields
| |
data FlexConfig Source #
Constructors
| FlexConfig | |
Fields
| |
Instances
Information for each node in the AST.
Constructors
| NodeInfo | |
Fields
| |
Comment with some more info.
Constructors
| ComInfo | |
Fields
| |
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 # | |