Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type universe and (possibly) universal subtyping #7

Closed
ice1000 opened this issue Mar 13, 2019 · 9 comments
Closed

Type universe and (possibly) universal subtyping #7

ice1000 opened this issue Mar 13, 2019 · 9 comments
Assignees
Labels
levels Universe polymorphism subtyping Polymorphism

Comments

@ice1000
Copy link
Member

ice1000 commented Mar 13, 2019

No description provided.

@ice1000 ice1000 added the enhancement New feature or request label Mar 13, 2019
@ice1000 ice1000 self-assigned this Mar 13, 2019
@ice1000 ice1000 added subtyping Polymorphism and removed enhancement New feature or request labels Mar 14, 2019
ice1000 added a commit that referenced this issue Mar 16, 2019
ice1000 added a commit that referenced this issue Mar 16, 2019
@anqurvanillapy
Copy link
Member

Is there any plans about GADT introduction?

@anqurvanillapy
Copy link
Member

You can also use something like

data Nat : Type'0
  = zero : Nat
  | succ : Nat -> Nat;

to decouple the compound syntax of split and Sum.

@ice1000
Copy link
Member Author

ice1000 commented Mar 16, 2019

Is there any plans about GADT introduction?

Not for minitt-rs, but probably for OwO (and it's gonna be hard to be compatible with first-class sums)

@ice1000
Copy link
Member Author

ice1000 commented Mar 16, 2019

As you can see here, the sum type is already first-class. I'm trying to build a subtyping rule from it and there's already something working, like

const bool = Sum { True | False };
let a : Sum { True } = True;

let test: bool = a;

@anqurvanillapy
Copy link
Member

Oh damn that looks crazy... but all you're doing are exceeding Mini-TT itself right now. I think it is better to have an a-step-further/intermediate ML-like language to experiment with more features, and leave this Mini-TT untouched and compatible with its original paper?

@ice1000
Copy link
Member Author

ice1000 commented Mar 16, 2019

Version 0.1.8 is a vanilla Mini-TT you'd expect. I'm doing experiments in future versions.

@anqurvanillapy
Copy link
Member

Let's tag it yooo.

ice1000 added a commit that referenced this issue Mar 16, 2019
ice1000 added a commit that referenced this issue Mar 16, 2019
…l0`, and because it fallbacks to `check(..., Type(0))` which causes problem.

I need to implement a more formal universe checker
ice1000 added a commit that referenced this issue Mar 16, 2019
…l0`, and because it fallbacks to `check(..., Type(0))` which causes problem.

I need to implement a more formal universe checker
@ice1000
Copy link
Member Author

ice1000 commented Mar 16, 2019

It's mentioned in the tut. Click https://docs.rs/minitt/0.2.4/minitt/#syntax-trees, scroll to the previous line.

ice1000 added a commit that referenced this issue Mar 16, 2019
…l0`, and because it fallbacks to `check(..., Type(0))` which causes problem.

I need to implement a more formal universe checker
ice1000 added a commit that referenced this issue Mar 16, 2019
@ice1000 ice1000 added the levels Universe polymorphism label Mar 16, 2019
ice1000 added a commit that referenced this issue Mar 16, 2019
@ice1000 ice1000 reopened this Mar 24, 2019
@ice1000 ice1000 changed the title Universe polymorphism and (possibly) universal subtyping Type universe and (possibly) universal subtyping Mar 24, 2019
@ice1000 ice1000 removed their assignment Apr 17, 2019
@ice1000
Copy link
Member Author

ice1000 commented Sep 12, 2019

I'd say it's implemented, closing in favor of #20

@ice1000 ice1000 closed this as completed Sep 12, 2019
@ice1000 ice1000 self-assigned this Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
levels Universe polymorphism subtyping Polymorphism
Projects
None yet
Development

No branches or pull requests

2 participants