summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/deSugar/should_compile/T4371.hs
blob: c6542a8540cb65c29123385cc9ce17baaeff4292 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{-# LANGUAGE ViewPatterns,DeriveDataTypeable #-}
module T4371 where

import Data.Typeable

data E1 = E1 deriving Typeable
data E2 = E2 deriving Typeable

f :: Typeable a => a-> ()
f x = case x of
  (cast -> Just E1) -> ()
  (cast -> Just E2) -> ()