[Agda] complex indices

Ramana Kumar rk436 at cam.ac.uk
Wed Feb 22 22:05:32 CET 2012


On Wed, Feb 22, 2012 at 9:02 PM, Andreas Abel <andreas.abel at ifi.lmu.de>wrote:

> Why has foo a second argument "Bool" after "true"?
>

I don't know. I'm hoping that was a copy/paste error.


> Also, note that the equation
>
>  a = if x then a else a
>
> does not hold definitionally in Agda.  Hence the complaint of Agda.
>

OK, I think that explains it...


> That Agda prints y as @0 points to some problem in Agda.
>

Right.


>
> Cheers,
> Andreas
>
>
> On 22.02.12 9:34 PM, Ramana Kumar wrote:
>
>> Why exactly does this fail?
>> Should it?
>>
>> data foo : (y : Bool) → if y then Set else Set where
>>   bar : foo true Bool
>>
>> The error I get is
>>
>> if @0 then Set else Set != Set of type Set₁
>> when checking the definition of foo
>>
>> which is a little cryptic (but probably no more so than my declaration).
>>
>>
>> ______________________________**_________________
>> Agda mailing list
>> Agda at lists.chalmers.se
>> https://lists.chalmers.se/**mailman/listinfo/agda<https://lists.chalmers.se/mailman/listinfo/agda>
>>
>
> --
> Andreas Abel  <><      Du bist der geliebte Mensch.
>
> Theoretical Computer Science, University of Munich
> Oettingenstr. 67, D-80538 Munich, GERMANY
>
> andreas.abel at ifi.lmu.de
> http://www2.tcs.ifi.lmu.de/~**abel/ <http://www2.tcs.ifi.lmu.de/%7Eabel/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.chalmers.se/pipermail/agda/attachments/20120222/87afc1a9/attachment.html


More information about the Agda mailing list