TH empty case expressions now ok (with -XEmptyCase)
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 13 Feb 2013 17:03:01 +0000 (17:03 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 13 Feb 2013 17:03:01 +0000 (17:03 +0000)
testsuite/tests/th/TH_emptycase.hs
testsuite/tests/th/TH_emptycase.stderr [deleted file]
testsuite/tests/th/all.T

index d68ca9a..fc75cfe 100644 (file)
@@ -1,6 +1,6 @@
-{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TemplateHaskell, EmptyCase #-}
 -- Trac #2431: empty case expression
---             currently rejected
+--             now accepted
 
 module Main where
 
diff --git a/testsuite/tests/th/TH_emptycase.stderr b/testsuite/tests/th/TH_emptycase.stderr
deleted file mode 100644 (file)
index 2de0687..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-
-TH_emptycase.hs:10:7:
-    Case expression with no alternatives
-    When splicing a TH expression: case 'a' of
-    In the expression: $(caseE (litE $ CharL 'a') [])
-    In an equation for `f': f = $(caseE (litE $ CharL 'a') [])
index b279dcd..fa185aa 100644 (file)
@@ -138,7 +138,7 @@ test('T2817', normal, compile, ['-v0'])
 test('T2713', normal, compile_fail, ['-v0'])
 test('T2674', normal, compile_fail, ['-v0'])
 test('T2931', normal, compile, ['-v0'])
-test('TH_emptycase', normal, compile_fail, ['-v0'])
+test('TH_emptycase', normal, compile, ['-v0'])
 
 test('T2386', extra_clean(['T2386_Lib.hi', 'T2386_Lib.o']),
              run_command,