tag:blogger.com,1999:blog-7094652.post6718781128770024357..comments2024-03-23T14:36:09.980+00:00Comments on Neil Mitchell's Blog (Haskell etc): Logical implication in HaskellNeil Mitchellhttp://www.blogger.com/profile/13084722756124486154noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-7094652.post-14326459632169158912013-09-10T19:23:45.824+01:002013-09-10T19:23:45.824+01:00@Jan: Agree. This is a syntactic misfeature, remin...@Jan: Agree. This is a syntactic misfeature, reminding me of some C-pitfalls. Avoid-checklist of language designers should get one longer due to this.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7094652.post-64224557553501541002011-12-22T12:27:56.998+00:002011-12-22T12:27:56.998+00:00IMHO using this is a bad idea. If you are mathemat...IMHO using this is a bad idea. If you are mathematically inclined (reading a Haskell blog proves you are), then you interpret "a <= b" as a is implied by b, not as a implies b. Your code will confuse a lot of people, especially, if they expect an implication.Jannoreply@blogger.comtag:blogger.com,1999:blog-7094652.post-3617547155235907092009-03-05T17:26:00.000+00:002009-03-05T17:26:00.000+00:00Edsko: Very good point, I totally forgot about _|_...Edsko: Very good point, I totally forgot about _|_. And I guess this could be seen as a bug in <=, but it is a fairly reasonable one I guess.Neil Mitchellhttps://www.blogger.com/profile/13084722756124486154noreply@blogger.comtag:blogger.com,1999:blog-7094652.post-67156392898683193432009-03-04T11:14:00.000+00:002009-03-04T11:14:00.000+00:00It's not *really* implication though because i...It's not *really* implication though because it is too strict in the second argument. (False <= undefined) == undefined, but if we define implies p q = not p || q, then False `implies` q == True. (Though it can possibly be argued that this is a bug in the implementation of <=).Unknownhttps://www.blogger.com/profile/08169828758381504025noreply@blogger.comtag:blogger.com,1999:blog-7094652.post-67176358048465836152007-02-08T15:48:00.000+00:002007-02-08T15:48:00.000+00:00Clever. I actually had to go to Hoogle to look up ...Clever. I actually had to go to Hoogle to look up (<=) before I realized that it just less-than-or-equal. I feel a little dumb. It never occurred to me that Bool is an instance of Ord.Alan Falloonhttps://www.blogger.com/profile/04723122666153296362noreply@blogger.com