aya-dev icon indicating copy to clipboard operation
aya-dev copied to clipboard

Using generalized variables in function body crashes the compiler

Open refparo opened this issue 2 years ago • 1 comments

open data Unit : Type | unit

open struct Wrapped (A : Type) : Type

variable B : Type

def test Unit : Wrapped B -> Unit
  | unit => \(x : Wrapped B) => unit

refparo avatar Mar 24 '22 00:03 refparo

Will implement later. I think the universe polymorphism problem is more urgent and I want to release it earlier :wink: please understand!

ice1000 avatar Mar 24 '22 23:03 ice1000

New minimally reproducible example for generalized variables appearing in function result type position:

variable B : Type

public open data Unit (A : Type) : Type
| unit

def test : Unit B => unit

Here, test should have an implicit variable inserted in the telescope during resolving, but the insertion did not happen.

lunalunaa avatar Aug 27 '22 07:08 lunalunaa

Yay image

ice1000 avatar Aug 27 '22 13:08 ice1000

Yay image

Please don't do anything yet. I'm fixing my gpg signature issue

lunalunaa avatar Aug 27 '22 13:08 lunalunaa

@lunalunaa don't forget to add a test

ice1000 avatar Aug 27 '22 13:08 ice1000