Commit e6166f13 authored by simonpj's avatar simonpj
Browse files

Tests for Trac #2674

parent 3166a385
{-# LANGUAGE TemplateHaskell #-}
-- Trac #2674
module ShouldFail where
import Language.Haskell.TH
$(return [FunD (mkName "foo") []])
Function binding for `foo' has no equations
When splicing generated code into the program
{-# LANGUAGE TemplateHaskell #-}
-- Trac #2431: empty case expression
-- currently rejected
module Main where
TH_emptycase: TH_emptycase.hs:9:4-33: Non-exhaustive patterns in case
Case expression with no alternatives
When splicing generated code into the program
When splicing TH expression: CaseE (LitE (CharL 'a')) []
In the expression: $(caseE (litE $ CharL 'a') [])
In the definition of `f': f = $(caseE (litE $ CharL 'a') [])
......@@ -117,10 +117,11 @@ test('TH_scope', normal, compile, [''])
test('T2632', normal, compile, [''])
test('T2700', normal, compile, ['-v0'])
test('T2713', normal, compile_fail, ['-v0'])
test('T2674', normal, compile_fail, ['-v0'])
test('TH_emptycase', normal, compile_fail, ['-v0'])
test('T2386', extra_clean(['T2386_Lib.hi', 'T2386_Lib.o']),
['$MAKE -s --no-print-directory T2386'] )
test('TH_emptycase', exit_code(1), compile_and_run, [''])
test('T2685', normal, multimod_compile, ['T2685','-v0'])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment