1{-# LANGUAGE MagicHash #-} 2module HappyDoAction where 3 4foo :: Int# 5 6happyDoAction i tk st 7 = {- nothing -} 8 9 10 case action of 11 0# -> {- nothing -} 12 happyFail i tk st 13 -1# -> {- nothing -} 14 happyAccept i tk st 15 n | (n <# (0# :: Int#)) -> {- nothing -} 16 17 (happyReduceArr ! rule) i tk st 18 where rule = (I# ((negateInt# ((n +# (1# :: Int#)))))) 19 n -> {- nothing -} 20 21 22 happyShift new_state i tk st 23 where new_state = (n -# (1# :: Int#)) 24 where off = indexShortOffAddr happyActOffsets st 25 off_i = (off +# i) 26 check = if (off_i >=# (0# :: Int#)) 27 then (indexShortOffAddr happyCheck off_i ==# i) 28 else False 29 action | check = indexShortOffAddr happyTable off_i 30 | otherwise = indexShortOffAddr happyDefActions st 31