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

Support record and variant extension #4

Open
craigfe opened this issue Oct 14, 2020 · 0 comments
Open

Support record and variant extension #4

craigfe opened this issue Oct 14, 2020 · 0 comments

Comments

@craigfe
Copy link
Member

craigfe commented Oct 14, 2020

The algebraic type combinators can be used in a limited way to encode polymorphic variants and record types, but they are not extensible. We have a few cases of polymorhic variant inheritance (Rinherit) in the Irmin repository that cannot be efficiently (or automatically) represented because of this.

It would be nice to look into encoding these types properly at some point.

(Originally reported at mirage/irmin#1102.)

samoht added a commit to samoht/repr that referenced this issue Jul 2, 2022
This allows to write things like:

```
type 'a s = [ `S of int | `R ] [@@deriving repr]
type my_polyvar = [ s | `T of string ] [@@deriving repr]
```

Related to mirage#4
samoht added a commit to samoht/repr that referenced this issue Jul 2, 2022
This allows to write things like:

```
type 'a s = [ `S of int | `R ] [@@deriving repr]
type my_polyvar = [ s | `T of string ] [@@deriving repr]
```

Related to mirage#4
samoht added a commit to samoht/repr that referenced this issue Jul 2, 2022
This allows to write things like:

```
type 'a s = [ `S of int | `R ] [@@deriving repr]
type my_polyvar = [ s | `T of string ] [@@deriving repr]
```

Related to mirage#4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant