-
Notifications
You must be signed in to change notification settings - Fork 217
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
Comments
[] : List T is a single syntactic element, while [] : RebadgedText is
actually three - an annotation node with a (syntactically incomplete) empty
list and the type 'RebadgedText' as children. With the current grammar,
it's not possible to do what you want unfortunately. ([] : List Text) :
RebadgedText should work, but is likely not what you want!
…On Sun, 30 Dec 2018, 2:30 pm Ari Becker ***@***.*** wrote:
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)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#770>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AABRjuTL0Kp-GJrxMl2RhGU4AvFLMFxlks5u-M3sgaJpZM4Zk9DD>
.
|
+1 |
@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 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
working.dhall
The
working.dhall
passes the type checker and produces an empty list.broken.dhall
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)
The text was updated successfully, but these errors were encountered: