| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Floskell.Types
Description
All types.
Synopsis
- data OutputRestriction
- data TypeLayout
- 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 :: !Int
- psOnside :: !Int
- psTabStops :: !(Map TabStop Int)
- psConfig :: !Config
- psEolComment :: !Bool
- psOutputRestriction :: !OutputRestriction
- psTypeLayout :: !TypeLayout
- psLine :: PrintState -> Int
- psColumn :: PrintState -> Int
- psNewline :: PrintState -> Bool
- initialPrintState :: Config -> PrintState
- data Config = Config {
- cfgPenalty :: !PenaltyConfig
- cfgAlign :: !AlignConfig
- cfgIndent :: !IndentConfig
- cfgLayout :: !LayoutConfig
- cfgOp :: !OpConfig
- cfgGroup :: !GroupConfig
- cfgOptions :: !OptionConfig
- data SrcSpan = SrcSpan {}
- data CommentType
- data Comment = Comment {
- commentType :: !CommentType
- commentSpan :: !SrcSpan
- commentText :: !String
- data NodeInfo = NodeInfo {}
- noNodeInfo :: NodeInfo
- nodeSpan :: Annotated ast => ast NodeInfo -> SrcSpan
- data Location
Documentation
data OutputRestriction #
Constructors
| Anything | |
| NoOverflow | |
| NoOverflowOrLinebreak |
Instances
| Show OutputRestriction # | |
Defined in Floskell.Types Methods showsPrec :: Int -> OutputRestriction -> ShowS # show :: OutputRestriction -> String # showList :: [OutputRestriction] -> ShowS # | |
| Eq OutputRestriction # | |
Defined in Floskell.Types Methods (==) :: OutputRestriction -> OutputRestriction -> Bool # (/=) :: OutputRestriction -> OutputRestriction -> Bool # | |
| Ord OutputRestriction # | |
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 # | |
data TypeLayout #
Constructors
| TypeFree | |
| TypeFlex | |
| TypeVertical |
Instances
| Show TypeLayout # | |
Defined in Floskell.Types Methods showsPrec :: Int -> TypeLayout -> ShowS # show :: TypeLayout -> String # showList :: [TypeLayout] -> ShowS # | |
| Eq TypeLayout # | |
Defined in Floskell.Types | |
| Ord TypeLayout # | |
Defined in Floskell.Types Methods compare :: TypeLayout -> TypeLayout -> Ordering # (<) :: TypeLayout -> TypeLayout -> Bool # (<=) :: TypeLayout -> TypeLayout -> Bool # (>) :: TypeLayout -> TypeLayout -> Bool # (>=) :: TypeLayout -> TypeLayout -> Bool # max :: TypeLayout -> TypeLayout -> TypeLayout # min :: TypeLayout -> TypeLayout -> TypeLayout # | |
A pretty printing monad.
Instances
| Alternative Printer # | |
| Applicative Printer # | |
| Functor Printer # | |
| Monad Printer # | |
| MonadPlus Printer # | |
| MonadSearch Penalty Printer # | |
| MonadState PrintState Printer # | |
Defined in Floskell.Types Methods get :: Printer PrintState # put :: PrintState -> Printer () # state :: (PrintState -> (a, PrintState)) -> Printer a # | |
execPrinter :: Printer a -> PrintState -> Maybe (Penalty, PrintState) #
runPrinter :: Printer a -> PrintState -> Maybe (Penalty, (a, PrintState)) #
data PrintState #
The state of the pretty printer.
Constructors
| PrintState | |
Fields
| |
Instances
| MonadState PrintState Printer # | |
Defined in Floskell.Types Methods get :: Printer PrintState # put :: PrintState -> Printer () # state :: (PrintState -> (a, PrintState)) -> Printer a # | |
psLine :: PrintState -> Int #
psColumn :: PrintState -> Int #
psNewline :: PrintState -> Bool #
initialPrintState :: Config -> PrintState #
Constructors
| Config | |
Fields
| |
Instances
A portion of the source, spanning one or more lines and zero or more columns.
Constructors
| SrcSpan | |
Fields | |
Instances
| Data SrcSpan | |||||
Defined in Language.Haskell.Exts.SrcLoc Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcSpan -> c SrcSpan # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcSpan # toConstr :: SrcSpan -> Constr # dataTypeOf :: SrcSpan -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcSpan) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcSpan) # gmapT :: (forall b. Data b => b -> b) -> SrcSpan -> SrcSpan # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcSpan -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcSpan -> r # gmapQ :: (forall d. Data d => d -> u) -> SrcSpan -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcSpan -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan # | |||||
| Generic SrcSpan | |||||
Defined in Language.Haskell.Exts.SrcLoc Associated Types
| |||||
| Show SrcSpan | |||||
| Eq SrcSpan | |||||
| Ord SrcSpan | |||||
Defined in Language.Haskell.Exts.SrcLoc | |||||
| Pretty SrcSpan | |||||
Defined in Language.Haskell.Exts.Pretty | |||||
| SrcInfo SrcSpan | |||||
| type Rep SrcSpan | |||||
Defined in Language.Haskell.Exts.SrcLoc type Rep SrcSpan = D1 ('MetaData "SrcSpan" "Language.Haskell.Exts.SrcLoc" "haskell-src-exts-1.23.1-8C96B02krNlIzUsWmrchr6" 'False) (C1 ('MetaCons "SrcSpan" 'PrefixI 'True) ((S1 ('MetaSel ('Just "srcSpanFilename") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "srcSpanStartLine") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "srcSpanStartColumn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "srcSpanEndLine") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "srcSpanEndColumn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))) | |||||
data CommentType #
Constructors
| InlineComment | |
| LineComment | |
| PreprocessorDirective | |
| IgnoredLine |
Instances
| Show CommentType # | |
Defined in Floskell.Types Methods showsPrec :: Int -> CommentType -> ShowS # show :: CommentType -> String # showList :: [CommentType] -> ShowS # | |
Constructors
| Comment | |
Fields
| |
Information for each node in the AST.
Constructors
| NodeInfo | |
Fields
| |
noNodeInfo :: NodeInfo #
Empty NodeInfo
Instances
| Bounded Location # | |
| Enum Location # | |
| Generic Location # | |
Defined in Floskell.Config | |
| Show Location # | |
| Eq Location # | |
| Ord Location # | |
Defined in Floskell.Config | |
| type Rep Location # | |