summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/simpl018.hs
blob: a4cb6a80b827328e113e745442439ca01d8117ce (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 Trac #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