Safe Haskell | Safe-Inferred |
---|---|
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 {
- srcSpanFilename :: String
- srcSpanStartLine :: Int
- srcSpanStartColumn :: Int
- srcSpanEndLine :: Int
- srcSpanEndColumn :: Int
- 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 |
Constructors
Penalty Int |
A pretty printing monad.
Constructors
Printer | |
Fields
|
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
FromJSON Config # | |
Defined in Floskell.Config | |
ToJSON Config # | |
Defined in Floskell.Config | |
Generic Config # | |
Default Config # | |
Defined in Floskell.Config | |
type Rep Config # | |
Defined in Floskell.Config type Rep Config = D1 ('MetaData "Config" "Floskell.Config" "floskell-0.11.0-FcCpf6QupMgIc5qNTp9SwN" 'False) (C1 ('MetaCons "Config" 'PrefixI 'True) ((S1 ('MetaSel ('Just "cfgPenalty") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PenaltyConfig) :*: (S1 ('MetaSel ('Just "cfgAlign") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AlignConfig) :*: S1 ('MetaSel ('Just "cfgIndent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IndentConfig))) :*: ((S1 ('MetaSel ('Just "cfgLayout") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LayoutConfig) :*: S1 ('MetaSel ('Just "cfgOp") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OpConfig)) :*: (S1 ('MetaSel ('Just "cfgGroup") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GroupConfig) :*: S1 ('MetaSel ('Just "cfgOptions") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OptionConfig))))) |
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 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 | |
Show SrcSpan | |
Eq SrcSpan | |
Ord SrcSpan | |
Pretty SrcSpan | |
Defined in Language.Haskell.Exts.Pretty | |
SrcInfo SrcSpan | |
Defined in Language.Haskell.Exts.SrcLoc | |
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-6bq8L1rOeseFIOXsg52Nca" '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 # | |
Defined in Floskell.Config | |
Enum Location # | |
Defined in Floskell.Config | |
Generic Location # | |
Show Location # | |
Eq Location # | |
Ord Location # | |
type Rep Location # | |
Defined in Floskell.Config type Rep Location = D1 ('MetaData "Location" "Floskell.Config" "floskell-0.11.0-FcCpf6QupMgIc5qNTp9SwN" 'False) (C1 ('MetaCons "Before" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "After" 'PrefixI 'False) (U1 :: Type -> Type)) |