diff options
Diffstat (limited to 'testsuite/tests/deSugar/should_compile/T4371.hs')
-rw-r--r-- | testsuite/tests/deSugar/should_compile/T4371.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/deSugar/should_compile/T4371.hs b/testsuite/tests/deSugar/should_compile/T4371.hs new file mode 100644 index 0000000000..c6542a8540 --- /dev/null +++ b/testsuite/tests/deSugar/should_compile/T4371.hs @@ -0,0 +1,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) -> () |