[GHC] #9869: Add new notation for negative numbers when using -XNegativeLiterals
#9869: Add new notation for negative numbers when using -XNegativeLiterals -------------------------------------+------------------------------------- Reporter: bg_ | Owner: Type: feature request | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.8.3 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- I propose that when using -XNegativeLiterals ghc should also read ~123 as a negative literal. SML uses ~ as the unary minus it, so it's not completely out of the blue. The reason would be to minimize ambiguity. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9869 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#9869: Add new notation for negative numbers when using -XNegativeLiterals -------------------------------------+------------------------------------- Reporter: bg_ | Owner: Type: feature | Status: new request | Milestone: Priority: low | Version: 7.8.3 Component: Compiler | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Description changed by bg_: Old description:
I propose that when using -XNegativeLiterals ghc should also read ~123 as a negative literal. SML uses ~ as the unary minus it, so it's not completely out of the blue. The reason would be to minimize ambiguity.
New description: I propose that when using -XNegativeLiterals ghc should also read ~123 as a negative literal. SML uses ~ as the unary minus, so it's not completely out of the blue. The reason would be to minimize ambiguity. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9869#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#9869: Add new notation for negative numbers when using -XNegativeLiterals -------------------------------------+------------------------------------- Reporter: bg_ | Owner: bg_ Type: feature | Status: new request | Milestone: Priority: low | Version: 7.8.3 Component: Compiler | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by bg_): * owner: => bg_ -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9869#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#9869: Add new notation for negative numbers when using {-# LANGUAGE NegativeLiterals #-} -------------------------------------+------------------------------------- Reporter: bg_ | Owner: bg_ Type: feature | Status: new request | Milestone: Priority: low | Version: 7.8.3 Component: Compiler | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9869#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#9869: Add new notation for negative numbers when using {-# LANGUAGE NegativeLiterals #-} -------------------------------------+------------------------------------- Reporter: bg_ | Owner: bg_ Type: feature | Status: new request | Milestone: Priority: low | Version: 7.8.3 Component: Compiler | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Description changed by bg_: Old description:
I propose that when using -XNegativeLiterals ghc should also read ~123 as a negative literal. SML uses ~ as the unary minus, so it's not completely out of the blue. The reason would be to minimize ambiguity.
New description: I propose that when using {-# LANGUAGE NegativeLiterals #-} ghc should also read ~123 as a negative literal. SML uses ~ as the unary minus, so it's not completely out of the blue. The reason would be to minimize ambiguity. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9869#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#9869: Add new notation for negative numbers when using {-# LANGUAGE NegativeLiterals #-} -------------------------------------+------------------------------------- Reporter: bg_ | Owner: bg_ Type: feature | Status: closed request | Milestone: Priority: low | Version: 7.8.3 Component: Compiler | Keywords: Resolution: invalid | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by carter): * status: new => closed * resolution: => invalid Comment: ~ is already used by haskell for type equality in constraints, eg `(size ~7 )=> SizedList size Int` so its not clear how adding a new meaning for ~ would improve matters. closing this as invalid baring discussion on libraries list, ghc-users, ghc-devs or #ghc irc channel to the contrary. (that is, some additional discussion should happen on a mailing list for this proprosal to have teeth.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9869#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC