[GHC] #9497: Silent typed holes
GHC
ghc-devs at haskell.org
Fri Aug 22 07:34:50 UTC 2014
#9497: Silent typed holes
-------------------------------------+-------------------------------------
Reporter: merijn | Owner:
Type: feature | Status: new
request | Milestone:
Priority: normal | Version: 7.8.3
Component: Compiler | Keywords: typed holes,
Resolution: | warnings
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Unknown
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
I think that's a very reasonable suggestion.
What would make sense to me is this:
* `-XTypedHoles`, by default, generates ''warnings'' not ''errors''.
* If you run a program that exhibits such warnings, you get the behaviour
of `-fdefer-type-errors` (i.e. a runtime crash)
* `-Werror` would make the warning into a fatal error, as usual.
* We add a flag `-fno-warn-typed-holes` which switches off warnings if
you don't want to see them. This is the part you are asking for.
By treating this as "just another warning", we make it less of a special
case.
However the first point is, I believe, a change in behaviour; i.e. it
makes a typed hole into a non-fatal warning by default, rather than a
fatal error. To make it fatal you'd have to do `-Werror`, although that
makes ''all'' warnings fatal.
Does that seem like a reasonable change?
Simon
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9497#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list