literatex-0.1.0.2: transform literate source code to Markdown
CopyrightCopyright (c) 2021 Travis Cardwell
LicenseMIT
Safe HaskellNone
LanguageHaskell2010

LiterateX.Types.TargetFormat

Contents

Description

 
Synopsis

Type

data TargetFormat Source #

Target format

This sum type defines the supported target formats.

Since: 0.0.1.0

Instances

Instances details
Bounded TargetFormat Source # 
Instance details

Defined in LiterateX.Types.TargetFormat

Enum TargetFormat Source # 
Instance details

Defined in LiterateX.Types.TargetFormat

Eq TargetFormat Source # 
Instance details

Defined in LiterateX.Types.TargetFormat

Ord TargetFormat Source # 
Instance details

Defined in LiterateX.Types.TargetFormat

Show TargetFormat Source # 
Instance details

Defined in LiterateX.Types.TargetFormat

Render TargetFormat Source # 
Instance details

Defined in LiterateX.Types.TargetFormat

Methods

render :: Textual t => TargetFormat -> t #

Parse TargetFormat Source # 
Instance details

Defined in LiterateX.Types.TargetFormat

Methods

parse :: (Textual t, Textual e) => t -> Either e TargetFormat #

API

describe :: TargetFormat -> String Source #

Get a description of a target format

Since: 0.0.1.0

list :: [TargetFormat] Source #

List of all supported target formats

Since: 0.0.1.0

mkEndCode :: TargetFormat -> Text Source #

Make line in the target format to end a block of source code

Since: 0.0.1.0

mkBeginCode Source #

Arguments

:: TargetFormat 
-> Maybe CodeLanguage 
-> Bool

True to number code lines

-> Int -> Text

make line for code starting at specified line number

Make line in the target format to begin a block of code

Note that this function is written to indicate how it is used. Given the target format, optional code language, and line numbering flag, this function returns a function that takes a line number and returns a line.

Since: 0.0.1.0