diff options
-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, ['']) |