[GHC] #12879: (xs -> xs) wrongly suggests TypeApplications

#12879: (xs -> xs) wrongly suggests TypeApplications -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Poor/confusing Unknown/Multiple | error message Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- `(xs -> xs)` and `map (xs -> xs)` wrongly suggest `TypeApplications` {{{
map (xs -> xs)
<interactive>:38:6: error: Pattern syntax in expression context: xs -> xs Did you mean to enable TypeApplications? }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12879 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12879: (xs -> xs) wrongly suggests TypeApplications -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by zyla): I believe this is fixed in HEAD: {{{ GHCi, version 8.1.20161209: http://www.haskell.org/ghc/ :? for help Prelude> map (xs -> xs) <interactive>:1:6: error: Pattern syntax in expression context: xs -> xs Prelude> }}} But there's another issue - the message still appears when using as- patterns when TypeApplications is already enabled: {{{ Prelude> :set -XTypeApplications Prelude> map (xs@xs) <interactive>:19:6: error: Pattern syntax in expression context: xs@xs Did you mean to enable TypeApplications? }}} Perhaps replacing it with `Type application syntax requires a space before '@'` is a good idea in this case? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12879#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12879: (xs -> xs) wrongly suggests TypeApplications -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Iceland_jack): That would be a good error message -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12879#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12879: (xs -> xs) wrongly suggests TypeApplications -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2877 Wiki Page: | -------------------------------------+------------------------------------- Changes (by zyla): * differential: => Phab:D2877 Comment: I submitted a patch: https://phabricator.haskell.org/D2877 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12879#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12879: (xs -> xs) wrongly suggests TypeApplications
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Poor/confusing | Unknown/Multiple
error message | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2877
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#12879: (xs -> xs) wrongly suggests TypeApplications -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2877 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed * milestone: => 8.2.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12879#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC