
In Core, the list of alternatives is always exhaustive. This invariant is not documented in CoreSyn.lhs, but it should be. I'll do that today. | -----Original Message----- | From: glasgow-haskell-users-admin@haskell.org [mailto:glasgow-haskell-users-admin@haskell.org] | On Behalf Of David Sabel | Sent: 23 July 2003 13:14 | To: glasgow-haskell-users@haskell.org | Subject: case-identity | | 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 | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users