Safe Haskell | None |
---|---|
Language | Haskell98 |
Stub module for Johan Tibell's style.
Documented here: https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
Questions:
How to indent after a guarded alt/rhs? How to indent let? How to indent large ADT constructors types?
- shortName :: Int64
- data State = State
- johanTibell :: Style
- stmt :: Stmt NodeInfo -> Printer s ()
- rhs :: Rhs NodeInfo -> Printer s ()
- guardedRhs :: GuardedRhs NodeInfo -> Printer s ()
- unguardedalt :: Rhs NodeInfo -> Printer s ()
- unguardedrhs :: Rhs NodeInfo -> Printer s ()
- exp :: Exp NodeInfo -> Printer s ()
- decl :: Decl NodeInfo -> Printer s ()
- qualConDecl :: QualConDecl NodeInfo -> Printer s ()
- conDecl :: ConDecl NodeInfo -> Printer s ()
- recDecl :: ConDecl NodeInfo -> Printer s ()
- recUpdateExpr :: Printer s () -> [FieldUpdate NodeInfo] -> Printer s ()
- isRecord :: QualConDecl t -> Bool
- isOverflow :: Printer s a -> Printer s Bool
- isSingleLiner :: MonadState (PrintState s) m => m a -> m Bool
- isShort :: Pretty ast => ast NodeInfo -> Printer s Bool
- isFlat :: Exp NodeInfo -> Printer s Bool
- fieldupdate :: FieldUpdate NodeInfo -> Printer s ()
Documentation
The printer style.
guardedRhs :: GuardedRhs NodeInfo -> Printer s () Source
Handle do specially.
Implement dangling right-hand-sides.
unguardedalt :: Rhs NodeInfo -> Printer s () Source
Unguarded case alts.
unguardedrhs :: Rhs NodeInfo -> Printer s () Source
decl :: Decl NodeInfo -> Printer s () Source
Pretty print type signatures like
foo :: (Show x,Read x) => (Foo -> Bar) -> Maybe Int -> (Char -> X -> Y) -> IO ()
Specially format records. Indent where clauses only 2 spaces.
qualConDecl :: QualConDecl NodeInfo -> Printer s () Source
Use special record display, used by dataDecl
in a record scenario.
recUpdateExpr :: Printer s () -> [FieldUpdate NodeInfo] -> Printer s () Source
isRecord :: QualConDecl t -> Bool Source
Is the decl a record?
isOverflow :: Printer s a -> Printer s Bool Source
Does printing the given thing overflow column limit? (e.g. 80)
isSingleLiner :: MonadState (PrintState s) m => m a -> m Bool Source
Is the given expression a single-liner when printed?
isShort :: Pretty ast => ast NodeInfo -> Printer s Bool Source
Is the expression "short"? Used for app heads.
fieldupdate :: FieldUpdate NodeInfo -> Printer s () Source
rhs on field update on the same line as lhs.