haskell / haskell/cabal

Can't access __HADDOCK_VERSION__

Open
#10,818 8 comments 0 reactions 0 assignees View on GitHub
cabal-install: cmd/haddock Cabal: cmd/haddock type: discussion
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Following the discussion in #9177

@FinleyMcIlwaine I want to have access to `__HADDOCK_VERSION__`; alas, using the mechanism described in #9177 doesn't seem to work.

To be specific, I created a `project.cabal` file, with contents:

```
packages: .

package *
documentation: true
haddock-version-cpp: True
```

but this doesn't seem to make `__HADDOCK_VERSION__` defined as a macro in source files. Any advice?

Contributor guide

Open the contributing guide

Research direction

Start with the `project.cabal` configuration shown in the issue and read the discussion in #9177 to understand the intended `haddock-version-cpp` mechanism. Trace how that setting is handled for source files; done means `__HADDOCK_VERSION__` is defined as a macro when the configuration is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.