[GHC] #13669: Identifier "Otherwise" in guarded equation can crash a program
GHC
ghc-devs at haskell.org
Tue May 9 13:04:50 UTC 2017
#13669: Identifier "Otherwise" in guarded equation can crash a program
-------------------------------------+-------------------------------------
Reporter: vanto | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by bgamari):
You could replace `otherwise` in the ticket description with any other
identifier provided by `Prelude` and the same argument will apply.
However, I really don't think this is an argument for adding complexity to
the language.
In the case that `Prelude` is imported unqualified the user will be faced
with an ambiguity error and there will be no confusion. If they really do
import `Prelude` qualified and define or otherwise import another
`otherwise`, then who are we to say they shouldn't? I've never heard of
anyone complain of being confused by `otherwise`, or any other
`Prelude`-defined identifier, not behaving as expected for this reason.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13669#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list