Ayaz Hafiz
6adcaa2cbd
Extend ability symbol slice when merging in subs
2022-12-03 13:17:35 -08:00
Ayaz Hafiz
22a84c8b21
Add comment for is_function
2022-12-02 08:49:14 -06:00
Ayaz Hafiz
3605008fce
Update tests to check eq unbound float is resolved to dec
2022-12-01 11:41:42 -06:00
Ayaz Hafiz
eef51c9d87
Correct crash refs
2022-11-24 14:50:39 -06:00
Ayaz Hafiz
e2b30e5301
Constrain + solve crash
2022-11-24 14:46:50 -06:00
Ayaz Hafiz
9dc489c2b0
First pass constraining crash
2022-11-24 14:46:49 -06:00
Ayaz Hafiz
2ed2d88881
Do not run occurs checks when printing type variables
...
This is a hack. Let's find and correct these problems earlier in the
compiler.
2022-11-24 10:05:28 -05:00
Ayaz Hafiz
f8d51473d8
Report builtins type errors during load building as appropriate
2022-11-24 10:05:25 -05:00
Folkert
e7f3c6f281
inline dbg
2022-11-23 21:23:28 +01:00
Ayaz
1a3119e4c5
Merge pull request #4525 from roc-lang/fix-fixpoints-2
...
Implement fixpoint-fixing and unconditionally emplace variables into type indices
2022-11-19 17:47:02 -06:00
Ayaz
a74d7e14b7
Merge branch 'main' into i4416
...
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-11-17 09:07:00 -06:00
Ayaz Hafiz
716c4cb8e4
Print rigid name in debug representation
2022-11-16 17:09:31 -06:00
Ayaz Hafiz
735685dd86
Include error vars in is_recursion_var checks
2022-11-16 14:05:53 -06:00
Ayaz Hafiz
ce5ca4a93c
Mark emplace_variable as must_use
2022-11-16 14:05:52 -06:00
Ayaz Hafiz
27c2bd025d
Remove debug_assertions requirement
2022-11-16 14:05:51 -06:00
Ayaz Hafiz
9a7402f40b
Add Subs.dbg
2022-11-16 14:05:51 -06:00
Ayaz Hafiz
f7e0383058
Drop dead reference
2022-11-16 13:59:11 -06:00
Ayaz Hafiz
9c8a4ec027
Choose hash implementation for ranged number based on default width
...
Closes #4416
2022-11-16 13:57:03 -06:00
Ayaz Hafiz
af81ceae38
Add method to grab default compilation width of a number
2022-11-16 13:54:48 -06:00
Ayaz Hafiz
2d57aa2170
Use thread-local buffer for occurs check seen variables
...
This materially improves performance for programs that are
recursion-heavy (as most Roc programs will likely be).
```
$ hyperfine '/tmp/roc-old check examples/cli/cli-platform/Arg.roc' '/tmp/roc-new check examples/cli/cli-platform/Arg.roc' --warmup 10
Benchmark 1: /tmp/roc-old check examples/cli/cli-platform/Arg.roc
Time (mean ± σ): 53.8 ms ± 1.3 ms [User: 87.3 ms, System: 10.8 ms]
Range (min … max): 52.2 ms … 60.4 ms 51 runs
Benchmark 2: /tmp/roc-new check examples/cli/cli-platform/Arg.roc
Time (mean ± σ): 45.0 ms ± 1.6 ms [User: 59.4 ms, System: 11.3 ms]
Range (min … max): 42.6 ms … 49.8 ms 60 runs
Summary
'/tmp/roc-new check examples/cli/cli-platform/Arg.roc' ran
1.20 ± 0.05 times faster than '/tmp/roc-old check examples/cli/cli-platform/Arg.roc'
```
The time spent in `occurs` during checking for `Arg` drops from 50% to 23%.
2022-11-15 17:52:12 -06:00
Ayaz Hafiz
ce160f28a2
Chase under aliases during occurs checking
...
Closes #4368
2022-11-15 16:22:01 -06:00
Ayaz Hafiz
b30e8fc9b2
Remove Cells from Types
2022-11-15 09:00:16 -06:00
Ayaz Hafiz
f4fcb9f421
Fix Types
types
2022-11-14 15:37:25 -06:00
Ayaz Hafiz
28f4b1ac56
Allow lints
2022-11-14 15:15:21 -06:00
Ayaz Hafiz
5564796927
SoA Types get variable emplacement (!)
...
We're now reaching the steady state we want to be closert to - when a
type is translated to a variable, emplace the variable we created for it
in the type index, so that types are never converted again!
2022-11-14 15:15:19 -06:00
Folkert
662bf1de99
more workspace dependencies
2022-11-13 16:10:02 +01:00
Ayaz Hafiz
54f4a70a0b
Explain evil
2022-11-11 21:16:23 -06:00
Ayaz Hafiz
a2e90c3709
Fix types SoA usage in solve
2022-11-11 21:16:23 -06:00
Ayaz Hafiz
6b5f632364
[skip-ci] Fix borrow issues in constraining
2022-11-11 21:16:22 -06:00
Ayaz Hafiz
59d2de5a55
Constrain with Types SoA, sans borrow checker
2022-11-11 21:16:05 -06:00
Ayaz Hafiz
6f6a90320e
Store types on ConstrainedModule
2022-11-11 21:16:01 -06:00
Ayaz Hafiz
80a05be8e5
Pretty-printer for debug representation of SoA types
...
```
[roc_load 0.0.1] [crates/compiler/solve/src/solve.rs:331] types.dbg(typ) = (`List.List` (`Num.U8`)), 68 -70->
[roc_load 0.0.1] (`Decode.DecodeResult` 69
[roc_load 0.0.1] ==> {result!: `Result.Result` 69 (`Decode.DecodeError` ==> [TooShort]73),
[roc_load 0.0.1] rest!: `List.List` (`Num.U8`)})
```
2022-11-09 13:34:59 -06:00
Ayaz Hafiz
6071ef9696
Update use of Error tag
2022-11-08 14:12:45 -06:00
Ayaz Hafiz
28c3709ddf
Miscellaneous cleanup
2022-11-08 14:11:26 -06:00
Ayaz Hafiz
1b38cd0504
s/Type::Erroneous/Type::Error
2022-11-08 14:11:26 -06:00
Ayaz Hafiz
c1237215ea
Remove type Problem enum
2022-11-08 14:11:25 -06:00
Ayaz Hafiz
09748aec48
Remove problems from error type API surface
2022-11-08 14:11:25 -06:00
Ayaz Hafiz
b6322ff883
Report empty problems in translating to error type
2022-11-08 14:11:25 -06:00
Ayaz Hafiz
c4bd9fb79d
Remove problems from Subs
2022-11-08 14:11:25 -06:00
Ayaz Hafiz
281bc94b55
Remove FlatType::Erroneous
2022-11-08 14:11:25 -06:00
Ayaz Hafiz
1974d8e848
Add comment on missing reporting
2022-11-08 14:11:24 -06:00
Ayaz Hafiz
fd80f5b70e
Remove problem in alias instantiation
2022-11-08 14:11:24 -06:00
Ayaz Hafiz
c9953129cb
Remove problem storage in Type::Erroneous
2022-11-08 14:11:24 -06:00
Ayaz
b984351514
Merge pull request #4489 from roc-lang/types-soa-more-in-solve
...
Types SoA for aliases instantiated during solving
2022-11-08 14:06:57 -06:00
Folkert de Vries
95f8bac859
Merge pull request #4485 from roc-lang/types-soa
...
Types SoA and Type -> Variable conversion via SoA
2022-11-08 20:32:27 +01:00
Ayaz Hafiz
7034a4d692
Types SoA for aliases instantiated during solving
2022-11-08 12:57:30 -06:00
Ayaz Hafiz
b0bcda4117
typo
2022-11-08 09:00:25 -06:00
Ayaz Hafiz
db8e135a05
Simplify AbilitySet storage
2022-11-08 09:00:25 -06:00
Ayaz Hafiz
b7af241538
Address clippy for Types
2022-11-08 09:00:25 -06:00
Ayaz Hafiz
e240b18b27
Recover Erroneous in type
2022-11-08 09:00:25 -06:00