citeproc-0.5: Generates citations and bibliography from CSL styles.
Safe HaskellNone
LanguageHaskell2010

Citeproc.CslJson

Description

CSL JSON is the structured text format defined in https://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html. It is used to represent formatted text inside CSL JSON bibliographies. For the most part it is a subset of HTML, with some special features like smart quote parsing. This module defines a parser and a renderer for this format, as well as CiteprocOutput and other typeclass instances.

Synopsis

Documentation

data CslJson a Source #

Instances

Instances details
Functor CslJson Source # 
Instance details

Defined in Citeproc.CslJson

Methods

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

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

Foldable CslJson Source # 
Instance details

Defined in Citeproc.CslJson

Methods

fold :: Monoid m => CslJson m -> m #

foldMap :: Monoid m => (a -> m) -> CslJson a -> m #

foldMap' :: Monoid m => (a -> m) -> CslJson a -> m #

foldr :: (a -> b -> b) -> b -> CslJson a -> b #

foldr' :: (a -> b -> b) -> b -> CslJson a -> b #

foldl :: (b -> a -> b) -> b -> CslJson a -> b #

foldl' :: (b -> a -> b) -> b -> CslJson a -> b #

foldr1 :: (a -> a -> a) -> CslJson a -> a #

foldl1 :: (a -> a -> a) -> CslJson a -> a #

toList :: CslJson a -> [a] #

null :: CslJson a -> Bool #

length :: CslJson a -> Int #

elem :: Eq a => a -> CslJson a -> Bool #

maximum :: Ord a => CslJson a -> a #

minimum :: Ord a => CslJson a -> a #

sum :: Num a => CslJson a -> a #

product :: Num a => CslJson a -> a #

Traversable CslJson Source # 
Instance details

Defined in Citeproc.CslJson

Methods

traverse :: Applicative f => (a -> f b) -> CslJson a -> f (CslJson b) #

sequenceA :: Applicative f => CslJson (f a) -> f (CslJson a) #

mapM :: Monad m => (a -> m b) -> CslJson a -> m (CslJson b) #

sequence :: Monad m => CslJson (m a) -> m (CslJson a) #

Eq a => Eq (CslJson a) Source # 
Instance details

Defined in Citeproc.CslJson

Methods

(==) :: CslJson a -> CslJson a -> Bool #

(/=) :: CslJson a -> CslJson a -> Bool #

Ord a => Ord (CslJson a) Source # 
Instance details

Defined in Citeproc.CslJson

Methods

compare :: CslJson a -> CslJson a -> Ordering #

(<) :: CslJson a -> CslJson a -> Bool #

(<=) :: CslJson a -> CslJson a -> Bool #

(>) :: CslJson a -> CslJson a -> Bool #

(>=) :: CslJson a -> CslJson a -> Bool #

max :: CslJson a -> CslJson a -> CslJson a #

min :: CslJson a -> CslJson a -> CslJson a #

Show a => Show (CslJson a) Source # 
Instance details

Defined in Citeproc.CslJson

Methods

showsPrec :: Int -> CslJson a -> ShowS #

show :: CslJson a -> String #

showList :: [CslJson a] -> ShowS #

Semigroup (CslJson a) Source # 
Instance details

Defined in Citeproc.CslJson

Methods

(<>) :: CslJson a -> CslJson a -> CslJson a #

sconcat :: NonEmpty (CslJson a) -> CslJson a #

stimes :: Integral b => b -> CslJson a -> CslJson a #

Monoid (CslJson a) Source # 
Instance details

Defined in Citeproc.CslJson

Methods

mempty :: CslJson a #

mappend :: CslJson a -> CslJson a -> CslJson a #

mconcat :: [CslJson a] -> CslJson a #

ToJSON (CslJson Text) Source # 
Instance details

Defined in Citeproc.CslJson

FromJSON (CslJson Text) Source # 
Instance details

Defined in Citeproc.CslJson

Uniplate (CslJson a) Source # 
Instance details

Defined in Citeproc.CslJson

Methods

uniplate :: CslJson a -> (Str (CslJson a), Str (CslJson a) -> CslJson a) #

descend :: (CslJson a -> CslJson a) -> CslJson a -> CslJson a #

descendM :: Applicative m => (CslJson a -> m (CslJson a)) -> CslJson a -> m (CslJson a) #

CiteprocOutput (CslJson Text) Source # 
Instance details

Defined in Citeproc.CslJson

Biplate (CslJson a) (CslJson a) Source # 
Instance details

Defined in Citeproc.CslJson

Methods

biplate :: CslJson a -> (Str (CslJson a), Str (CslJson a) -> CslJson a) #

descendBi :: (CslJson a -> CslJson a) -> CslJson a -> CslJson a #

descendBiM :: Applicative m => (CslJson a -> m (CslJson a)) -> CslJson a -> m (CslJson a) #

renderCslJson Source #

Arguments

:: Bool

Escape & using entities

-> Locale

Locale (used for quote styles)

-> CslJson Text

CslJson to render

-> Text 

Render CslJson as Text. Set the first parameter to True when rendering HTML output (so that entities are escaped). Set it to False when rendering for CSL JSON bibliographies.