google-research / google-research/dex-lang

Recursive algebraic data types

Open
#331 4 comments 0 reactions 0 assignees View on GitHub
backend language / compiler
Dominant language
Haskell
Stars
1.7k
Forks
116
PR merge metrics
No merged PRs in 30d

Description

I would like to create e.g. a linked list.
But the following doesn't work:

```
data LinkedList a:Type =
Nil
Cons val:a tail:LinkedList

:p Cons 1 Nil
```

the declaration gives a
```
Error: variable not in scope: LinkedList

Cons val:a tail:LinkedList
^^^^^^^^^^
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.