You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now, we have a policy for where in the functions, and different rules for other places where where is used (e.g. type classes, instances, etc.).
I propose to apply the existing where rule to allwheres:
classSemigroupawhere(<>)::a->a->a
We would have:
a. A single rule – easier to remember
b. Consistent style of where usage
c. Solved problem of huge constraints in the type classes definitions
d. Discourage for writing empty wheres in instances
e. ?
I guess it would have a positive effect. Let me know what you think! 👂🏼
The text was updated successfully, but these errors were encountered:
@vrom911 I agree here with your reasoning 👍🏻 Even though, I'm not used to writing code like this, I feel that this consistency is very beneficial. Moreover, I imagine we can even utilize Hintman here to check that spaces on each line are multiples of 4, and are multiples of 2 for lines with where to have some code style checks automatic.
The problem with huge constraints in classes and instances (and sometimes even with pragmas like {-# OVERLAPPABLE #-}) is a problem indeed. And I'm all for solving this problem consistently once and for all.
For now, we have a policy for
where
in the functions, and different rules for other places wherewhere
is used (e.g. type classes, instances, etc.).I propose to apply the existing where rule to all
where
s:We would have:
a. A single rule – easier to remember
b. Consistent style of
where
usagec. Solved problem of huge constraints in the type classes definitions
d. Discourage for writing empty
where
s in instancese. ?
I guess it would have a positive effect. Let me know what you think! 👂🏼
The text was updated successfully, but these errors were encountered: