Commit graph

432 commits

Author SHA1 Message Date
Brendan Hansknecht
3966d63e2f
add src and location to dbg 2023-12-02 21:18:31 -08:00
Ayaz Hafiz
a53da2bc24
Make sure late specializations of opaques inherit Inspect as needed
A "late specialization" of a type is an ability specialization that
is not visible or needed until after type-specialization; i.e. during
monomorphization.

The `Inspect.toInspector` ability is special-cased for opaques that do
not claim or explicitly implement `Inspect`. In such cases, they are
treated as structural types, and given the immediate specialization of
`Inpect.inspectOpaque`.

However, prior to this commit, that special-casing would only be applied
during early specialiation (i.e. specializations visible during
generalized type inference). This commit applies the special case to
late specialization as well - the specialization decision for an opaque
type is always the specialization of the opaque type in the late case,
but now, when we go to look up the ambient lambda set of the
specialization, if it does not exist and corresponds to
`Inspect.toInspector`, we fall back to the immediate.

One concern I have here is that in a case like

```
Op := {}

x =
    dbg (@Op {})
```

the specialization of `Inspect.toInspector` for `Op` should be known
early. Indeed, the program

```
Op := {}

x =
    Inspect.toInspector (@Op {}) |> Inspect.apply (Inspect.init {}) |> Inspect.toDbgStr
```

Compiles fine without this change. This makes me suspect there is an
issue with the implementation of `dbg`'s desugaring. If possible, this
should be addressed sooner rather than later.

Closes #6127
2023-11-30 22:25:08 -06:00
Richard Feldman
89be091f87
Order modules in docs sidebar based on exposes 2023-11-18 21:02:49 -05:00
Ayaz Hafiz
886a367026
Go-to-definition basic support 2023-10-25 17:14:50 -05:00
Ayaz Hafiz
703ef6608e
Fix errors 2023-10-25 17:14:49 -05:00
Ayaz Hafiz
6e89821233
Update language server to support apps 2023-10-25 17:14:33 -05:00
Richard Feldman
eebec8a378
Add --output to build, default to app filename 2023-10-19 20:42:28 -04:00
Richard Feldman
2019909922
Use concat! to break up a long string literal 2023-10-15 20:32:20 -04:00
Richard Feldman
1f1b981110
Fix for future clippy 2023-10-15 20:22:03 -04:00
Richard Feldman
f2782e94d5
clippy 2023-10-14 21:49:07 -04:00
Richard Feldman
73f3250b8f
Don't report unhelpful things. 2023-10-14 21:49:06 -04:00
Richard Feldman
08c6a044c4
Improve error handling when mono panics 2023-10-14 21:49:06 -04:00
Richard Feldman
eb135637ef
Compute total_problems rather than asking for it 2023-10-14 21:49:06 -04:00
Richard Feldman
97f252c68b
Fix shut_down_worker_threads! in presence of panic 2023-10-14 21:49:06 -04:00
Richard Feldman
8ee88ba7cb
Minor cleanups 2023-10-14 21:49:06 -04:00
Richard Feldman
a13a3231c7
Exit the process instead of deadlocking on panic 2023-10-14 21:49:05 -04:00
Folkert
94ca207772
formatting 2023-10-07 19:11:37 +02:00
Folkert
6ab54c02e2
drop into_iter in some places 2023-10-07 19:11:36 +02:00
Folkert
5dab46fa60
clippy 2023-09-14 11:41:32 +02:00
Folkert
7af401dd98
assert that package qualifications are valid in platform modules 2023-09-14 11:36:15 +02:00
Richard Feldman
dc7e8b43bd
Rename Float to Frac in more places 2023-09-11 08:50:13 -04:00
Anton-4
63b7fef60f
Merge + update mono tests 2023-08-16 19:21:34 +02:00
Richard Feldman
15a6bc34f4
Merge remote-tracking branch 'origin/main' into inspect-builtin 2023-08-14 15:03:27 -04:00
Richard Feldman
9fe08cafd0
Render docs for abilities, tuples, and as 2023-08-11 20:59:40 -04:00
Richard Feldman
545c07157d
Fix a test 2023-08-10 22:33:29 -04:00
Richard Feldman
700776fad7
Make Inspect a builtin 2023-08-10 21:47:42 -04:00
Richard Feldman
2da41be29f
Merge remote-tracking branch 'origin/main' into abilities-syntax 2023-08-10 20:36:01 -04:00
Folkert
7fb4b60b21
move around hostexposedalias logic 2023-08-09 15:09:03 +02:00
Folkert
f23120078a
cleanup 2023-08-08 16:03:28 +02:00
Folkert
dcc71bc102
remove unused logic 2023-08-07 20:20:10 +02:00
Folkert
a7bf9bc639
annotations are still optional 2023-07-24 22:18:58 +02:00
Folkert
126c3f1536
simplify information passed to mono 2023-07-24 21:54:39 +02:00
Folkert
2756c9af35
switching constraint order fixes things 2023-07-24 21:24:34 +02:00
Folkert
557c3987e0
make it work 2023-07-24 21:24:33 +02:00
Folkert
43adf0635e
freshen annotations 2023-07-24 21:24:33 +02:00
Ayaz Hafiz
dac4d842d8
Fix types 2023-07-17 09:52:14 -05:00
Ayaz Hafiz
fcd733e1df
Dump roc checkmate 2023-07-17 09:51:01 -05:00
Ayaz Hafiz
1282110ef5
Push checkmate through load 2023-07-17 09:51:00 -05:00
Ayaz Hafiz
33b1b8236a
Break up SolveEnv 2023-07-12 13:53:51 -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
Richard Feldman
40f2dd7030
Extract some modules out of file.rs 2023-06-28 22:35:59 -04:00
Folkert
fc3004da58
free or reuse unconditionally when value is unique 2023-06-27 17:37:45 +02:00
Ayaz
0edcd23657
Merge pull request #5569 from roc-lang/finally-trmc
tail recursion modulo cons
2023-06-25 15:31:34 -05:00
Folkert
a3b2de147e
clippy 2023-06-24 14:49:53 +02:00
Folkert
052ce8f2aa
clippy 2023-06-24 14:49:47 +02:00
Folkert
0247237fe8
WIP 2023-06-24 14:49:46 +02:00
Folkert
4a9514d2c4
rough implementation 2023-06-24 14:49:46 +02:00
Ayaz Hafiz
b5ea2c2c99
s/SolveCtx/SolveConfig/g 2023-06-22 14:31:36 -05:00
Ayaz Hafiz
8314d44650
Break up solve/solve into smaller modules 2023-06-22 14:31:14 -05:00