[Agda] Agdas constraint solver too eager?!

James Deikun james at place.org
Sun Sep 9 06:55:02 CEST 2012

On Fri, 2012-09-07 at 15:13 +0200, Andreas Abel wrote:
> A consequence of making Agda aware of unused arguments is that certain 
> "phantom-type" tricks do not work anymore.
>    data D (phantom : Nat) : Set where
>      c : D phantom
> If Agda may recognize 'phantom' as unused, then
>    D 0 = D 1
> and accordingly, D X = D 0 will not solve X to 0.

Is this entirely true to begin with?  What will happen if you have:

  f : {phantom : Nat} -> D phantom -> Nat
  f (c {phantom}) = phantom

Do you plan to have the data constructor lose injectivity along with the
type constructor?  I suppose it probably would not be incoherent to do
so (treating a data constructor as a constructor, properly speaking,
only once the parameters are saturated), but it would seem an unusual

More information about the Agda mailing list