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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
| On Behalf Of David Sabel
| Sent: 23 July 2003 13:14
| To: [EMAIL PROTECTED]
| 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
| [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

Reply via email to