Commit graph

101 commits

Author SHA1 Message Date
Folkert
9b63e6a3a9
simplify IntroducedVariables 2022-03-18 23:47:39 +01:00
Brian Carroll
9cb6261a4d
Merge pull request #2736 from rtfeldman/wasm-repl-palette
Web REPL error styling
2022-03-18 12:00:44 +00:00
Folkert
a3b00fbf55
Merge branch 'explicit-closed-tag-record' into delay-instantiating-aliases 2022-03-17 20:34:52 +01:00
Brian Carroll
0d7a7fe34f reporting: generalise text styles to work with HTML as well as ANSI 2022-03-17 09:35:58 +00:00
Folkert
de37897df4
fix reporting tests compilation 2022-03-16 22:10:20 +01:00
ayazhafiz
8aaf614481 Improve error message 2022-03-15 11:18:02 -05:00
ayazhafiz
787c8ee3a5 s/occurence/occurrence/g 2022-03-14 17:50:55 -05:00
ayazhafiz
3da34fc843 Report unbound type variables in aliases, opaques
Closes #2726
2022-03-14 17:42:45 -05:00
ayazhafiz
01b5109672 Fix reporting test 2022-03-13 19:47:01 -05:00
ayazhafiz
d92a5b9424 Reporting for abilities parsing 2022-03-12 22:08:01 -06:00
Derek Gustafson
e9d99862da
Fix failing test. 2022-03-11 17:26:08 -05:00
Derek Gustafson
133d74cc82
Merge branch 'trunk' into typecheck-panic 2022-03-11 10:02:08 -05:00
Folkert
768703c5df
update reporting; suggestions now have Box in scope 2022-03-09 16:12:11 +01:00
Derek Gustafson
9284d2733f
Fix fmt errors. 2022-03-08 13:49:53 -05:00
Derek Gustafson
05c888de56
Move UnknownType panic test from cli_run to test_reporting. 2022-03-08 13:20:31 -05:00
ayazhafiz
47e4904075 Chase aliases when checking for valid extension types 2022-03-06 22:17:58 -05:00
ayazhafiz
74c972916d Remove unnecessary whitespace in reporting tests 2022-03-06 22:17:22 -05:00
ayazhafiz
eed7e3df71 Report invalid extension types during canonicalization
Closes #2541
2022-03-06 22:17:22 -05:00
ayazhafiz
6672a174f2 Mention lack of if clause in missing guard pattern 2022-03-06 09:51:38 -05:00
ayazhafiz
cc07c93fc3 Add note about lack of a guard in missing tag 2022-03-05 13:34:49 -05:00
ayazhafiz
81481e2599 Report non-exhaustive patterns with guards 2022-03-05 13:30:02 -05:00
Folkert
f2fa625886
add test 2022-03-05 16:48:33 +01:00
Folkert
f8021fb449
fix reporting tests 2022-03-02 22:17:25 +01:00
Richard Feldman
887a07b455
Merge pull request #2596 from rtfeldman/joshuawarner32/listclosing-braces
Allow closing braces in collections to be at any indent level
2022-02-28 20:00:44 -05:00
Joshua Warner
3db961106e Remove now failing tests 2022-02-27 14:16:06 -08:00
ayazhafiz
69953c74ad Fix missing test annotation 2022-02-27 15:51:27 -05:00
ayazhafiz
720b7b49d2 Improve error pattern and fix tests 2022-02-27 12:01:12 -05:00
ayazhafiz
34900c1f55 Address @rtfeldman review 2022-02-27 00:11:11 -05:00
ayazhafiz
07b1829732 Improve error reporting for patterns not matching opaques 2022-02-27 00:11:11 -05:00
ayazhafiz
68d28349ed Exhaustiveness checking opaque patterns 2022-02-27 00:10:12 -05:00
ayazhafiz
059c324268 Error reporting for type mismatches involving opaques 2022-02-27 00:10:12 -05:00
ayazhafiz
822e38d026 Fix opaque reporting tests 2022-02-27 00:10:12 -05:00
Emi Simpson
7db55e4662
📝️ Add a test for #2422 2022-02-25 11:41:47 -05:00
ayazhafiz
e8867d6355 Add opaques scope-escaping test @rtfeldman suggested 2022-02-21 23:40:00 -05:00
ayazhafiz
321a970215 Add qualified opaque reference reporting test 2022-02-21 18:32:23 -05:00
ayazhafiz
90de82e295 Validation of opaques during canonicalization 2022-02-21 18:25:19 -05:00
ayazhafiz
6b53692aac Canonicalize opaque types 2022-02-20 13:47:01 -05:00
ayazhafiz
6104a27b45 Parse opaque references 2022-02-19 21:30:42 -05:00
ayazhafiz
8c0e39211d Instantiate recursive aliases to their smallest closures
Now, when we have two aliases like

```
T a : [ A, B (U a) ]
U a : [ C, D (T a) ]
```

during the first pass, we simply canonicalize them but add neither to
the scope. This means that `T` will not be instantiated in the
definition of `U`. Only in the second pass, during correction, do we
instantiate both aliases **independently**:

```
T a : [ A, B [ C, D (T a) ] ]
U a : [ C, D [ A, B (U a) ] ]
```

and now we can mark each recursive, individually:

```
T a : [ A, B [ C, D <rec1> ] ] as <rec1>
U a : [ C, D [ A, B <rec2> ] ] as <rec2>
```

This means that the surface types shown to users might be a bit larger,
but it has the benefit that everything needed to understand a layout of
a type in later passes is stored on the type directly, and we don't need
to keep alias mappings.

Since we sort by connected components, this should be complete.

Closes #2458
2022-02-11 08:43:33 -05:00
ayazhafiz
c064c50036 Catch illegal alias cycles more strictly
Part of #2458
2022-02-10 22:12:33 -05:00
ayazhafiz
a863e3cf1b Restore regressions 2022-02-06 15:04:13 -05:00
ayazhafiz
0d241f3c3c Only expand ErrorType::Range's type range when range unification fails 2022-02-06 15:04:13 -05:00
ayazhafiz
680bf8e0b7 Treat rigids as flex vars when checking number range types 2022-02-06 15:04:12 -05:00
ayazhafiz
c5d918e68c Include floats in bounds for unspecified numbers 2022-02-06 15:04:12 -05:00
ayazhafiz
8dc92ccd97 Second pass 2022-02-06 15:04:12 -05:00
ayazhafiz
5e0d90ac53 First pass 2022-02-06 15:04:12 -05:00
Folkert
2f453cfea2 add test for UnusedImport 2022-02-06 12:34:23 +01:00
Folkert
f1ebc523b6 Merge remote-tracking branch 'origin/trunk' into hook-up-hosted-modules 2022-02-04 00:07:23 +01:00
Folkert
885500712c remove old Effect module things 2022-02-03 23:55:02 +01:00
Folkert
a98635ed06 update other examples 2022-02-03 22:45:15 +01:00