Merge branch 'master' into atomics
[ghc.git] / testsuite / tests / simplCore / should_compile / T7088.hs
1 {-# LANGUAGE MagicHash, UnboxedTuples #-}
2
3 module Float where
4
5 import GHC.Prim
6
7 foo vs
8 = let w = if length (reverse vs) > 10 then Just (length vs) else Nothing
9
10 f :: State# RealWorld -> Int -> (# Int, State# RealWorld #)
11 f s x | Just 0 <- w = case f s (x+1) of
12 (# r, s' #) -> (# r, s' #)
13 | otherwise = (# x, s #)
14
15 in f realWorld# 1
16