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

Add list literal constructors #91

Merged
merged 7 commits into from
Oct 28, 2018
Merged

Add list literal constructors #91

merged 7 commits into from
Oct 28, 2018

Conversation

johnynek
Copy link
Owner

closes #13

This adds the construction, not pattern matching, for list literals.

There are two issues:

  1. the parsing is still not correct since I can't parse function application in lists: [ Foo(a, b), c ] does not parse. I'm not sure why. It seems to be failing when it gets to the ,.
  2. we effectively need macros here, but I have no way to be sure I reference a particular fully qualified function. It may be that we need to expand Expr to have point to imported names instead of just Var that refers to the current environment.

@codecov-io
Copy link

codecov-io commented Oct 27, 2018

Codecov Report

Merging #91 into master will increase coverage by 0.92%.
The diff coverage is 91.95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #91      +/-   ##
==========================================
+ Coverage   69.23%   70.15%   +0.92%     
==========================================
  Files          36       37       +1     
  Lines        1885     1950      +65     
  Branches       42       43       +1     
==========================================
+ Hits         1305     1368      +63     
- Misses        580      582       +2
Impacted Files Coverage Δ
core/src/main/scala/org/bykn/bosatsu/Codegen.scala 56.39% <0%> (-0.43%) ⬇️
core/src/main/scala/org/bykn/bosatsu/Package.scala 96.66% <100%> (+0.51%) ⬆️
...e/src/main/scala/org/bykn/bosatsu/Evaluation.scala 75.4% <100%> (+0.26%) ⬆️
.../src/main/scala/org/bykn/bosatsu/rankn/Infer.scala 85.56% <100%> (+0.05%) ⬆️
core/src/main/scala/org/bykn/bosatsu/Predef.scala 91.66% <100%> (+0.36%) ⬆️
...ore/src/main/scala/org/bykn/bosatsu/Referant.scala 100% <100%> (ø) ⬆️
core/src/main/scala/org/bykn/bosatsu/Parser.scala 82.02% <100%> (+0.62%) ⬆️
...ore/src/main/scala/org/bykn/bosatsu/ListLang.scala 100% <100%> (ø)
core/src/main/scala/org/bykn/bosatsu/Expr.scala 20.65% <33.33%> (ø) ⬆️
...re/src/main/scala/org/bykn/bosatsu/TypedExpr.scala 66.12% <83.33%> (ø) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9e040c...25197b1. Read the comment docs.

@johnynek johnynek changed the title WIP: Add list literal constructors Add list literal constructors Oct 28, 2018
@johnynek johnynek merged commit 1e6aeb9 into master Oct 28, 2018
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 this pull request may close these issues.

add a list literal
2 participants