[commit: testsuite] master: TH empty case expressions now ok (with -XEmptyCase) (72c22fa)

Simon Peyton Jones simonpj at microsoft.com
Wed Feb 13 18:33:25 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/72c22fa9292734acf1c9a58dac62c4371434ca8d

>---------------------------------------------------------------

commit 72c22fa9292734acf1c9a58dac62c4371434ca8d
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Feb 13 17:03:01 2013 +0000

    TH empty case expressions now ok (with -XEmptyCase)

>---------------------------------------------------------------

 tests/th/TH_emptycase.hs     |    4 ++--
 tests/th/TH_emptycase.stderr |    6 ------
 tests/th/all.T               |    2 +-
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/tests/th/TH_emptycase.hs b/tests/th/TH_emptycase.hs
index d68ca9a..fc75cfe 100644
--- a/tests/th/TH_emptycase.hs
+++ b/tests/th/TH_emptycase.hs
@@ -1,6 +1,6 @@
-{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TemplateHaskell, EmptyCase #-}
 -- Trac #2431: empty case expression
---             currently rejected
+--             now accepted
 
 module Main where
 
diff --git a/tests/th/TH_emptycase.stderr b/tests/th/TH_emptycase.stderr
deleted file mode 100644
index 2de0687..0000000
--- a/tests/th/TH_emptycase.stderr
+++ /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') [])
diff --git a/tests/th/all.T b/tests/th/all.T
index b279dcd..fa185aa 100644
--- a/tests/th/all.T
+++ b/tests/th/all.T
@@ -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,





More information about the ghc-commits mailing list