Safe Haskell | None |
---|---|
Language | Haskell98 |
Chris Done's style.
Documented here: https://github.com/chrisdone/haskell-style-guide
- shortName :: Int64
- smallColumnLimit :: Int64
- data State = State
- chrisDone :: Style
- decl :: Decl NodeInfo -> Printer s ()
- fieldupdate :: FieldUpdate NodeInfo -> Printer t ()
- rhs :: Rhs NodeInfo -> Printer t ()
- unguardedrhs :: Rhs NodeInfo -> Printer t ()
- unguardedalt :: Rhs NodeInfo -> Printer t ()
- contextualGuardedRhs :: GuardedRhs NodeInfo -> Printer t ()
- guardedrhs :: GuardedRhs NodeInfo -> Printer t ()
- guardedalt :: GuardedRhs NodeInfo -> Printer t ()
- stmt :: Stmt NodeInfo -> Printer t ()
- exp :: Exp NodeInfo -> Printer t ()
- sandboxSingles :: Pretty ast => [ast NodeInfo] -> Printer t (Bool, PrintState t)
- multi :: Pretty ast => Int64 -> [ast NodeInfo] -> Bool -> Printer t ()
- sandboxNonOverflowing :: Pretty ast => [ast NodeInfo] -> Printer t ((Bool, Bool), PrintState t)
- isShort :: Pretty ast => ast NodeInfo -> Printer t (Bool, PrintState t)
- isSmall :: MonadState (PrintState t) m => m a -> m (Bool, PrintState t)
- isFlat :: Exp NodeInfo -> Bool
- isOverflow :: Printer t a -> Printer t Bool
- isOverflowMax :: Printer t a -> Printer t Bool
- isSingleLiner :: MonadState (PrintState t) m => m a -> m Bool
- infixApp :: Exp NodeInfo -> Exp NodeInfo -> QOp NodeInfo -> Exp NodeInfo -> Maybe Int64 -> Printer s ()
- dependOrNewline :: Printer t () -> Exp NodeInfo -> (Exp NodeInfo -> Printer t ()) -> Printer t ()
Documentation
smallColumnLimit :: Int64 Source
Column limit: 50
decl :: Decl NodeInfo -> Printer s () Source
Pretty print type signatures like
foo :: (Show x,Read x) => (Foo -> Bar) -> Maybe Int -> (Char -> X -> Y) -> IO ()
fieldupdate :: FieldUpdate NodeInfo -> Printer t () Source
I want field updates to be dependent or newline.
unguardedrhs :: Rhs NodeInfo -> Printer t () Source
Right-hand sides are dependent.
unguardedalt :: Rhs NodeInfo -> Printer t () Source
Unguarded case alts.
contextualGuardedRhs :: GuardedRhs NodeInfo -> Printer t () Source
Decide whether to do alts or rhs based on the context.
guardedrhs :: GuardedRhs NodeInfo -> Printer t () Source
I want guarded RHS be dependent or newline.
guardedalt :: GuardedRhs NodeInfo -> Printer t () Source
I want guarded alts be dependent or newline.
sandboxSingles :: Pretty ast => [ast NodeInfo] -> Printer t (Bool, PrintState t) Source
Sandbox and render the nodes on multiple lines, returning whether each is a single line.
multi :: Pretty ast => Int64 -> [ast NodeInfo] -> Bool -> Printer t () Source
Render multi-line nodes.
sandboxNonOverflowing :: Pretty ast => [ast NodeInfo] -> Printer t ((Bool, Bool), PrintState t) Source
Sandbox and render the node on a single line, return whether it's on a single line and whether it's overflowing.
isShort :: Pretty ast => ast NodeInfo -> Printer t (Bool, PrintState t) Source
Is the expression "short"? Used for app heads.
isSmall :: MonadState (PrintState t) m => m a -> m (Bool, PrintState t) Source
Is the given expression "small"? I.e. does it fit on one line and
under smallColumnLimit
columns.
isOverflow :: Printer t a -> Printer t Bool Source
Does printing the given thing overflow column limit? (e.g. 80)
isOverflowMax :: Printer t a -> Printer t Bool Source
Does printing the given thing overflow column limit? (e.g. 80)
isSingleLiner :: MonadState (PrintState t) m => m a -> m Bool Source
Is the given expression a single-liner when printed?