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