haskus / packages

Haskus packages
https://haskus.org/
24 stars 11 forks source link

Improve type errors for list membership tests #27

Closed sheaf closed 4 years ago

sheaf commented 4 years ago

I understand that the intention was to have two separate type families, one for checking (CheckMember) and one for computing the index (Index), but that seems wasteful to me as it causes the constraint solver to needlessly traverse the list twice.

hsyl20 commented 4 years ago

Thanks!

Merged as 59bf718e5dd1d8ca63046ded07e90e53f659d562 (I have updated the commit message to reflect the changes).