[GHC] #15849: Error message: "Perhaps you need a let in a do block", when there is no do block.

#15849: Error message: "Perhaps you need a let in a do block", when there is no do block. -------------------------------------+------------------------------------- Reporter: cdsmith | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.4.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This code: {{{#!haskell main = return () foo = return () }}} Gives the error message: {{{ parse error on input ‘=’ Perhaps you need a 'let' in a 'do' block? e.g. 'let x = 5' instead of 'x = 5' }}} But this isn't in a do block. It would be awesome if GHC checked whether there's a do block before giving a suggestion that depends on there being a do block. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15849 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15849: Error message: "Perhaps you need a let in a do block", when there is no do block. -------------------------------------+------------------------------------- Reporter: cdsmith | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.4.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * keywords: => newcomer -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15849#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15849: Error message: "Perhaps you need a let in a do block", when there is no do block. -------------------------------------+------------------------------------- Reporter: cdsmith | Owner: nineonine Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.4.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/330 -------------------------------------+------------------------------------- Changes (by nineonine): * owner: (none) => nineonine * differential: => https://gitlab.haskell.org/ghc/ghc/merge_requests/330 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15849#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15849: Error message: "Perhaps you need a let in a do block", when there is no do block. -------------------------------------+------------------------------------- Reporter: cdsmith | Owner: nineonine Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.4.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/330 -------------------------------------+------------------------------------- Changes (by nineonine): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15849#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15849: Error message: "Perhaps you need a let in a do block", when there is no do block. -------------------------------------+------------------------------------- Reporter: cdsmith | Owner: nineonine Type: bug | Status: merge Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | parser/should_fail/T15849 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/330 -------------------------------------+------------------------------------- Changes (by RyanGlScott): * testcase: => parser/should_fail/T15849 * status: patch => merge * milestone: => 8.8.1 Comment: Landed in [https://gitlab.haskell.org/ghc/ghc/commit/a08f463bcc9727d91cec4c6e952ad0f5bb... a08f463bcc9727d91cec4c6e952ad0f5bbc3fbf9], marking as a merge candidate for 8.8. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15849#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15849: Error message: "Perhaps you need a let in a do block", when there is no do
block.
-------------------------------------+-------------------------------------
Reporter: cdsmith | Owner: nineonine
Type: bug | Status: merge
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.4.3
Resolution: | Keywords: newcomer
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| parser/should_fail/T15849
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/330
-------------------------------------+-------------------------------------
Comment (by Marge Bot
participants (1)
-
GHC