summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T13317.hs
blob: e2d89b92da35338e39f10fc3efae1b764e238808 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE MagicHash #-}

module T13317 where

import GHC.Base

f x = let x = "foo"#
          y1 = unpackCString# x
          y2 = unpackCString# x
      in
      (y1, case y2 of
              'f' : _ -> True
              _       -> False
      )
-- This case-expression should simplify
-- yielding a KnownBranch simplifier tick