Commit graph

143 commits

Author SHA1 Message Date
Sam Mohr
db1e0a02b4
Update tests 2025-01-04 05:54:44 -08:00
Anthony Bullard
389cc940e0
Git rid of MigrationFlags constructor 2025-01-02 16:49:08 -06:00
Anthony Bullard
af39ce57fb
Parens and Commas application syntax 2025-01-02 16:49:08 -06:00
faldor20
a7308130cf
clippy on everything 2024-12-12 20:54:25 +10:00
faldor20
81f2095e61
basic working
compiling, but still missing positions from expression errors
2024-12-12 20:54:25 +10:00
Joshua Warner
120e9be550
Move MigrationFlags from an argument on format* to a field on Buf
That has a few advantages:

* We avoid a bunch of extra parameter-passing "noise", since the vast majority of formatting code doesn't need to care about this setting beyond just passing it to nested format calls.
* It aligns really well with the "global" nature of this setting, and makes it impossible to have bugs where e.g. one callsite forgets to pass the correct value to it's children - which would lead to parts of the tree not being migrated. If this is truly a global setting on Buf, that simply can't happen.
2024-12-04 17:57:31 -08:00
Anthony Bullard
a2083cec30
Parsing support for snake_case identifiers
In this initial commit, I have done the following:

- Added unit tests to roc_parse's ident.rs file to cover at least the
  simplest Ident enum cases (Tag, OpaqueRef, and simple Access)
- Added '_' as a valid "rest" character in both uppercase and lowercase
  identifier parts
- Updated the test_syntax snapshots appropriately

There is still a lot left to do here. Such as:

- Do we want to allow multiple '_'s to parse successfully?
- Handle qualified access
- Handle accessor functions
- Handle record update functions
- Remove the UnderscoreInMiddle case from BadIdent
- Write unit tests for Malformed Idents

I am not a "Rustacean" by any means, but have been through the Book in
years past.  Any feedback on the way I wrote the tests or any other part
of the implementation would be very appreciated.
2024-12-03 20:50:47 -06:00
Luke Boswell
6c6f6e08a9
replace cargo deps with workspace in linker, packaging, repl_* 2024-11-29 10:53:54 +11:00
JRI98
a332acd7bf
Remove unused malformed related variants 2024-11-14 10:23:06 +00:00
Agus Zubiaga
7776883262
Unify functions fx vars 2024-11-07 18:54:13 -03:00
Omar Jatoi
3f318e2235
update existing calls to roc_cache_dir()
using `roc_cache_packages_dir()` instead, which will return "~/.cache/roc/packages", which was the existing functionality, but `roc_cache_dir()` will now return "~/.cache/roc"
2024-10-03 12:52:52 -04:00
Kiryl Dziamura
64220567e5
better documentation for underscore pattern 2024-07-08 09:44:36 +02:00
Agus Zubiaga
4e5fdfbf52
Handle root type when loading from str 2024-06-08 19:46:41 -03:00
Andy Ferris
664b1754d0
Print special float values as Num.nanF64, etc 2024-05-31 17:34:43 +10:00
Anton-4
c3cabf7840
Merge pull request #6685 from roc-lang/repl-import
Support imports in REPL
2024-04-30 19:49:26 +02:00
Luke Boswell
2fe03e6c91
remove suffixed from Expr::Var 2024-04-28 08:47:08 +10:00
Agus Zubiaga
52f84910a7
Support importing local files in the REPL 2024-04-26 23:33:19 -03:00
Luke Boswell
3c3e523b45
add suffixed to Identifer and QualifiedIdentifier 2024-04-14 13:45:00 +10:00
Brendan Hansknecht
6dc5bfb1b7
Use roc_target over target_lexicon
Tailors a target class for our needs.
Replaces tons of uses across the entire compiler.
This is a base for later adding new targets like thumb.
2024-03-31 10:50:26 -07:00
Richard Feldman
24a38c4a26
Merge remote-tracking branch 'origin/main' into remove-nat 2024-02-11 12:26:36 -05:00
Anton-4
fa48f9713e
repl now uses replfile.roc
Previously this was using an empty filename but that seems potentially confusing during debugging.
2024-02-09 15:18:51 +01:00
Richard Feldman
aabd95404f
Merge remote-tracking branch 'origin/main' into remove-nat 2024-01-30 21:42:45 -05:00
Richard Feldman
7c19b42a99
Merge pull request #6457 from roc-lang/division-by-zero
Division by zero
2024-01-29 08:37:31 -05:00
Richard Feldman
3e27e18566
Merge remote-tracking branch 'origin/main' into remove-nat 2024-01-29 07:23:58 -05:00
Folkert
0b0127f45e
format infinite float as the ∞ utf8 symbol 2024-01-29 01:37:46 +01:00
Folkert
b0d57587e3
List.get with negative index in repl 2024-01-28 22:21:40 +01:00
Richard Feldman
76dcbee25f
Drop unused target_info from layout 2024-01-26 16:23:21 -05:00
Richard Feldman
70a1def63b
Update some docs to not reference Nat 2024-01-26 16:06:07 -05:00
Folkert
44777c5cac
fix recursive tag memory layout 2023-09-14 14:39:15 +02:00
Folkert
5557fb7e34
repl helper codegen 2023-09-14 14:39:12 +02:00
Folkert
c75f46b369
clippy 2023-09-13 20:24:16 +02:00
Folkert
3560498106
sort tag fields back into user/syntax order in the repl 2023-09-13 20:24:15 +02:00
Richard Feldman
dbf928bc46
Reorganize ReplState logic for cli/wasm compat 2023-09-08 15:37:16 -04:00
Ayaz Hafiz
7ea85e44d2
Add Layout::Erased 2023-07-12 14:43:24 -05:00
Ayaz Hafiz
6312d75ee0
Add FunctionPointer layout 2023-07-12 13:59:50 -05:00
Ayaz Hafiz
44c4797d9a
Parameterize program solving on a FunctionKind
This new flag determines whether we should introduce a new kind to
represent lambda sets, or whether lambdas should be erased. The latter
is not yet implemented.
2023-07-12 13:53:50 -05:00
Folkert
ef39bad7c6
auto clippy fixes 2023-07-10 18:27:08 +02:00
Folkert
6d2d65bb1e
remove Boxed layout 2023-07-09 15:47:28 +02:00
Folkert
17512873e8
add LayoutRepr::Ptr 2023-06-24 14:49:45 +02:00
Ayaz Hafiz
14c2548828
Unnecessary static 2023-06-19 21:11:24 -05:00
Ayaz Hafiz
ca57cce93c
Correctly interpret reordered tag union payloads
Closes #5517
2023-06-19 21:11:23 -05:00
Ayaz Hafiz
bc41db2a34
Get rid of passing target_info a bunch 2023-06-17 18:13:00 -05:00
Ayaz Hafiz
5274dbcd00
Add a Newtype variant to LayoutWrapper 2023-06-06 16:03:52 -05:00
Ayaz Hafiz
457cdabc5c
Make repr private and accessible only via the interner 2023-06-06 16:01:27 -05:00
Ayaz Hafiz
a67c148be7
Convert LayoutRepr::Struct into a tuple variant 2023-05-16 11:58:16 -05:00
Ayaz Hafiz
6b537864c6
Drop unnecessary intern 2023-05-10 16:02:44 -05:00
Ayaz Hafiz
4296d5a349
Drop Layout::struct_no_name_order 2023-05-10 15:58:51 -05:00
Ayaz Hafiz
c3eeb5e2cc
Wrap layouts in a LayoutRepr constructor
Part 1 of support semantic layout representations.
2023-05-10 13:22:10 -05:00
Ayaz Hafiz
759a9976b6
Fix repl evaluation of tuples
Closes #5325
2023-05-01 16:38:50 -05:00
Folkert
4cd8f0a056 clippy --fix fixes 2023-04-21 12:05:51 +02:00