Skip to content

Commit

Permalink
;dev: Add a ghc-tags.yaml file
Browse files Browse the repository at this point in the history
Provide a ghc-tags.yaml file to make use of ghc-tags with Hledger easy.

ghc-tags is a standalone tool to replace the formerly-built-in
":ctags" feature (and I presume ":etags") in GHCi. These walked over
the source and produced a TAGS file (in vim-compatible ctags or
Emacs-compatible etags format) that allows the relevant editors to
quickly navigate around function definitions.

ghc-tags trips over some of the CPP used in Hledger. The solution
is to provide ghc-tags with explicit CPP defines via a YAML file.
However, if a YAML file is provided, one also must specify the source
paths, as the tool XORs config file | paths-on-command-line.

See <arybczak/ghc-tags#6> for more
information.

Signed-off-by: Jonathan Dowland <[email protected]>
  • Loading branch information
jmtd committed Aug 31, 2023
1 parent ff730f7 commit e67b39b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ghc-tags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source_paths:
- hledger
- hledger-lib
- hledger-ui
- hledger-web
cpp_options:
- -DMIN_VERSION_megaparsec(x,y,z)=1
- -DMIN_VERSION_aeson(x,y,z)=1

0 comments on commit e67b39b

Please sign in to comment.