[GHC] #10253: Variable name with special characters

#10253: Variable name with special characters -------------------------------------+------------------------------------- Reporter: songzh | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Declaring a variable in GHCi with $ . is allowed, but they are not referable. I suppose that the parser should impose more restrictions at this. {{{#!hs *Main> let a$1 = 10 *Main> a$1 <interactive>:20:1: Not in scope: ‘a’ Prelude> let a.1 = 10 Prelude> a.1 <interactive>:9:1: Not in scope: ‘a’ Prelude> let a%1 = 1 Prelude> a%1 1 Prelude> let a^1 = 1 Prelude> a^1 1 Prelude> a^1 + 1 2 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10253 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10253: Variable name with special characters -------------------------------------+------------------------------------- Reporter: songzh | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by nomeata): * status: new => closed * resolution: => invalid Comment: You are not defining `a` there, but rather the operator `$`: {{{ Prelude> :t ($) ($) :: (a -> b) -> a -> b Prelude> let a$1 = 10 Prelude> :t ($) ($) :: (Num a1, Num a, Eq a) => t -> a -> a1 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10253#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC