summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2013-09-29 17:22:22 -0500
committerAustin Seipp <austin@well-typed.com>2013-09-29 17:22:24 -0500
commit6a8e733aa2dc83e1ce66649c4d5a75dbc427d8a0 (patch)
tree3e4f422688ebb81bee153d2e5fa3693a5a4e71b3
parent883fd49fa4c061fa20b2f33e468d4f64b18fc8b2 (diff)
downloadhaskell-6a8e733aa2dc83e1ce66649c4d5a75dbc427d8a0.tar.gz
Fix fallout from making lazy unlifted bindings an error
Issue #8022 Signed-off-by: Austin Seipp <austin@well-typed.com>
-rw-r--r--testsuite/tests/ghci.debugger/HappyTest.hs8
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print020.stderr31
-rw-r--r--testsuite/tests/typecheck/should_fail/T2806.hs1
-rw-r--r--testsuite/tests/typecheck/should_fail/T2806.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail203.stderr8
6 files changed, 10 insertions, 45 deletions
diff --git a/testsuite/tests/ghci.debugger/HappyTest.hs b/testsuite/tests/ghci.debugger/HappyTest.hs
index 62b055fad7..02c6a96e2a 100644
--- a/testsuite/tests/ghci.debugger/HappyTest.hs
+++ b/testsuite/tests/ghci.debugger/HappyTest.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP, MagicHash #-}
+{-# LANGUAGE CPP, MagicHash, BangPatterns #-}
import Data.Char
import Data.Array
import GHC.Exts
@@ -416,7 +416,7 @@ happyReduce k i fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happyReduce k nt fn j tk st sts stk
= case happyDrop (k -# (1# :: Int#)) sts of
- sts1@((HappyCons (st1@(action)) (_))) ->
+ !sts1@((HappyCons (st1@(action)) (_))) ->
let r = fn stk in -- it doesn't hurt to always seq here...
happyDoSeq r (happyGoto nt j tk st1 sts1 r)
@@ -424,14 +424,14 @@ happyMonadReduce k nt fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happyMonadReduce k nt fn j tk st sts stk =
happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))
- where sts1@((HappyCons (st1@(action)) (_))) = happyDrop k (HappyCons (st) (sts))
+ where !sts1@((HappyCons (st1@(action)) (_))) = happyDrop k (HappyCons (st) (sts))
drop_stk = happyDropStk k stk
happyMonad2Reduce k nt fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happyMonad2Reduce k nt fn j tk st sts stk =
happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))
- where sts1@((HappyCons (st1@(action)) (_))) = happyDrop k (HappyCons (st) (sts))
+ where !sts1@((HappyCons (st1@(action)) (_))) = happyDrop k (HappyCons (st) (sts))
drop_stk = happyDropStk k stk
off = indexShortOffAddr happyGotoOffsets st1
diff --git a/testsuite/tests/ghci.debugger/scripts/print020.stderr b/testsuite/tests/ghci.debugger/scripts/print020.stderr
index 6642bb7baa..e69de29bb2 100644
--- a/testsuite/tests/ghci.debugger/scripts/print020.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/print020.stderr
@@ -1,31 +0,0 @@
-
-GenericTemplate.hs:219:14: Warning:
- Pattern bindings containing unlifted types should use an outermost bang pattern:
- sts1@((HappyCons (st1@(action)) (_)))
- = happyDrop k (HappyCons (st) (sts))
- In an equation for ‛happyMonadReduce’:
- happyMonadReduce k nt fn j tk st sts stk
- = happyThen1
- (fn stk tk)
- (\ r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))
- where
- sts1@((HappyCons (st1@(action)) (_)))
- = happyDrop k (HappyCons (st) (sts))
- drop_stk = happyDropStk k stk
-
-GenericTemplate.hs:226:14: Warning:
- Pattern bindings containing unlifted types should use an outermost bang pattern:
- sts1@((HappyCons (st1@(action)) (_)))
- = happyDrop k (HappyCons (st) (sts))
- In an equation for ‛happyMonad2Reduce’:
- happyMonad2Reduce k nt fn j tk st sts stk
- = happyThen1
- (fn stk tk)
- (\ r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))
- where
- sts1@((HappyCons (st1@(action)) (_)))
- = happyDrop k (HappyCons (st) (sts))
- drop_stk = happyDropStk k stk
- off = indexShortOffAddr happyGotoOffsets st1
- off_i = (off +# nt)
- ....
diff --git a/testsuite/tests/typecheck/should_fail/T2806.hs b/testsuite/tests/typecheck/should_fail/T2806.hs
index a130d49528..6ada5d83fb 100644
--- a/testsuite/tests/typecheck/should_fail/T2806.hs
+++ b/testsuite/tests/typecheck/should_fail/T2806.hs
@@ -1,6 +1,5 @@
{-# LANGUAGE MagicHash #-}
-{-# OPTIONS_GHC -Werror #-}
-- Trac #2806
diff --git a/testsuite/tests/typecheck/should_fail/T2806.stderr b/testsuite/tests/typecheck/should_fail/T2806.stderr
index da35b207dd..b0130e223a 100644
--- a/testsuite/tests/typecheck/should_fail/T2806.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2806.stderr
@@ -1,5 +1,5 @@
-T2806.hs:13:11: Warning:
+T2806.hs:12:11:
Pattern bindings containing unlifted types should use an outermost bang pattern:
(I# _x) = 4
In an equation for ‛foo’:
@@ -7,6 +7,3 @@ T2806.hs:13:11: Warning:
= 3
where
(I# _x) = 4
-
-<no location info>:
-Failing due to -Werror.
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index 1e7472d9c5..cac7d92a13 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -189,7 +189,7 @@ test('tcfail199', normal, compile_fail, [''])
test('tcfail200', normal, compile_fail, [''])
test('tcfail201', normal, compile_fail, [''])
test('tcfail202', normal, compile_fail, [''])
-test('tcfail203', normal, compile, [''])
+test('tcfail203', normal, compile_fail, [''])
test('tcfail203a', normal, compile_fail, [''])
test('tcfail204', normal, compile_fail, [''])
test('tcfail206', normal, compile_fail, [''])
diff --git a/testsuite/tests/typecheck/should_fail/tcfail203.stderr b/testsuite/tests/typecheck/should_fail/tcfail203.stderr
index 7635b68b4b..e1a00c3018 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail203.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail203.stderr
@@ -1,5 +1,5 @@
-tcfail203.hs:28:11: Warning:
+tcfail203.hs:28:11:
Pattern bindings containing unlifted types should use an outermost bang pattern:
(I# x) = 5
In an equation for ‛fail2’:
@@ -8,7 +8,7 @@ tcfail203.hs:28:11: Warning:
where
(I# x) = 5
-tcfail203.hs:31:11: Warning:
+tcfail203.hs:31:11:
Pattern bindings containing unlifted types should use an outermost bang pattern:
(b, I# x) = (True, 5)
In an equation for ‛fail3’:
@@ -17,7 +17,7 @@ tcfail203.hs:31:11: Warning:
where
(b, I# x) = (True, 5)
-tcfail203.hs:40:11: Warning:
+tcfail203.hs:40:11:
Pattern bindings containing unlifted types should use an outermost bang pattern:
(I# !x) = 5
In an equation for ‛fail6’:
@@ -26,7 +26,7 @@ tcfail203.hs:40:11: Warning:
where
(I# !x) = 5
-tcfail203.hs:43:11: Warning:
+tcfail203.hs:43:11:
Pattern bindings containing unlifted types should use an outermost bang pattern:
(b, !(I# x)) = (True, 5)
In an equation for ‛fail7’: