commonmark-extensions-0.2.7.1: Pure Haskell commonmark parser.

Safe Haskell | None
Language | Haskell2010

Commonmark.Extensions.PipeTable

Synopsis

- class HasPipeTable il bl where
  - pipeTable :: [ColAlignment] -> [il] -> [[il]] -> bl
- data ColAlignment
  - = LeftAlignedCol
  - | CenterAlignedCol
  - | RightAlignedCol
  - | DefaultAlignedCol
- pipeTableSpec :: forall (m :: Type -> Type) il bl. (Monad m, IsBlock il bl, IsInline il, HasPipeTable il bl) => SyntaxSpec m il bl

# Documentation

class HasPipeTable il bl where Source #

Methods

pipeTable :: [ColAlignment] -> [il] -> [[il]] -> bl Source #

#### Instances

Instances details

HasPipeTable (Html a) (Html a) Source # |
Instance details Defined in Commonmark.Extensions.PipeTable Methods pipeTable :: [ColAlignment] -> [Html a] -> [[Html a]] -> Html a Source #
(HasPipeTable i b, Monoid b) => HasPipeTable (WithSourceMap i) (WithSourceMap b) Source # |
Instance details Defined in Commonmark.Extensions.PipeTable Methods pipeTable :: [ColAlignment] -> [WithSourceMap i] -> [[WithSourceMap i]] -> WithSourceMap b Source #

data ColAlignment Source #

Constructors

LeftAlignedCol |
CenterAlignedCol |
RightAlignedCol |
DefaultAlignedCol |

#### Instances

Instances details

Data ColAlignment Source # |

Instance details

Defined in Commonmark.Extensions.PipeTable

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ColAlignment -> c ColAlignment Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ColAlignment Source #

toConstr :: ColAlignment -> Constr Source #

dataTypeOf :: ColAlignment -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ColAlignment) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ColAlignment) Source #

gmapT :: (forall b. Data b => b -> b) -> ColAlignment -> ColAlignment Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ColAlignment -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ColAlignment -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> ColAlignment -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ColAlignment -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ColAlignment -> m ColAlignment Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ColAlignment -> m ColAlignment Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ColAlignment -> m ColAlignment Source #

Show ColAlignment Source # |
Instance details Defined in Commonmark.Extensions.PipeTable Methods showsPrec :: Int -> ColAlignment -> ShowS Source # show :: ColAlignment -> String Source # showList :: [ColAlignment] -> ShowS Source #
Eq ColAlignment Source # |
Instance details Defined in Commonmark.Extensions.PipeTable Methods (==) :: ColAlignment -> ColAlignment -> Bool Source # (/=) :: ColAlignment -> ColAlignment -> Bool Source #

pipeTableSpec :: forall (m :: Type -> Type) il bl. (Monad m, IsBlock il bl, IsInline il, HasPipeTable il bl) => SyntaxSpec m il bl Source #

Syntax for pipe tables. Note that this should generally be placed AFTER the syntax spec for lists, headings, and other block-level constructs, to avoid bad results when non-table lines contain pipe characters: use `defaultSyntaxSpec <> pipeTableSpec` rather than `pipeTableSpec <> defaultSyntaxSpec`.