citation-resolve-0.4.2.3: convert document IDs such as DOI, ISBN, arXiv ID to bibliographic reference.

Safe HaskellNone

Text.CSL.Input.Identifier.Internal

Synopsis

Documentation

newtype Database Source

The data structure that carries the resolved references. Since the mapping Reference -> BibTeX is not the inverse of BibTeX -> Reference for the version citeproc-hs-0.3.8 and loses some information, we choose to store the original BibTeX string in the Database, rather than Reference.

Constructors

Database 

class HasDatabase t whereSource

The lens for accessing the map within the Database.

withDatabaseFile :: (MonadIO m, MonadState s m, HasDatabase s) => FilePath -> m a -> m aSource

Excecute the program using the given database file. The file will be created if it didn't exist.

type RM m a b = a -> EitherT String m bSource

Resolver Monad is a function that converts a key of type a to some other type b, which may fail with an error message.

liftIOE :: MonadIO m => IO (Either a b) -> EitherT a m bSource

Perform possibly failing IO within a monad

resolveBibtex :: MonadIO m => String -> RM m String ReferenceSource

parse a Bibtex entry that contains single reference.

resolveEither :: forall m s. (MonadIO m, MonadState s m, HasDatabase s) => String -> EitherT String m ReferenceSource

resolve a document url to a Reference, or emits a error message with reason why it fails.

resolveDOI :: MonadIO m => RM m String StringSource

resolvers for specific document IDs.

getDataFileName :: String -> IO StringSource

a safer way to get data file name.

stringReplace :: String -> String -> String -> StringSource

String version of replace.