Commit Graph

189 Commits

Author SHA1 Message Date
Simon Michael
f39938d7ef stack: ghc-options notes 2020-11-16 14:41:52 -08:00
Simon Michael
a97daaf322 lib: replace pretty-show with pretty-simple
pretty-simple, already used in .ghci, will hopefully give nicer debug
output, including for values which don't have Read-able Show output.
This should mean that we can start removing custom string-like Show
instances that were a workaround for pretty-show.

We are using the latest version (4.0.0.0) to get compact output.
Here's some old pretty-show output:

 CsvRules
   { rdirectives = [ ( "skip" , "1" ) ]
   , rcsvfieldindexes = [ ( "date" , 1 ) , ( "amount" , 2 ) ]
   , rassignments = [ ( "amount" , "%2" ) , ( "date" , "%1" ) ]
   , rconditionalblocks = []
   }

And the new pretty-simple output:

 CsvRules
   { rdirectives=
     [ ( "skip", "1" ) ]
   , rcsvfieldindexes=
     [ ( "date", 1 ), ( "amount", 2 ) ]
   , rassignments=
     [ ( "amount", "%2" ), ( "date", "%1" ) ]
   , rconditionalblocks= []
   }

Non-compact pretty-simple output would be:

 CsvRules
     { rdirectives=
         [
             ( "skip"
             , "1B"
             )
         ]
     , rcsvfieldindexes=
         [
             ( "date"
             , 1
             )
         ,
             ( "amount"
             , 2
             )
         ]
     , rassignments=
         [
             ( "amount"
             , "%2"
             )
         ,
             ( "date"
             , "%1"
             )
         ]
     , rconditionalblocks=[]
     }

Also:

- Account's Show instance no longer converts : to _ in account names

- drop unused pretty-show dependency from hledger, hledger-ui packages

- regenerate hledger-lib with the older hpack that's shipped in stack
2020-11-10 08:06:11 -08:00
Simon Michael
5f1e040ad7 stack: bump default resolver to lts 16.12, ghc 8.8.4 2020-09-02 10:20:57 -07:00
Simon Michael
edbc639f8e Revert "Use -split-sections on everything" (#1328)
This causes problems on mac at least, and we already do it in
.github/workflows/linux.yml, so probably best not to add it here.

This reverts commit 84d479cdc4.
2020-08-11 18:10:39 -07:00
Colin Woodbury
84d479cdc4 Use -split-sections on everything 2020-08-11 17:46:37 -07:00
Simon Michael
7881edfce1 stack: bump default stack file to lts 16 2020-07-05 06:54:38 -07:00
Simon Michael
204b747664 ;stack: drop old probably wrong note 2020-06-06 13:31:05 -07:00
Simon Michael
216cf8d596 ;enable doctest with ghc 8.10 2020-03-30 15:28:11 -07:00
Simon Michael
04931bb0db ;stack: generate ide info files (disabled) 2020-03-16 11:18:04 -07:00
Simon Michael
b151235a43 ;stack: bump default, 8.10 builds to lts-15.4 2020-03-16 10:41:22 -07:00
Simon Michael
a88d9efdf5 ;stack: use lts-15.2 by default again, to help CI 2020-03-07 04:16:42 -08:00
Simon Michael
000434083a ;stack[-8.10]: consistency cleanups
[ci skip]
2020-03-01 15:01:37 -08:00
Simon Michael
bd333a344d ;stack: bump to latest nightly, regex now included
[ci skip]
2020-01-31 14:49:29 -08:00
Simon Michael
e31f644f9a ;stack: bump to latest nightly
[ci skip]
2020-01-28 09:29:46 -08:00
Simon Michael
c84466fb29 ;shake: can use the default stack.yaml/GHC 8.8 (#1090)
[ci skip]
2020-01-28 09:21:10 -08:00
Amarandus
76ffaca466 web: Add IPv6 and hostname support
This commit introduces IPv6 support (and thus closes #1145).
It also allows using local hostnames as a parameter for --host.
For this, multiple things needed to be changed:

 - checkWebOpts is dropped, as the supplied parameter is checked later
 by Network.Socket.getAddrInfo
 - defbaseurl needs to check if : is used in the host, as this indicates
 the usage of an IPv6 address. In this case, the host needs to be
 wrapped in [] for the base URL
 - To allow opening such a modified base URL, runHostPortFullUrl is used
 instead of runhostPortUrl, as it allows opening arbitrary URLs instead
 of a path prefixed with http://127.0.0.1

As checking the host for validity is postponed until the webserver tries
to start, an invalid hostname leads to an exception caused by
Network.Socket.getAddrInfo.
This is still fine, as hledger-web won't start in an undefined state, but
will terminate with a nonzero exit code.
2020-01-17 13:18:51 -08:00
Simon Michael
04ea95cb91 ;stack: bump to latest nightly snapshot 2020-01-06 11:31:24 -08:00
Simon Michael
7e49d8cce9 ;stack: build with ghc 8.8, latest nightly by default
Shake.hs's deps (regex) might or might not build with ghc 8.8 yet.
2019-12-24 17:19:11 -08:00
Simon Michael
39d9e417c3 ;stack: rename the ghc 8.6 stack.yaml 2019-12-24 17:17:51 -08:00
Simon Michael
3c226f869a ;stack: use base-compat < 0.11 and latest lts for Shake/regex (#1090)
[ci skip]
2019-11-29 07:48:03 -08:00
Simon Michael
8952dc9a93 ;stack: build with base-compat 0.11, for testing 2019-11-26 14:17:55 -08:00
Simon Michael
fc2f4d018f ;remove more traces of hledger-api
[ci skip]
2019-09-10 20:12:38 -07:00
Simon Michael
499e20c0b2 lib, cli, ui: start using Control.Monad.Fail, allow base-compat 0.11
fail is moving out of Monad and into it's own MonadFail class.
This will be enforced in GHC 8.8 (I think).

base-compat/base-compat-batteries 0.11.0 have adapted to this,
and are approaching stackage nightly
(https://github.com/commercialhaskell/stackage/issues/4802).

hledger is now ready to build with base-compat-batteries 0.11.0, once
all of our deps do (eg aeson). We are still compatible with the older
0.10.x and GHC 7.10.3 as well.

For now we are using both fails:

- new fail (from Control.Monad.Fail), used in our parsers, imported
  via base-compat-batteries Control.Monad.Fail.Compat to work with
  older GHC versions.

- old fail (from GHC.Base, exported by Prelude, Control.Monad,
  Control.Monad.State.Strict, Prelude.Compat, ...), used in easytest's
  Test, since I couldn't find their existing fail implementation to update.

To reduce (my) confusion, these are imported carefully, consistently,
and qualified everywhere as Fail.fail and Prelude.fail, with clashing
re-exports suppressed, like so:

import Prelude hiding (fail)
import qualified Prelude (fail)
import Control.Monad.State.Strict hiding (fail)
import "base-compat-batteries" Prelude.Compat hiding (fail)
import qualified "base-compat-batteries" Control.Monad.Fail.Compat as Fail
2019-09-08 17:13:47 -07:00
Simon Michael
32154131c9 ;stack: bump default snapshot to lts-14.4
[ci skip]
2019-09-01 08:53:06 -07:00
Simon Michael
ff481e88c0 stack: stop building hledger-api
[ci skip]
2019-08-16 16:22:06 -07:00
Simon Michael
ccc437664d stack: bump to lts-14.1 2019-08-16 15:58:58 -07:00
Simon Michael
875e85ad36 ;stack: bump to latest nightly & brick
[ci skip]
2019-07-26 10:51:41 +01:00
Simon Michael
49523b1611 ;stack: bump to latest nightly snapshot 2019-07-24 18:12:54 +01:00
Simon Michael
827c9b7af5 stack: update deps, fix build of hledger-ui (#1071) 2019-07-24 18:12:54 +01:00
Simon Michael
7b68b2b89a ;web: drop obsolete unix-time workaround, use latest (#1039)
0.4.7 is in lts and nightly stackage now, and has more windows fixes.

[ci skip]
2019-07-12 23:24:10 +01:00
Simon Michael
23a7787ac4 ;stack: bump to latest lts-13
[ci skip]
2019-07-09 16:10:45 +01:00
Simon Michael
52bab5c41a ;stack: try dropping haskell-src-exts workaround
(commercialhaskell/stack#3922)
2019-06-13 16:26:09 -07:00
Simon Michael
755932bbc5 ;deps: use unix-time release instead of github rev 2019-06-13 16:26:09 -07:00
Simon Michael
e5ba87b83e ;stack: update to latest LTS snapshot/GHC 8.6.5 2019-06-13 16:26:06 -07:00
Simon Michael
9b3fc067ea web: try requiring unreleased unix-time for windows 7 (#1039) 2019-06-09 15:43:16 -07:00
Simon Michael
fca14ace98 bump default stack.yaml to nightly-2019-03-09 / ghc 8.6.4 2019-03-09 15:27:34 -08:00
Simon Michael
d9f3406042 stack: bump to latest nightly 2019-01-05 07:35:54 +00:00
Simon Michael
0d5414b6b8 stack: build with latest nightly by default 2018-12-31 10:09:18 +00:00
Simon Michael
a7bf73ec3a stack: update default stack.yaml to latest nightly 2018-12-10 10:53:10 +00:00
Simon Michael
3a5df72331 roi: use math-functions lib instead of old statistics version 2018-12-03 15:51:29 -08:00
Simon Michael
309a77d03e stack: update stack.yaml for latest stackage nightly/GHC 8.6.2 2018-11-23 16:07:56 -08:00
Simon Michael
62ced48ce7 use easytest 0.2.1 (#883) 2018-10-24 12:30:30 -07:00
Simon Michael
7750bbaa36 stack: build with ghc 8.6 & latest nightly by default 2018-10-24 10:35:12 -07:00
Simon Michael
fbf984e2de stack: update/rename ghc 8.4 config 2018-10-24 10:35:12 -07:00
Alex Chen
3d2584d869 lib: switch to megaparsec 7 2018-09-30 20:15:12 -06:00
Simon Michael
23bdac41d9 csv: merge lucamolteni's cassava/custom separators (squashed) (#829)
commit 5ba464de76
Author: Luca Molteni <volothamp@gmail.com>
Date:   Fri Sep 7 17:54:12 2018 +0200

    Fix CI 2

commit f060ae9449
Author: Luca Molteni <volothamp@gmail.com>
Date:   Fri Sep 7 17:30:08 2018 +0200

    Fix CI build

commit af0719a33b
Author: Luca Molteni <volothamp@gmail.com>
Date:   Fri Sep 7 17:19:01 2018 +0200

    Fix rebase

commit 1a24ddfa54
Author: Luca Molteni <volothamp@gmail.com>
Date:   Fri Aug 10 16:25:24 2018 +0200

    Fixed some GHC warnings

commit 1ac43398a3
Author: Luca Molteni <volothamp@gmail.com>
Date:   Fri Aug 10 16:14:49 2018 +0200

    Fix .cabal

commit 422456b925
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sun Jul 1 22:56:20 2018 +0200

    Removed to-do list

commit 1118b762e4
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sun Jul 1 22:53:28 2018 +0200

    Better test

commit 1146ed0941
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sun Jul 1 15:32:28 2018 +0200

    Fix parsing

commit 4fc2374b2b
Author: Luca Molteni <volothamp@gmail.com>
Date:   Thu Jun 21 22:11:11 2018 +0200

    Parsing of separator

commit f7a61737f1
Author: Luca Molteni <volothamp@gmail.com>
Date:   Thu Jun 21 14:29:23 2018 +0200

    Almost separator in options

commit ac8841cf3b
Author: Luca Molteni <volothamp@gmail.com>
Date:   Thu Jun 21 14:16:59 2018 +0200

    Separator in parseCSV

commit 92a8b9f6ba
Author: Luca Molteni <volothamp@gmail.com>
Date:   Thu Jun 21 13:30:41 2018 +0200

    separator option

commit ec417a81ae
Author: Luca Molteni <volothamp@gmail.com>
Date:   Thu Jun 21 10:45:26 2018 +0200

    Removed one qualified import

commit 8b2f386c2f
Author: Luca Molteni <volothamp@gmail.com>
Date:   Wed Jun 20 14:01:12 2018 +0200

    Removed string conversions

commit a14d0e099e
Author: Luca Molteni <volothamp@gmail.com>
Date:   Wed Jun 20 10:23:20 2018 +0200

    custom delimiter in cassava

commit 694d48e2bc
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sun Jun 10 17:51:54 2018 +0200

    Use Text.getContents - remove UTF-8 compatibility library

commit a7ada2cc60
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sun Jun 10 17:49:34 2018 +0200

    todo list

commit 58ec47d398
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sun Jun 10 17:45:22 2018 +0200

    CSV test now has unicode characters

commit b7851e94c3
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sun Jun 10 16:59:39 2018 +0200

    Use decode from Text

commit 79f59fd28c
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sun Jun 10 13:28:57 2018 +0200

    Use Text and Lazy Bytestring

commit 470c9bcb8d
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sat Jun 9 15:30:22 2018 +0200

    Use megaparsec error

commit f978848ba2
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sat Jun 9 15:22:07 2018 +0200

    Renamed qualify and remove Parsec

commit 152587fde2
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sat Jun 9 15:12:36 2018 +0200

    Use cassava mega parsec

commit cf281577a3
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sat Jun 9 14:01:47 2018 +0200

    Removed Data.Vector

commit 1272e8e758
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sat Jun 9 12:16:18 2018 +0200

    Removed Parsec ParseError

commit ae07f04313
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sat Jun 9 12:06:14 2018 +0200

    Type sinonim for ParsecError

commit 8e15b253c1
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sat Jun 9 11:16:08 2018 +0200

    Replaced with typeclasses

commit 1ed46f9c17
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sat Jun 9 11:01:33 2018 +0200

    Replaced Text/CSV with Cassava

commit 362f4111b5
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sat Jun 9 10:34:37 2018 +0200

    Use cassava parsin instead of Text/CSV

commit 83e678e371
Author: Luca Molteni <volothamp@gmail.com>
Date:   Sat Jun 9 08:22:51 2018 +0200

    Text CSV error messages

commit f922df71d2
Author: Luca Molteni <volothamp@gmail.com>
Date:   Fri Jun 8 21:45:20 2018 +0200

    Better types

commit edd130781c
Author: Luca Molteni <volothamp@gmail.com>
Date:   Fri Jun 8 21:34:59 2018 +0200

    Conversion to Text CSV type

commit 0799383214
Author: Luca Molteni <volothamp@gmail.com>
Date:   Fri Jun 8 16:06:21 2018 +0200

    First function with cassava

commit e92aeb151f
Author: Luca Molteni <volothamp@gmail.com>
Date:   Fri Jun 8 13:47:34 2018 +0200

    Added cassava as dependency

commit 5ea005c558
Author: Luca Molteni <volothamp@gmail.com>
Date:   Fri Jun 8 13:18:47 2018 +0200

    Better .gitignore for multi idea modules
2018-09-07 12:34:51 -07:00
Simon Michael
4ac46489fe stack: bump to latest nightly resolver 2018-07-10 07:50:12 +01:00
Simon Michael
ea52c3d620 ui: restore support for fsnotify 0.2.1.2, as well as 0.3.x (#833)
For easier stackage entry.
2018-07-03 12:50:51 +01:00
Simon Michael
305f208862 stack: remove obsolete extra deps
[ci skip]
2018-06-07 13:19:08 -07:00
Simon Michael
236101e31a ui: support/require fsnotify 0.3.0.1+
The api has changed, it supports directory events, and might be more robust.
2018-06-05 06:41:13 -07:00
Peter Simons
7876d3a4ef stack.yaml: update nightly to latest snapshot
- We need base-compat 0.10.x.
 - The new snapshot includes the servant packages we require.
2018-06-04 21:00:57 +02:00
Simon Michael
fd1b98b347 appveyor: see if pretty-show workaround still needed
[ci skip]
2018-04-27 11:07:42 -07:00
Simon Michael
549a4d30f5 appveyor: try workaround for pretty-show failure, 2nd attempt
[ci skip]
2018-04-26 12:18:52 -07:00
Simon Michael
af50767743 appveyor: try workaround for pretty-show failure
[ci skip]
2018-04-26 12:11:03 -07:00
Simon Michael
8650b7042d stack: bump default snapshot to latest nightly/ghc-8.4.2 2018-04-25 08:52:24 -07:00
Simon Michael
7e8f9cde79 stack: bump to latest nightly 2018-04-08 17:54:11 -07:00
Simon Michael
5468a26345 ui: can build with stackage ghc 8.4 nightlies again 2018-04-08 17:53:23 -07:00
Simon Michael
28a8b55f4e move non-portable file warning to package 2018-03-26 01:04:58 +01:00
Simon Michael
ee3a06e569 stack: updates, fix tests, silence non-portable file warning 2018-03-25 23:20:58 +01:00
Simon Michael
1d0f94145d stack: hledger-ui won't build on linux, disable for now 2018-03-25 02:20:53 +01:00
Simon Michael
3b4313c883 stack: add hinotify for hledger-ui on linux 2018-03-25 02:04:44 +01:00
Simon Michael
689434b1f6 stack: re-enable hledger-api 2018-03-24 22:53:51 +00:00
Simon Michael
47615c8af8 stack: use newer brick just in case 2018-03-24 17:58:49 +00:00
Simon Michael
e6583a2925 stack: re-enable hledger-web 2018-03-24 17:23:15 +00:00
Simon Michael
02055fcad5 stack: make latest nightly/ghc 8.4 the default 2018-03-24 16:06:20 +00:00
Simon Michael
60ea1151ad rename stack.yaml files 2018-03-24 15:47:06 +00:00
Simon Michael
552fd50af9 stack: bump default resolver to latest nightly again (#717) 2018-03-12 03:41:26 +00:00
Simon Michael
6aa35b5cb8 lib: move easytest tests to lib, depend on released version 2018-03-05 17:27:13 -08:00
Eli Flanagan
9f2e75d166 ensure stack's nix config works on nixos 2018-03-05 08:15:31 -08:00
Simon Michael
2f87657185 tools: travis: try to fix github dep on travis 2018-02-15 17:39:42 -08:00
Simon Michael
9a5d9c6235 tools: add easytest (github) as an extra dep, for experiments 2018-02-15 16:30:50 -08:00
Simon Michael
32693de44a stack: bump to lts 10.3, extra-deps tweaking ergonomics
[ci skip]
2018-01-14 17:06:07 -08:00
Simon Michael
96bb029410 stack: comment 2017-12-22 05:33:45 -08:00
Alvaro Fernando García
15e100c108 stack: bump default resolver to lts-10.0 2017-12-22 05:31:23 -08:00
Simon Michael
a0ff0ce84b stack: bump default resolver to nightly-2017-12-14 2017-12-14 18:15:12 -08:00
Eli Flanagan
0ad8c45e2d disable pure to preserve $LANG 2017-12-14 16:42:29 -08:00
Eli Flanagan
6bd86f999b use nix integration option 2017-12-14 16:42:29 -08:00
Simon Michael
99dfcd9e90 stack, hakyll-std: use latest snapshots 2017-12-06 20:57:14 -08:00
Simon Michael
56529daadc stack: test with latest nightly resolver 2017-11-10 19:23:09 -08:00
Simon Michael
025a2375bd stack: more thorough make test-stackage (test and bench) 2017-09-08 10:26:40 -07:00
Simon Michael
1f2b00ee3b stack: update stackage configs for 3 ghcs, switch to 8.2.1 as default
Building with same GHC as stackage nightly is a good idea for noticing
problems keeping us out of stackage. make test-stackage is a start at
checking for stackage problems with the last three GHC versions.
2017-09-08 07:57:07 -07:00
Simon Michael
00f61b5ec7 stack: remove test deps 2017-08-24 16:12:29 -07:00
Simon Michael
6c8a445271 stack: bump default resolver to lts-9.0 2017-08-24 15:27:36 -07:00
Simon Michael
d7d5f8a064 add support for megaparsec 6 (fixes #594)
Older megaparsec is still supported.
Also cleans up our custom parser types,
and some text (un)packing is done in different places
(possible performance impact).
2017-07-27 19:20:46 -07:00
Simon Michael
cb693cd7ca stack: bump recommended resolver to lts-8.23
[ci skip]
2017-07-21 09:35:34 +01:00
Simon Michael
45e9c9d632 stack, site: update stack yaml files, sync with download page
[ci skip]
2017-07-16 07:24:13 +01:00
Simon Michael
a05a800668 tools: stack: no need to force brick 0.19 (#578) 2017-06-30 22:48:04 +01:00
Felix Yan
ffe8b47529 Update brick to 0.19 2017-06-30 22:45:34 +01:00
Simon Michael
7bc5ef3df0 stack: bump default snapshot to lts-8.15 2017-05-22 15:48:15 -07:00
Simon Michael
44fc889ef7 stack: bump to lts-8.11 2017-04-25 09:36:24 -07:00
Simon Michael
8815266b5f stack: bump snapshot to lts-8.6 2017-03-29 21:06:07 -07:00
Simon Michael
b3c8bb8543 update stack.yaml, lts-8.* is needed for osx sierra 2017-02-22 17:21:42 +00:00
Simon Michael
2e2a34261f stack: bump to latest lts & extra deps 2017-02-04 16:32:03 -08:00
Joshua Chia
d3883bad1f Updated hledger-ui to use brick-0.16 (#479)
brick-0.16 uses Brick.BChan.BChan instead of Control.Concurrent.Chan.Chan.
2017-01-14 10:41:46 -08:00
Simon Michael
8b354043c1 stack: bump brick to 0.15.2 to allow hledger-iadd install in hledger dir 2017-01-08 11:44:53 -08:00
Simon Michael
ff6ca9cc43 stack: bump recommended snapshots to latest lts versions 2016-12-29 11:33:34 -08:00
Simon Michael
91c524b600 ui: allow brick 0.15, vty 5.14 2016-12-07 14:17:23 -08:00
Simon Michael
283cda9303 ui: allow vty 5.13 (and use it in stack.yaml) 2016-11-22 09:29:54 -08:00
Simon Michael
8ca03f0a49 fix ghc7 stack config, update ghc8 stack config 2016-11-02 07:06:34 -07:00
Simon Michael
c6e2784eeb ui: use brick 0.12, bump version to 1.0.3 2016-10-31 08:06:29 -07:00