Ahem. What I should have said is that the list of alternatives always
covers all cases that can occur. For example in
data Foo = Red | Green | Blue
...case x of
Red -> True
other -> ...(case x of
Green -> ...
Blue -> ... ) ...
The inner case is considered exhaustive because Red can't occur. Any
Red alternative in the inner case will be considered dead, and removed.
Simon
| -----Original Message-----
| From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
| On Behalf Of David Sabel
| Sent: 28 July 2003 21:43
| To: [EMAIL PROTECTED]
| Subject: Re: case-identity
|
| > In Core, the list of alternatives is always exhaustive.
|
| Ok, thanks.
| So I assume the "dead alternative elimination" is no longer done in
| the simplifier?
|
| (
| The dead alternative elimination is defined as:
|
| case x of ===> case x of
| P1 -> E1 P1 -> E1
| ... ...
| ci a1 ... an -> Ei Pn -> En
| ... [without ci a1 ... an -> Ei]
| Pn -> En
|
| if x is not of constructor c_i
| )
|
| David
|
| _______________________________________________
| Glasgow-haskell-users mailing list
| [EMAIL PROTECTED]
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users