Skip to content
Browse files

Fix fallout from making lazy unlifted bindings an error

Issue #8022

Signed-off-by: Austin Seipp <austin@well-typed.com>
  • Loading branch information...
1 parent 883fd49 commit 6a8e733aa2dc83e1ce66649c4d5a75dbc427d8a0 @thoughtpolice thoughtpolice committed Sep 29, 2013
View
8 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,22 +416,22 @@ 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)
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
View
31 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)
- ....
View
1 testsuite/tests/typecheck/should_fail/T2806.hs
@@ -1,6 +1,5 @@
{-# LANGUAGE MagicHash #-}
-{-# OPTIONS_GHC -Werror #-}
-- Trac #2806
View
5 testsuite/tests/typecheck/should_fail/T2806.stderr
@@ -1,12 +1,9 @@
-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’:
foo
= 3
where
(I# _x) = 4
-
-<no location info>:
-Failing due to -Werror.
View
2 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, [''])
View
8 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’:

0 comments on commit 6a8e733

Please sign in to comment.
Something went wrong with that request. Please try again.