diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2014-04-03 13:30:59 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2014-04-03 13:35:31 +0100 |
commit | 3671d0027329804a31a628a5bee355e0640a2045 (patch) | |
tree | 2c5f6f9e546ff77d09474b4c539aac3b92bd9f56 /testsuite | |
parent | 791f4fa24dd6929ab2e55c9f8b870d8078337427 (diff) | |
download | haskell-3671d0027329804a31a628a5bee355e0640a2045.tar.gz |
Fix desguaring of bang patterns (Trac #8952)
A palpable bug, although one that will rarely bite
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/deSugar/should_run/T8952.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/deSugar/should_run/T8952.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/deSugar/should_run/all.T | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/deSugar/should_run/T8952.hs b/testsuite/tests/deSugar/should_run/T8952.hs new file mode 100644 index 0000000000..42eeb250a9 --- /dev/null +++ b/testsuite/tests/deSugar/should_run/T8952.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE BangPatterns #-} + +module Main where + +main = print (case Nothing of + !(~(Just x)) -> "ok" + Nothing -> "bad") + diff --git a/testsuite/tests/deSugar/should_run/T8952.stdout b/testsuite/tests/deSugar/should_run/T8952.stdout new file mode 100644 index 0000000000..52c33a57c7 --- /dev/null +++ b/testsuite/tests/deSugar/should_run/T8952.stdout @@ -0,0 +1 @@ +"ok" diff --git a/testsuite/tests/deSugar/should_run/all.T b/testsuite/tests/deSugar/should_run/all.T index 352a65239e..233f6485d9 100644 --- a/testsuite/tests/deSugar/should_run/all.T +++ b/testsuite/tests/deSugar/should_run/all.T @@ -40,3 +40,4 @@ test('mc08', normal, compile_and_run, ['']) test('T5742', normal, compile_and_run, ['']) test('DsLambdaCase', when(compiler_lt('ghc', '7.5'), skip), compile_and_run, ['']) test('DsMultiWayIf', when(compiler_lt('ghc', '7.5'), skip), compile_and_run, ['']) +test('T8952', normal, compile_and_run, ['']) |