diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2013-12-28 12:45:06 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2013-12-28 12:45:06 +0000 |
commit | a5cb317f1fce5e90bede27fb30af7ea70f1febff (patch) | |
tree | 0baee0d12f774f584248e6684cb825f17185a8fd | |
parent | 03d7cc6f444802d21fcdfc29f80ba6769a31e018 (diff) | |
download | haskell-a5cb317f1fce5e90bede27fb30af7ea70f1febff.tar.gz |
Test Trac #8633
-rw-r--r-- | testsuite/tests/th/T8633.hs | 19 | ||||
-rw-r--r-- | testsuite/tests/th/all.T | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/th/T8633.hs b/testsuite/tests/th/T8633.hs new file mode 100644 index 0000000000..79f1ec697c --- /dev/null +++ b/testsuite/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/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index 05d5d902f8..b521f79cea 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/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, ['']) |