hledger/hledger-lib
Thomas Miedema 5129a94bd7
;cln: unittest.hs: remove bothersome PackageImports (#2337)
When running `cd hledger-lib && ghci test/unittest.hs`, ghci complains
with:

```
  test/unittest.hs:7:1: error:
      Could not find module ‘Hledger’
      It is not a module in the current program, or in any known package.
    |
  7 | import "hledger-lib" Hledger (tests_Hledger)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  Failed, no modules loaded.
```

This commit removes the "hledger-lib" package-qualified import, such
that above ghci command works as expected.

However, there is a comment in hledger-lib/test/unittest.hs that says:

> package-qualified import to avoid cabal missing-home-modules warning
> (and double-building ?)

The missing-home-modules warning and the double building can indeed be
reproduced by running (after removing the "hledger-lib"
package-qualified import): `cd hledger-lib && cabal build unittest`. It
will first build `hledger-lib`, then show a warning about
missing-home-modules, and then build `hledger-lib` again.

After comparing the unittest sections of hledger.cabal and
hledger-lib.cabal, the solution turned out to be to remove `./` from
hs-source-dirs for unittest. Don't ask me why though!

Overall it's a nice cleanup.
2025-02-26 11:54:59 -10:00
..
Hledger feat:csv: add an encoding rule, allowing non-UTF8 CSV to be read [#2319] 2025-02-15 14:48:30 -10:00
other/ledger-parse cln: hlint: Clean up Functor related hlint warnings, and NOINLINE warning. 2021-08-27 06:13:56 -10:00
test ;cln: unittest.hs: remove bothersome PackageImports (#2337) 2025-02-26 11:54:59 -10:00
Text lib: Tabular.AsciiWide.renderRs: simplify using flattenHeader 2024-09-24 20:50:54 -10:00
.date.m4 ;doc: update embedded manuals 2024-12-09 17:58:30 -10:00
.ghci tools: .ghci for each package, sets shorter prompt 2016-04-15 16:06:45 -07:00
.version ;pkg: set version to 1.41.99 2024-12-09 17:58:24 -10:00
.version.m4 ;pkg: set version to 1.41.99 2024-12-09 17:58:24 -10:00
CHANGES.md ;doc: changelogs: fix heading 2024-12-09 16:03:40 -10:00
hledger-lib.cabal ;cln: unittest.hs: remove bothersome PackageImports (#2337) 2025-02-26 11:54:59 -10:00
Hledger.hs doc:code: add Jargon section; describe styling/precision in detail (precisiongeddon) 2023-11-08 13:59:18 -08:00
LICENSE split off hledger-lib package, containing core types & utils 2010-03-22 01:44:59 +00:00
package.yaml ;cln: unittest.hs: remove bothersome PackageImports (#2337) 2025-02-26 11:54:59 -10:00
README.md ;doc: more tweaks to package readmes, hackage descriptions 2020-03-22 10:49:02 -07:00
Setup.hs Revert "remove Setup.hs files again, fixing a yesod devel warning" 2014-05-24 13:39:09 -07:00

hledger-lib

A reusable library containing hledgers core functionality. This is used by most hledger* packages so that they support the same common file formats, command line options, reports etc.

See also: the project README and home page.