Ticket #1318 (new feature request)

Opened 6 years ago

Last modified 4 months ago

add warning for prefix negate operator and flag to replace it with negative numeric literals

Reported by: Isaac Dupree Owned by:
Priority: normal Milestone: _|_
Component: Compiler (Parser) Version: 6.6.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

This is tracking a few things relating to the notion that Haskell's single prefix operator, "-", should not exist and "-1" should parse as a single token anyway. See  http://thread.gmane.org/gmane.comp.lang.haskell.glasgow.user/11954

If there is a LANGUAGE option for this, what should it be called; and what should the ghc flags be called? Should turning off prefix negation and turning on negative numeric literals be separately controllable? This sort of question (exactly what should be implemented) is probably half the difficulty here.

Change History

Changed 6 years ago by Isaac Dupree

  • owner Isaac Dupree deleted
  • milestone changed from 6.8 to _|_

Work here is pending a specific proposal of what to implement, that there is consensus on. I'm not sure exactly what I want, and (given how my summer is turning out) I'm not really feeling up to making proposals for that. Anyone who wants this pursued further should do so (at which point I might implement that).

Well, there is one thing -fwarn-all-unary-minus that seems straightforward enough, if anyone else hates their semantics as well as syntax that much?

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple

Changed 4 months ago by morabbin

  • failure set to None/Unknown

Bump; still of interest?

Note: See TracTickets for help on using tickets.