[Agda] parameters vs indices

Thorsten Altenkirch Thorsten.Altenkirch at nottingham.ac.uk
Tue Jul 11 11:04:19 CEST 2017


Hi,

this came up during Conor's Agda course at the Types summer school.

It is a bit surprising that the following is accepted

data Good : Set → Set where
  good : (X : Set) → Good X

This looks like we have a large constructor. However, if we want to cheat Agda complains

data Bad : Set → Set where
  bad : {X : Set} → Bad ℕ

Indeed Good is equivalent to Honest which uses a parameter

data Honest (X : Set) : Set where
  honest : Honest X

Why don't we force people to be Honest instead of just being Good?
Thorsten




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 send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chalmers.se/pipermail/agda/attachments/20170711/e63b2d40/attachment.html>


More information about the Agda mailing list