[commit: testsuite] master: Test Trac #8633 (3fef8e4)
git at git.haskell.org
git at git.haskell.org
Mon Dec 30 12:15:50 UTC 2013
Repository : ssh://git@git.haskell.org/testsuite
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/3fef8e4094c8d0c58bad2604ecaee93d797ccbd1/testsuite
>---------------------------------------------------------------
commit 3fef8e4094c8d0c58bad2604ecaee93d797ccbd1
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Sat Dec 28 12:45:06 2013 +0000
Test Trac #8633
>---------------------------------------------------------------
3fef8e4094c8d0c58bad2604ecaee93d797ccbd1
tests/th/T8633.hs | 19 +++++++++++++++++++
tests/th/all.T | 1 +
2 files changed, 20 insertions(+)
diff --git a/tests/th/T8633.hs b/tests/th/T8633.hs
new file mode 100644
index 0000000..79f1ec6
--- /dev/null
+++ b/tests/th/T8633.hs
@@ -0,0 +1,19 @@
+module Main where
+import Language.Haskell.TH.Syntax
+
+t1 = case mkName "^.." of
+ Name (OccName ".") (NameQ (ModName "^")) -> error "bug0"
+ Name (OccName "^..") NameS -> return ()
+
+t2 = case mkName "Control.Lens.^.." of
+ Name (OccName ".") (NameQ (ModName "Control.Lens.^")) -> error "bug1"
+ Name (OccName "^..") (NameQ (ModName "Control.Lens")) -> return ()
+
+t3 = case mkName "Data.Bits..&." of
+ Name (OccName ".&.") (NameQ (ModName "Data.Bits")) -> return ()
+
+t4 = case mkName "abcde" of
+ Name (OccName "abcde") NameS -> return ()
+
+main :: IO ()
+main = do t1; t2; t3; t4
\ No newline at end of file
diff --git a/tests/th/all.T b/tests/th/all.T
index 05d5d90..b521f79 100644
--- a/tests/th/all.T
+++ b/tests/th/all.T
@@ -315,3 +315,4 @@ test('T8577',
extra_clean(['T8577a.hi', 'T8577a.o']),
multimod_compile_fail,
['T8577', '-v0 ' + config.ghc_th_way_flags])
+test('T8633', normal, compile_and_run, [''])
More information about the ghc-commits
mailing list