My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 510: hint for tuple element comparison
1 person starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  ----

Sign in to add a comment
Reported by balicki.aleksander, Dec 4, 2011
Attached a file with examples. The f functions should trigger a hint to use the g versions. Should work for fst, snd.
341 bytes   View   Download
Dec 4, 2011
#1 balicki.aleksander
i think you can even do a more general version with the on combinator, so it can use an arbitrary function
Dec 4, 2011
Project Member #2
Yes, the on combinator can certainly express far more. I have now stopped suggesting comparing in HLint because it is fairly unused and on is almost as simple yet far more powerful.

Good idea, but at the moment I have no way to express rules over the pattern match of the pair - I will think about how to add it. 
Summary: hint for tuple element comparison
Status: Accepted
Labels: -Proj-Unclassified Proj-HLint
Sign in to add a comment

Powered by Google Project Hosting