
#12146: syntax repair suggestion is too eager to suggest TemplateHaskell -------------------------------------+------------------------------------- Reporter: j.waldmann | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by j.waldmann): * GHC could state that an module header, import declaration or top-level declaration was expected. * GHC should not make any suggestion here. Error messages from the compiler should use exact wording from the language specification [https://www.haskell.org/onlinereport/haskell2010/haskellch5.html#x11-990005....]. I guess "naked" is not in there. For reference: {{{ ipmort java.util.*; class Foo { } Foo.java:1: error: class, interface, or enum expected suing System.Linq; class Foo { } Foo.cs(1,0): error CS1525: Unexpected symbol `suing' }}} but the top-level declaration syntax of these languages is easier. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12146#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler