citeproc-hs-0.2: A Citation Style Language implementation in Haskell

Portabilityunportable
Stabilityunstable
MaintainerAndrea Rossato <andrea.rossato@unitn.it>

Text.CSL.Reference

Description

The Reference type

Synopsis

Documentation

data Value Source

An existential type to wrap the different types a Reference is made of. This way we can create a map to make queries easier.

Constructors

forall a . Data a => Value a 

Instances

data Empty Source

Constructors

Empty 

Instances

data RefDate Source

Constructors

RefDate 

Fields

year :: Int
 
month :: Int
 
day :: Int
 
other :: String
 

newtype CNum Source

Constructors

CNum 

Fields

unCNum :: Int
 

getReference :: [Reference] -> (String, String) -> ReferenceSource

With the list of References and the tuple (citation key, locator), return the needed reference with the correct locator set.

getReference' :: [Reference] -> ((String, String), (String, Int)) -> (String, Reference)Source

With the Reference list and the generated position for each tuple of citation key and locator, produce a list of References with their positions (which come first.

generatePosition :: [[(String, String)]] -> [[((String, String), (String, Int))]]Source

For each citation group generate the position and the citation number of each citation.

getPos :: Eq a => ([a], [a]) -> [[(a, String)]] -> [[((a, String), (String, Int))]]Source