lib: make the supported format names accessible

This commit is contained in:
Simon Michael 2016-04-18 16:42:06 -07:00
parent f9362707b6
commit df4b82740b
2 changed files with 4 additions and 0 deletions

View File

@ -9,6 +9,7 @@ to import modules below this one.
-}
module Hledger.Read (
readFormatNames,
-- * Journal reading API
defaultJournalPath,
defaultJournal,

View File

@ -42,6 +42,9 @@ readers = [
,CsvReader.reader
]
readFormatNames :: [StorageFormat]
readFormatNames = map rFormat readers
-- | Which readers are worth trying for this (possibly unspecified) format, filepath, and data ?
readersFor :: (Maybe StorageFormat, Maybe FilePath, String) -> [Reader]
readersFor (format,path,s) =