I was trying to implement something and ran into issues of combinatorial arguments. I trying using concepts to automate this process, but it didn't quite work out. Anyway here's some sample code to show what I mean.
type
Foo = concept f
proc bar(baz: Foo, qux: Foo) = #impl
The issue is this requires both arguments to be the same type even if they both match the concept, but if I do
proc bar(baz: Foo, qux: distinct Foo) = #impl
Then it requires both arguments to be different types, they can't be the same type.
Basically I would like there to be a way to express both of these at once.
This should work:
proc bar(baz, qux: distinct Foo) =