[commit: ghc] master: Add comment explaining change in syntax error suggestion for #12146. (1bbb5fa)

git at git.haskell.org git at git.haskell.org
Fri Aug 17 18:54:17 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/1bbb5fa2f7c5eeb46afbba3301df68cccc8be6a3/ghc

>---------------------------------------------------------------

commit 1bbb5fa2f7c5eeb46afbba3301df68cccc8be6a3
Author: Aditya <adityadivekar03 at gmail.com>
Date:   Sat Jul 9 11:38:38 2016 +0530

    Add comment explaining change in syntax error suggestion for #12146.


>---------------------------------------------------------------

1bbb5fa2f7c5eeb46afbba3301df68cccc8be6a3
 compiler/rename/RnSource.hs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/compiler/rename/RnSource.hs b/compiler/rename/RnSource.hs
index beb7c5b..5968520 100644
--- a/compiler/rename/RnSource.hs
+++ b/compiler/rename/RnSource.hs
@@ -2206,6 +2206,10 @@ add gp loc (SpliceD _ splice@(SpliceDecl _ _ flag)) ds
   where
     badImplicitSplice = text "Parse error: module header, import declaration"
                      $$ text "or top-level declaration expected."
+                     -- The compiler should suggest the above, and not using
+                     -- TemplateHaskell since the former suggestion is more
+                     -- relevant to the larger base of users.
+                     -- See Trac #12146 for discussion.
 
 -- Class declarations: pull out the fixity signatures to the top
 add gp@(HsGroup {hs_tyclds = ts, hs_fixds = fs}) l (TyClD _ d) ds



More information about the ghc-commits mailing list