Open StevenWInfo opened 7 years ago
As I mentioned in another issue, restricting the operators to two type variables prevents something like Double -> Number -> Money
which should be possible. I also mentioned that the equality operator is also problematic because it can't compare different numeric types.
Some of the binary operators can have different types on the left and right of the operator. This makes it difficult to decide what the resulting type of the operator should be. Right now it just arbitrarily picks the one on the right.
I think that maybe the Constructors should be exported with type
a -> b -> c
where they can put a type annotation to explicitly say what type they want, and then the infix operator will have typea -> b -> b
. Possibly also give a hint in the operator that it is the one on the right, like changing$+
to$+>
or something.