blob: c91cf50d9c8d55c7d60c8e515e5ddd678bb651ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{-# LANGUAGE GADTs #-}
-- This one made GHC 6.4.1 panic because of over-zealous
-- complaining in mkCase1 when there was an empty list of
-- alternatives
module Foo2 where
data FooBar = Foo | Bar
data P a = P0 | P1 FooBar
data PS p where
C :: P Int -> p b -> PS p
f :: PS P -> Char
f (C (P1 _) P0) = 'a'
f (C (P1 Bar) (P1 Bar)) = 'b'
f (C (P1 _) (P1 Bar)) = 'c'
|