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

Complex list types are not interpreted as lists for the purposes of type-annotating empty lists #770

Closed
ari-becker opened this issue Dec 30, 2018 · 3 comments · Fixed by #1112

Comments

@ari-becker
Copy link

working.dhall

let RebadgedText = Text : Type
in {
  emptyList = [] : List RebadgedText
}

The working.dhall passes the type checker and produces an empty list.

broken.dhall

let RebadgedTextList = (List Text): Type
in {
  emptyList = [] : RebadgedTextList
}

The broken.dhall produces an error: An empty list requires a type annotation.

Expected behavior: broken.dhall should pass the type checker and produce an empty list.

Using: dhall-to-yaml v1.2.4 (still latest available on Homebrew)

@ocharles
Copy link
Member

ocharles commented Dec 30, 2018 via email

@oded-dd
Copy link

oded-dd commented Dec 30, 2018

+1

@f-f
Copy link
Member

f-f commented Dec 30, 2018

@ari-becker this is a known issue, you might find more info/details in #414

There is also a FAQ entry about this behaviour

sjakobi added a commit that referenced this issue Jul 20, 2019
…as standardized in dhall-lang/dhall-lang#630

Also:

* Update the dhall-lang submodule to the state of
  dhall-lang/dhall-lang#654.

* Skip the nonCharacter test for now.

Fixes #414.
Fixes #770.
sjakobi added a commit that referenced this issue Jul 20, 2019
…as standardized in dhall-lang/dhall-lang#630

Also:

* Update the dhall-lang submodule to the state of
  dhall-lang/dhall-lang#654.

* Skip the nonCharacter test for now.

Fixes #414.
Fixes #770.
@mergify mergify bot closed this as completed in #1112 Jul 20, 2019
mergify bot pushed a commit that referenced this issue Jul 20, 2019
…as standardized in dhall-lang/dhall-lang#630

Also:

* Update the dhall-lang submodule to the state of
  dhall-lang/dhall-lang#654.

* Skip the nonCharacter test for now.

Fixes #414.
Fixes #770.
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

Successfully merging a pull request may close this issue.

4 participants