Commit Graph

2532 Commits

Author SHA1 Message Date
Ayaz Hafiz
42e8e409d4
Address lint 2022-12-01 15:59:01 -06:00
Ayaz Hafiz
9181ed8092
Correctly compile rvalue closures defined in nested defines to lvalues
Previously, a program like

```
main =
  f =
    n = 1
    \{} -[#lam]-> n  # suppose lambda set = #lam
  f {}
```

would be transformed to

```
main =
  n = 1
  f = \{} -[#lam]-> n
  f {}
```

However, the IR lowering procedure is such that we would then associate
`f` as definining the procedure given the lambda set `#lam`. This is not
correct, as `f` is really a function pointer in this circumstance,
rather than the definer of `#lam`.

Instead, the transformation we want to perform is

```
main =
  n = 1
  #lam = \{} -[#lam]-> n
  f = #lam
  f {}
```

Which is what this patch does

Closes #2403
2022-12-01 15:47:18 -06:00
Ayaz Hafiz
68e364d897
Do not attempt to handle aliasing of procs in variable assignments
Please see the comment in the diff to explain the rationale of this
change.

Closes #4636
2022-12-01 15:20:58 -06:00
Ayaz Hafiz
2dfe0276e4
Make sure to assign and update program holes correctly when specializing symbols
Previously this was a bit hacky, we worked around having to update
symbol substitutions by special-casing the rest of the program. There's
not need to do that.
2022-12-01 14:57:01 -06:00
Richard Feldman
2a27d3c05f
Merge pull request #4642 from roc-lang/dbg-parsing-problem
stop parsing dbg as a value def
2022-12-01 06:55:23 -05:00
Richard Feldman
a0bc105ca8
Merge pull request #4616 from roc-lang/fix-pattern-equivalent
Fix missing cases in Pattern::equivalent
2022-11-30 12:10:09 -05:00
Richard Feldman
da158bca19
Merge pull request #4637 from roc-lang/check-link-exit-status
check the exit status of the link cmd
2022-11-30 12:09:14 -05:00
Folkert
b6622b71ec
stop parsing dbg as a value def 2022-11-30 14:18:48 +01:00
Anton-4
0b98609a22
check the exit status of the link cmd 2022-11-29 16:53:04 +01:00
Joshua Warner
2b91af02df
Introduce record! combinator
... and refactor header parser to fully use combinators, in support of future combinator-based superpowers
2022-11-28 20:25:55 -08:00
Joshua Warner
8de153efb9
Fix missing cases in Pattern::equivalent 2022-11-28 19:47:53 -08:00
Folkert
c9ba57f15a
fix merge conflict that made it to main 2022-11-29 00:20:03 +01:00
Anton-4
963eb9f2c1
Merge pull request #4620 from roc-lang/metadata_fix
change matadata filename based on target
2022-11-28 19:19:40 +01:00
Richard Feldman
c1a75a57f1
Merge pull request #4592 from roc-lang/collections_refactor
Refactor collection_trailing_sep_e
2022-11-28 11:14:30 -05:00
Anton-4
91266a03c6
change matadata filename based on target 2022-11-28 15:18:15 +01:00
Joshua Warner
a3071a8aea
Allow migrating reporting tests to failing parse tests 2022-11-26 17:34:50 -08:00
Richard Feldman
bb89344eaa
Merge pull request #4562 from roc-lang/https-packages
URL-based packages
2022-11-26 15:50:09 -05:00
Joshua Warner
451b2c0ded
Refactor collections 2022-11-26 09:55:54 -08:00
Brian Carroll
82aa126353
gen_wasm: improve a code comment 2022-11-26 15:38:48 +00:00
Richard Feldman
2409399ff3
Don't even compile https stuff in wasm! 2022-11-26 08:53:31 -05:00
Brian Carroll
c7de45a316
Merge branch 'main' of github.com:roc-lang/roc into wasm_interp_blocks 2022-11-26 10:59:48 +00:00
Richard Feldman
b2beeb770e
Merge remote-tracking branch 'origin/main' into https-packages 2022-11-25 19:50:06 -05:00
Richard Feldman
791025d3ed
Merge pull request #4579 from roc-lang/underivable-rigid-better-error
Suggest binding type variables to an ability when they're unsatisfied
2022-11-25 19:46:11 -05:00
Brian Carroll
d9fe907684
wasm_module: create const ValueType::VOID to use as block type 2022-11-26 00:38:41 +00:00
Ayaz
8c0ff4c839
Merge pull request #4558 from roc-lang/specialization-sets-for-impl-opaques
Support custom abilities for opaques with immaterial lambda sets
2022-11-25 16:42:32 -06:00
Ayaz
15e372373a
Merge branch 'main' into underivable-rigid-better-error
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-11-25 16:33:57 -06:00
Richard Feldman
58fad36f9d
Merge pull request #4460 from roc-lang/crash
Crash
2022-11-25 17:18:21 -05:00
Richard Feldman
695bb7e353
Merge pull request #4603 from roc-lang/dbg-fixes
Dbg fixes
2022-11-25 15:10:22 -05:00
Richard Feldman
84b8c69799
Merge pull request #4520 from roc-lang/str-docs
Str docs improvements
2022-11-25 13:06:11 -05:00
Folkert
bc3414e913
spelling 2022-11-25 18:30:04 +01:00
Folkert
07b7a93b9f
fix not being able to dbg variable 2022-11-25 17:55:01 +01:00
Brian Carroll
74e1bc412f
Merge pull request #4593 from roc-lang/wasm_interp_cli
Wasm interp CLI
2022-11-25 13:01:09 +00:00
Richard Feldman
a63f1378ef
Merge remote-tracking branch 'origin/main' into str-docs 2022-11-25 04:12:42 -05:00
Richard Feldman
bef59299a2
Merge remote-tracking branch 'origin/main' into https-packages 2022-11-25 04:07:37 -05:00
Richard Feldman
f52ad5cbba
Merge pull request #4591 from roc-lang/tuple-accessor
Tuple accessors after tuples/records
2022-11-24 22:34:27 -05:00
Richard Feldman
08764787f5
Merge remote-tracking branch 'origin/main' into https-packages 2022-11-24 21:14:43 -05:00
Richard Feldman
40bf022e02
Merge pull request #4586 from roc-lang/wasm-debug-tips
gen_wasm: Add debugging tips to readme
2022-11-24 19:41:31 -05:00
Brian Carroll
60a671362f
wasm_interp: Create a CLI to run .wasm files 2022-11-25 00:14:44 +00:00
Richard Feldman
99f55d6ed6
Merge remote-tracking branch 'origin/main' into https-packages 2022-11-24 19:14:31 -05:00
Joshua Warner
56470c838d
Implement tuple accessors after records/tuples 2022-11-24 15:32:39 -08:00
Richard Feldman
917eb898fc
Merge pull request #4589 from roc-lang/fix-test
Fix test
2022-11-24 17:56:45 -05:00
Joshua Warner
a1432d1a14
Fix TypeAnnotation::Tuple comment 2022-11-24 14:29:50 -08:00
Ayaz Hafiz
7fdaf0f1bf
Make sure to ignore type errors in test 2022-11-24 14:58:35 -06:00
Ayaz Hafiz
41659ec394
Remove unneeded roc_panic extern in tests
We stub roc_panic to SJ/LJ-style exceptions in llvm tests, so this is
not needed.
2022-11-24 14:56:44 -06:00
Ayaz Hafiz
0cb41b7a07
Indent tests more 2022-11-24 14:55:11 -06:00
Ayaz Hafiz
cbdb535580
Remove unused macro 2022-11-24 14:54:51 -06:00
Ayaz Hafiz
ebc2b29199
Remove use of expect_runtime_error_panic 2022-11-24 14:54:11 -06:00
Ayaz Hafiz
e6cd64f161
Swap out expect_runtime_error_panic for assert_evals_to 2022-11-24 14:53:21 -06:00
Ayaz Hafiz
eef51c9d87
Correct crash refs 2022-11-24 14:50:39 -06:00
Ayaz Hafiz
26d8f0ce08
Fix kw list 2022-11-24 14:48:39 -06:00