Closed hesiod closed 9 years ago
This is a simple one: you're just missing parentheses. :)
ve = (1, 1) % (Meter :/ Second)
However, I'm leaving this ticket open as a reminder to re-examine fixity declarations, as I think I've gotten them wrong.
Such a trivial mistake... thanks anyway.
Consider a data type like this:
It is defined independently of the number of dimensions of its vectors.
Now, say you want to construct an
Object
like this (expanded to show the type annotations):The compiler will complain to you that (shortened):
The example solves this by creating the
Vec2D
type family, but I'm wondering if there is any way to solve this without giving up the dimension polymorphism mentioned above.