Conversation
No idea what this file is doing here
Must have accidentally put this here when I was editing dagger-cat
Also found an example at Cubical.Functions.Embedding where it would make the code clearer
|
Judging from experience with similar definitions, it is not a good idea to use a unicode version of an already existing symbol like ":". Otherwise I very much sympathize with what you are suggesting here. Maybe you could find a different syntax? Maybe this is something which would be better changed on the side of Agda (opinions @andreasabel )? |
|
Well, \in is already used by Powerset, and :: is already used by lists. Should I open an issue on the agda repo to make it built in? Haskell already does that with ::, so I don't think it'll be too difficult to add it. |
|
Let's just wait a bit to see if Andreas has a comment. This must have been discussed in the past. |
There should be an easy hacky implementation (using just the regular ":") which changes the parser to generally allow it and just uses your definition in a desugaring phase. But that should be horrible error-message wise. |
We have discussed type annotations on and off in the past; I am pro, but there has not been a watertight proposal how to add them yet. would become ambiguous:
|
|
I think this should be fine, because even TypeTopology does this (and they happen to use the same notation that I chose as well) |
|
I remember some other library using the ∋ symbol for this, but I can't seem to recall which one it was. |
What about letting |
|
There is also opportunities to misread |
|
Yes... And it makes sense to not confuse two things which are actually different. A binder/declaration of a variable "x : A" (happy to be corrected on terminology) is different from a type-annotated term "t : A". I think the latter should have a notation which suggests that there is really just an annotation and the whole thing is still an expressen/a term. Maybe "t :< A >" or something like that. |
|
Ah, okay. On the other hand, these two things are already notated the same in Agda and more generally in type theory. |
Ah, it was the agda standard library |
On second thought, I'm not sure I get the point. The first ": C" should be good, since we would give ":" the lowest priority possible, so it is an annotation here. Is the problem that "A : C" could be a variable? Then it is an instance of the same problem as above. |
While brain 2 can sort it out correctly, brain 1 might be tripped up by the visual similarity between typed binding and type annotation. |
|
@mortberg what do you think? |
|
Or @ecavallo ? |
|
I don't have a strong opinion in any direction. There are definitely situations where I've wanted something like this (don't remember any specifically, but similar to the example in the PR). How about The ambiguous situations for |
|
I'd be happy with |
Good idea! |
I also found an example in Cubical.Functions.Embedding where it would make the code easier to understand, and there are probably many more situations