Opened 9 years ago

Closed 3 years ago

#2526 closed feature request (fixed)

Warn about missing signatures only for exported functions

Reported by: fergushenderson Owned by: gridaphobe
Priority: lowest Milestone: 7.10.1
Component: Compiler Version: 6.8.3
Keywords: newcomer Cc: pho@…, andy.adamsmoran@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by thomie)

The -fwarn-missing-signatures option results in warnings if signatures are not declared for any top-level functions.

Many Haskell users prefer to declare type signatures only for exported functions, which are part of the module's interface, not for all functions. It would be nice to have an option that issued warnings iff any exported functions lacked explicit signatures.

Change History (18)

comment:1 Changed 9 years ago by igloo

difficulty: Unknown
Milestone: 6.12 branch

comment:2 Changed 9 years ago by simonmar

Architecture: MultipleUnknown/Multiple

comment:3 Changed 9 years ago by simonmar

Operating System: MultipleUnknown/Multiple

comment:4 Changed 9 years ago by PHO

Cc: pho@… added

comment:5 Changed 7 years ago by igloo

Milestone: 6.12 branch6.12.3

comment:6 Changed 7 years ago by igloo

Milestone: 6.12.36.14.1
Priority: normallow

comment:7 Changed 7 years ago by igloo

Milestone: 7.0.17.0.2

comment:8 Changed 7 years ago by igloo

Milestone: 7.0.27.2.1

comment:9 Changed 6 years ago by igloo

Milestone: 7.2.17.4.1

comment:10 Changed 6 years ago by igloo

Milestone: 7.4.17.6.1
Priority: lowlowest

comment:11 Changed 5 years ago by igloo

Milestone: 7.6.17.6.2

comment:12 Changed 5 years ago by morabbin

Cc: andy.adamsmoran@… added
Type of failure: None/Unknown

comment:13 Changed 3 years ago by thoughtpolice

Milestone: 7.6.27.10.1

Moving to 7.10.1.

comment:14 Changed 3 years ago by thomie

Description: modified (diff)
Summary: warn about missing signatures only for exported functionsWarn about missing signatures only for exported functions

comment:15 Changed 3 years ago by goldfire

Keywords: newcomer added

comment:16 Changed 3 years ago by gridaphobe

Owner: set to gridaphobe

comment:17 Changed 3 years ago by Austin Seipp <austin@…>

In 067f1e4f20efc824badbac54da2f9484090cb39b/ghc:

Add flag `-fwarn-missing-exported-sigs`

Summary: add `-fwarn-missing-exported-sigs` to only warn about missing signatures if the name is exported

Test Plan: validate, see testsuite/tests/warnings/should_compile/T2526.hs

Reviewers: ezyang, austin, thomie

Reviewed By: austin, thomie

Subscribers: ezyang, thomie, carter

Differential Revision: https://phabricator.haskell.org/D482

GHC Trac Issues: #2526

Conflicts:
	docs/users_guide/7.10.1-notes.xml

comment:18 Changed 3 years ago by thoughtpolice

Resolution: fixed
Status: newclosed

Merged, thanks!

Note: See TracTickets for help on using tickets.