Open gamebox opened 6 years ago
When getting started, a user may incorrectly use the (::) operator like List.append, trying to join two lists. The error messaging is very vague, and may cause as much confusion as it diffuses. See the following SSCCE:
See on ellie
Maybe when we see a situation where a function or operator is of the shape:
a -> Collection a -> Collection a
And the left side is Collection a, we can emit an error like
This operator looks to be looking for a single element of type a for the left side, but you are passing a Collection of type a. Either the left side should be: a Or the right side should be: Collection (Collection a)
This operator looks to be looking for a single element of type a for the left side, but you are passing a Collection of type a.
Either the left side should be:
a
Or the right side should be:
Collection (Collection a)
Is this possible, or does it make sense?
When getting started, a user may incorrectly use the (::) operator like List.append, trying to join two lists. The error messaging is very vague, and may cause as much confusion as it diffuses. See the following SSCCE:
See on ellie
Maybe when we see a situation where a function or operator is of the shape:
a -> Collection a -> Collection a
And the left side is Collection a, we can emit an error like
Is this possible, or does it make sense?