Previously, hledger could read CSV files containing non-ascii characters only if they are UTF8-encoded. Now there is a new CSV rule, encoding ENCODING, which allows reading CSV files with other encodings. This adds a dependency on the encoding library, which supports fewer encodings than text-icu but does not require a third-party C library. To avoid build issues on various platforms, we require version 0.10+. This adds some use of the ImplicitParams language extension, required by encoding's API, but only in a small code region. This also changes the type of Reader's rReadFn; it now takes a `Handle` rather than a `Text`, allowing more flexibility.
54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
# stack build plan using GHC 9.2.8
|
|
|
|
resolver: lts-20.26
|
|
|
|
packages:
|
|
- hledger-lib
|
|
- hledger
|
|
- hledger-ui
|
|
- hledger-web
|
|
|
|
extra-deps:
|
|
- base-compat-0.14.0
|
|
- megaparsec-9.3.0
|
|
- safe-0.3.21
|
|
# for hledger-lib:
|
|
- encoding-0.10
|
|
# for hledger:
|
|
# for hledger-ui:
|
|
- brick-2.3.1
|
|
- vty-6.2
|
|
- vty-crossplatform-0.4.0.0
|
|
- vty-unix-0.2.0.0
|
|
- vty-windows-0.2.0.2
|
|
- text-zipper-0.13
|
|
- fsnotify-0.4.1.0
|
|
# for hledger-web:
|
|
# for Shake.hs:
|
|
|
|
nix:
|
|
pure: false
|
|
packages: [perl gmp ncurses zlib]
|
|
|
|
flags:
|
|
encoding:
|
|
systemEncoding: false # See https://github.com/dmwit/encoding/issues/26
|
|
|
|
# ghc-options:
|
|
# "$locals": -fplugin Debug.Breakpoint
|
|
|
|
# # for precise profiling, per https://www.tweag.io/posts/2020-01-30-haskell-profiling.html:
|
|
# # apply-ghc-options: everything
|
|
# # rebuild-ghc-options: true
|
|
# # stack build --profile --ghc-options="-fno-prof-auto"
|
|
|
|
# # tell GHC to write hie files, eg for weeder. Rumoured to be slow.
|
|
# # ghc-options:
|
|
# # "$locals": -fwrite-ide-info
|
|
|
|
# # ghc-options:
|
|
# # "$locals": -ddump-timings
|
|
# # "$targets": -Werror
|
|
# # "$everything": -O2
|
|
# # some-package: -DSOME_CPP_FLAG
|