haskell / haskell/cabal

Disable `-Worphans` by default in non-`library` targets?

Open
#11,164 0 comments 1 reaction 0 assignees View on GitHub
type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the feature request**
The notion of "orphan instance" doesn't apply to anything but libraries, so executables, test suites, and benchmarks shouldn't check for them unless specifically enabled in `ghc-options`.

One might think that this would also apply to private libraries, but instances are global so orphans can still cause problems if someone else has defined the same (orphan) instance somewhere.

**Additional context**
This came up on [Matrix #haskell](https://matrix.to/#/%21hskonBonfjiIefqLUV%3Amatrix.org/%240q7gfSr4bkVjo7YXfJTLoWNAHLmFIONmIBTzjhWucbU?via=matrix.org&via=rgb.us.eu.org&via=tchncs.de).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.