haskell / haskell/cabal

CPP macro for --enable-testing

Open
#1,505 7 comments 0 reactions 0 assignees View on GitHub
Cabal: other old-milestone: ⊥ type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

I want to conditionally export certain parts like constructors, types or instances which are needed to write test cases. Otherwise I wouldn't want them to be exposed to the library user.

The approach I am following now is to have `Foo.Internal` export necessary elements.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how Cabal handles --enable-testing and CPP-related configuration. The issue names no source file or test, so first locate the relevant build and test entry points, then compare the requested conditional exports with the current Foo.Internal approach. Done should include an agreed macro behavior and verification that test-only exports remain hidden from normal library users.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.