[Agda] nullary copattern matching
Thorsten Altenkirch
Thorsten.Altenkirch at nottingham.ac.uk
Wed Mar 21 12:00:21 CET 2018
It would be relevant if we allow indexed records and coinductive types as discussed recently.
Thorsten
On 20/03/2018, 23:21, "Agda on behalf of Andreas Abel" <agda-bounces at lists.chalmers.se on behalf of abela at chalmers.se> wrote:
> What is the syntax for copattern matching on a record with zero fields?
There isn't any yet, although Jesper and I discussed adding it:
record True : Set where
triv : True
triv .()
The syntax would be a post-fix absurd projection pattern.
Do you have an interesting application for it? With eta-equality, there
is not so much use it seems, since the same can be obtained by
triv = _
Cheers,
Andreas
On 20.03.2018 23:12, Christian Sattler wrote:
> What is the syntax for copattern matching on a record with zero fields?
> I could not find anything in the documentation. For pattern matching on
> a data type with zero constructors, we have syntax for denoting an
> impossible case, but what about the analogous situation for copatterns?
> Note that C-c C-c will happily produce invalid code ("missing definition").
>
> Christian
>
>
> _______________________________________________
> Agda mailing list
> Agda at lists.chalmers.se
> https://lists.chalmers.se/mailman/listinfo/agda
>
--
Andreas Abel <>< Du bist der geliebte Mensch.
Department of Computer Science and Engineering
Chalmers and Gothenburg University, Sweden
andreas.abel at gu.se
http://www.cse.chalmers.se/~abela/
_______________________________________________
Agda mailing list
Agda at lists.chalmers.se
https://lists.chalmers.se/mailman/listinfo/agda
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please contact the sender and delete the email and
attachment.
Any views or opinions expressed by the author of this email do not
necessarily reflect the views of the University of Nottingham. Email
communications with the University of Nottingham may be monitored
where permitted by law.
More information about the Agda
mailing list