summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/simpl018.hs
blob: 613c612c2511a483c74dcd9a71bf65b21af6c9b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{-# LANGUAGE UnboxedTuples #-}

-- See Note [Float coercions (unlifted)] in Simplify
-- This one gave a CoreLint error when compiled optimised
--
-- See also #1718, of which this is a simplified version

module ShouldCompile where

bar :: Bool -> Int
bar x = case (case x of { True -> (# 2,3 #); False -> error "urk" }) of
                (# p,q #) -> p+q