packages feed

citation-resolve 0.4.2.3 → 0.4.3

raw patch · 2 files changed

+9/−2 lines, 2 files

Files

citation-resolve.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                citation-resolve-version:             0.4.2.3+version:             0.4.3 synopsis:            convert document IDs such as DOI, ISBN, arXiv ID to bibliographic reference. description:            This modules provides a way to convert document identifiers, such
src/Text/CSL/Input/Identifier.hs view
@@ -12,7 +12,7 @@  module Text.CSL.Input.Identifier        (resolveEither, resolve, withDatabaseFile, Database(..), database, databaseMap, HasDatabase(..),-        resolveDef, +        resolveDef, resolveEitherDef,          toBibTeXItem)        where @@ -75,4 +75,11 @@   let go = withDatabaseFile fn $ resolve url   State.evalStateT go (def :: Database) +-- | Resolve the document id using the default database, return an either value with +--   any errors that occur +resolveEitherDef :: String -> IO (Either String Reference)+resolveEitherDef s = do+  fn <- getDataFileName "default.db"+  let go = withDatabaseFile fn $ ( (runEitherT.resolveEither) s)+  State.evalStateT go (Database Map.empty)