floskell-0.11.0: A flexible Haskell source code pretty printer
Safe HaskellSafe-Inferred
LanguageHaskell2010

Floskell.Types

Description

All types.

Synopsis

Documentation

data TypeLayout #

Instances

Instances details
Show TypeLayout # 
Instance details

Defined in Floskell.Types

Methods

showsPrec :: Int -> TypeLayout -> ShowS

show :: TypeLayout -> String

showList :: [TypeLayout] -> ShowS

Eq TypeLayout # 
Instance details

Defined in Floskell.Types

Methods

(==) :: TypeLayout -> TypeLayout -> Bool

(/=) :: TypeLayout -> TypeLayout -> Bool

Ord TypeLayout # 
Instance details

Defined in Floskell.Types

newtype Penalty #

Constructors

Penalty Int 

Instances

Instances details
Monoid Penalty # 
Instance details

Defined in Floskell.Types

Semigroup Penalty # 
Instance details

Defined in Floskell.Types

Methods

(<>) :: Penalty -> Penalty -> Penalty #

sconcat :: NonEmpty Penalty -> Penalty

stimes :: Integral b => b -> Penalty -> Penalty

Num Penalty # 
Instance details

Defined in Floskell.Types

Show Penalty # 
Instance details

Defined in Floskell.Types

Methods

showsPrec :: Int -> Penalty -> ShowS

show :: Penalty -> String

showList :: [Penalty] -> ShowS

Eq Penalty # 
Instance details

Defined in Floskell.Types

Methods

(==) :: Penalty -> Penalty -> Bool

(/=) :: Penalty -> Penalty -> Bool

Ord Penalty # 
Instance details

Defined in Floskell.Types

Methods

compare :: Penalty -> Penalty -> Ordering

(<) :: Penalty -> Penalty -> Bool

(<=) :: Penalty -> Penalty -> Bool

(>) :: Penalty -> Penalty -> Bool

(>=) :: Penalty -> Penalty -> Bool

max :: Penalty -> Penalty -> Penalty

min :: Penalty -> Penalty -> Penalty

MonadSearch Penalty Printer # 
Instance details

Defined in Floskell.Types

newtype TabStop #

Constructors

TabStop String 

Instances

Instances details
Show TabStop # 
Instance details

Defined in Floskell.Types

Methods

showsPrec :: Int -> TabStop -> ShowS

show :: TabStop -> String

showList :: [TabStop] -> ShowS

Eq TabStop # 
Instance details

Defined in Floskell.Types

Methods

(==) :: TabStop -> TabStop -> Bool

(/=) :: TabStop -> TabStop -> Bool

Ord TabStop # 
Instance details

Defined in Floskell.Types

Methods

compare :: TabStop -> TabStop -> Ordering

(<) :: TabStop -> TabStop -> Bool

(<=) :: TabStop -> TabStop -> Bool

(>) :: TabStop -> TabStop -> Bool

(>=) :: TabStop -> TabStop -> Bool

max :: TabStop -> TabStop -> TabStop

min :: TabStop -> TabStop -> TabStop

newtype Printer a #

A pretty printing monad.

Constructors

Printer 

Fields

Instances

Instances details
Alternative Printer # 
Instance details

Defined in Floskell.Types

Methods

empty :: Printer a

(<|>) :: Printer a -> Printer a -> Printer a

some :: Printer a -> Printer [a]

many :: Printer a -> Printer [a]

Applicative Printer # 
Instance details

Defined in Floskell.Types

Methods

pure :: a -> Printer a #

(<*>) :: Printer (a -> b) -> Printer a -> Printer b

liftA2 :: (a -> b -> c) -> Printer a -> Printer b -> Printer c

(*>) :: Printer a -> Printer b -> Printer b

(<*) :: Printer a -> Printer b -> Printer a

Functor Printer # 
Instance details

Defined in Floskell.Types

Methods

fmap :: (a -> b) -> Printer a -> Printer b #

(<$) :: a -> Printer b -> Printer a #

Monad Printer # 
Instance details

Defined in Floskell.Types

Methods

(>>=) :: Printer a -> (a -> Printer b) -> Printer b

(>>) :: Printer a -> Printer b -> Printer b

return :: a -> Printer a #

MonadPlus Printer # 
Instance details

Defined in Floskell.Types

Methods

mzero :: Printer a

mplus :: Printer a -> Printer a -> Printer a

MonadSearch Penalty Printer # 
Instance details

Defined in Floskell.Types

MonadState PrintState Printer # 
Instance details

Defined in Floskell.Types

runPrinter :: Printer a -> PrintState -> Maybe (Penalty, (a, PrintState)) #

data PrintState #

The state of the pretty printer.

Constructors

PrintState 

Fields

Instances

Instances details
MonadState PrintState Printer # 
Instance details

Defined in Floskell.Types

psLine :: PrintState -> Int #

data Config #

Instances

Instances details
FromJSON Config # 
Instance details

Defined in Floskell.Config

ToJSON Config # 
Instance details

Defined in Floskell.Config

Generic Config # 
Instance details

Defined in Floskell.Config

Associated Types

type Rep Config :: Type -> Type

Methods

from :: Config -> Rep Config x

to :: Rep Config x -> Config

Default Config # 
Instance details

Defined in Floskell.Config

Methods

def :: Config #

type Rep Config # 
Instance details

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)))))

data SrcSpan #

A portion of the source, spanning one or more lines and zero or more columns.

Constructors

SrcSpan 

Fields

Instances

Instances details
Data SrcSpan 
Instance details

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 
Instance details

Defined in Language.Haskell.Exts.SrcLoc

Associated Types

type Rep SrcSpan :: Type -> Type

Methods

from :: SrcSpan -> Rep SrcSpan x

to :: Rep SrcSpan x -> SrcSpan

Show SrcSpan 
Instance details

Defined in Language.Haskell.Exts.SrcLoc

Methods

showsPrec :: Int -> SrcSpan -> ShowS

show :: SrcSpan -> String

showList :: [SrcSpan] -> ShowS

Eq SrcSpan 
Instance details

Defined in Language.Haskell.Exts.SrcLoc

Methods

(==) :: SrcSpan -> SrcSpan -> Bool

(/=) :: SrcSpan -> SrcSpan -> Bool

Ord SrcSpan 
Instance details

Defined in Language.Haskell.Exts.SrcLoc

Methods

compare :: SrcSpan -> SrcSpan -> Ordering

(<) :: SrcSpan -> SrcSpan -> Bool

(<=) :: SrcSpan -> SrcSpan -> Bool

(>) :: SrcSpan -> SrcSpan -> Bool

(>=) :: SrcSpan -> SrcSpan -> Bool

max :: SrcSpan -> SrcSpan -> SrcSpan

min :: SrcSpan -> SrcSpan -> SrcSpan

Pretty SrcSpan 
Instance details

Defined in Language.Haskell.Exts.Pretty

Methods

pretty :: SrcSpan -> Doc

prettyPrec :: Int -> SrcSpan -> Doc

SrcInfo SrcSpan 
Instance details

Defined in Language.Haskell.Exts.SrcLoc

type Rep SrcSpan 
Instance details

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 #

Instances

Instances details
Show CommentType # 
Instance details

Defined in Floskell.Types

Methods

showsPrec :: Int -> CommentType -> ShowS

show :: CommentType -> String

showList :: [CommentType] -> ShowS

data Comment #

Constructors

Comment 

Instances

Instances details
Show Comment # 
Instance details

Defined in Floskell.Types

Methods

showsPrec :: Int -> Comment -> ShowS

show :: Comment -> String

showList :: [Comment] -> ShowS

data NodeInfo #

Information for each node in the AST.

Constructors

NodeInfo 

Fields

Instances

Instances details
Show NodeInfo # 
Instance details

Defined in Floskell.Types

Methods

showsPrec :: Int -> NodeInfo -> ShowS

show :: NodeInfo -> String

showList :: [NodeInfo] -> ShowS

noNodeInfo :: NodeInfo #

Empty NodeInfo

data Location #

Constructors

Before 
After 

Instances

Instances details
Bounded Location # 
Instance details

Defined in Floskell.Config

Enum Location # 
Instance details

Defined in Floskell.Config

Generic Location # 
Instance details

Defined in Floskell.Config

Associated Types

type Rep Location :: Type -> Type

Methods

from :: Location -> Rep Location x

to :: Rep Location x -> Location

Show Location # 
Instance details

Defined in Floskell.Config

Methods

showsPrec :: Int -> Location -> ShowS

show :: Location -> String

showList :: [Location] -> ShowS

Eq Location # 
Instance details

Defined in Floskell.Config

Methods

(==) :: Location -> Location -> Bool

(/=) :: Location -> Location -> Bool

Ord Location # 
Instance details

Defined in Floskell.Config

Methods

compare :: Location -> Location -> Ordering

(<) :: Location -> Location -> Bool

(<=) :: Location -> Location -> Bool

(>) :: Location -> Location -> Bool

(>=) :: Location -> Location -> Bool

max :: Location -> Location -> Location

min :: Location -> Location -> Location

type Rep Location # 
Instance details

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))