Safe Haskell | None |
---|
- newtype DB = DB {}
- db :: Simple Iso DB (Map String String)
- withDBFile :: (MonadIO m, MonadState DB m) => FilePath -> m a -> m a
- type RM m a b = a -> EitherT String m b
- liftIOE :: MonadIO m => IO (Either a b) -> EitherT a m b
- resolveBibtex :: MonadIO m => String -> RM m String Reference
- resolveEither :: forall m. (MonadIO m, MonadState DB m) => String -> EitherT String m Reference
- resolveDOI :: MonadIO m => RM m String String
- resolveArXiv :: MonadIO m => RM m String String
- resolveBibcode :: MonadIO m => RM m String String
- resolveISBN :: MonadIO m => RM m String String
- getDataFileName :: String -> IO String
Documentation
The data structure that carries the resolved references.
withDBFile :: (MonadIO m, MonadState DB m) => FilePath -> m a -> m aSource
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. (MonadIO m, MonadState DB m) => String -> EitherT String m ReferenceSource
resolve a document url to a Reference
, or emits a error
message with reason why it fails.
getDataFileName :: String -> IO StringSource
a safer way to get data file name.