diff --git a/hledger-lib/Hledger/Read/CsvReader.hs b/hledger-lib/Hledger/Read/CsvReader.hs index 6baef1110..ceb7665e2 100644 --- a/hledger-lib/Hledger/Read/CsvReader.hs +++ b/hledger-lib/Hledger/Read/CsvReader.hs @@ -242,14 +242,9 @@ validateCsv rules numhdrlines (Right rs) = validate $ applyConditionalSkips $ dr validate rs@(_first:_) | isJust lessthan2 = let r = fromJust lessthan2 in Left $ printf "CSV record %s has less than two fields" (show r) - -- | isJust different = let r = fromJust different in - -- Left $ printf "the first CSV record %s has %d fields but %s has %d" - -- (show first) length1 (show r) (length r) | otherwise = Right rs where lessthan2 = headMay $ filter ((<2).length) rs - -- length1 = length first - -- different = headMay $ filter ((/=length1).length) rs -- -- | The highest (0-based) field index referenced in the field -- -- definitions, or -1 if no fields are defined. diff --git a/hledger-lib/hledger-lib.cabal b/hledger-lib/hledger-lib.cabal index ef194644b..afccb54ad 100644 --- a/hledger-lib/hledger-lib.cabal +++ b/hledger-lib/hledger-lib.cabal @@ -4,7 +4,7 @@ cabal-version: 1.12 -- -- see: https://github.com/sol/hpack -- --- hash: 76c7a62a518ff4226e139c42540aaf8f3331fb1a7250cc7a784f9cf9a2e4b123 +-- hash: d8bff513572239ec58023f9d69f207434d3ce06db8866c7d6469bbdb26daa47d name: hledger-lib version: 1.15.99 @@ -151,56 +151,6 @@ library test-suite doctests type: exitcode-stdio-1.0 main-is: doctests.hs - other-modules: - Hledger - Hledger.Data - Hledger.Data.Account - Hledger.Data.AccountName - Hledger.Data.Amount - Hledger.Data.Commodity - Hledger.Data.Dates - Hledger.Data.Journal - Hledger.Data.Ledger - Hledger.Data.Period - Hledger.Data.PeriodicTransaction - Hledger.Data.Posting - Hledger.Data.RawOptions - Hledger.Data.StringFormat - Hledger.Data.Timeclock - Hledger.Data.Transaction - Hledger.Data.TransactionModifier - Hledger.Data.Types - Hledger.Data.Valuation - Hledger.Query - Hledger.Read - Hledger.Read.Common - Hledger.Read.CsvReader - Hledger.Read.JournalReader - Hledger.Read.TimeclockReader - Hledger.Read.TimedotReader - Hledger.Reports - Hledger.Reports.AccountTransactionsReport - Hledger.Reports.BalanceReport - Hledger.Reports.BudgetReport - Hledger.Reports.EntriesReport - Hledger.Reports.MultiBalanceReport - Hledger.Reports.PostingsReport - Hledger.Reports.ReportOptions - Hledger.Reports.ReportTypes - Hledger.Reports.TransactionsReport - Hledger.Utils - Hledger.Utils.Color - Hledger.Utils.Debug - Hledger.Utils.Parse - Hledger.Utils.Regex - Hledger.Utils.String - Hledger.Utils.Test - Hledger.Utils.Text - Hledger.Utils.Tree - Hledger.Utils.UTF8IOCompat - Text.Megaparsec.Custom - Text.Tabular.AsciiWide - Paths_hledger_lib hs-source-dirs: ./. test @@ -247,7 +197,7 @@ test-suite doctests , transformers >=0.2 , uglymemo , utf8-string >=0.3.5 - buildable: False + buildable: True if (!impl(ghc >= 8.0)) build-depends: semigroups ==0.18.* diff --git a/hledger-lib/package.yaml b/hledger-lib/package.yaml index 48f6fde08..b7a0e7d3d 100644 --- a/hledger-lib/package.yaml +++ b/hledger-lib/package.yaml @@ -156,13 +156,14 @@ library: tests: - # 201909: disabled these by default. They (each ?) require a slow rebuild + # 201909: disabled easytests by default. It require a slow rebuild # of hledger-lib and are not worth the time, energy and carbon. doctests: - buildable: false + buildable: true source-dirs: test main: doctests.hs + other-modules: [] # https://github.com/sol/hpack/issues/188 dependencies: - Glob >=0.7 # Need a doctest new enough to support --fast and --verbose.