From 84585e5e7c5d729ce38fa47ebaa7518acd14c2f1 Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Tue, 12 Nov 2019 10:56:57 +0300 Subject: Meaning-preserving SCC annotations (#15730) This patch implements GHC Proposal #176: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0176-scc-parsing.rst Before the change: 1 / 2 / 2 = 0.25 1 / {-# SCC "name" #-} 2 / 2 = 1.0 After the change: 1 / 2 / 2 = 0.25 1 / {-# SCC "name" #-} 2 / 2 = parse error --- testsuite/tests/parser/should_compile/T15730a.hs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 testsuite/tests/parser/should_compile/T15730a.hs (limited to 'testsuite/tests/parser/should_compile/T15730a.hs') diff --git a/testsuite/tests/parser/should_compile/T15730a.hs b/testsuite/tests/parser/should_compile/T15730a.hs new file mode 100644 index 0000000000..5f1c45828a --- /dev/null +++ b/testsuite/tests/parser/should_compile/T15730a.hs @@ -0,0 +1,5 @@ +x = 1 / 2 / 2 +a = {-# SCC ann #-} 1 / 2 / 2 +b = 1 / 2 / {-# SCC ann #-} 2 + +main = print (x, a == x, b == x) -- cgit v1.2.1