case-identity

David Sabel dsabel@stud.uni-frankfurt.de
Wed, 23 Jul 2003 14:14:29 +0200


Hi,

the case-identity transformation is

case e of
 pat1 -> pat1         ===>   e
 ...
 patn -> patn

It's performed in SimplUtils.mkCase1.

My (very special) question is: How do you ensure, that
 there's a case-alternative for every constructor of the type of e?

Otherwise you could transform

case e of {True -> True} ===> True, if e is of type Bool, 

but that't not correct if e is False.

Maybe you add a default-alternative DEFAULT -> error ... ?

Thanks,

 David