Commit Graph

110 Commits

Author SHA1 Message Date
Ayaz Hafiz
9ab5d0efb8
Constraining of list patterns 2022-10-31 17:05:08 -05:00
Ayaz Hafiz
b0a8b85de3
Canonicalization of list patterns 2022-10-31 17:04:47 -05:00
Ayaz Hafiz
a526fd92aa
inferred extension vars are material if they're not flex or empty 2022-10-31 09:38:22 -05:00
Ayaz Hafiz
4f367e2608
Clippers lose to the Thunder, I lose to Clippy 2022-10-31 09:38:22 -05:00
Ayaz Hafiz
9854f5f2ac
Print alias's underlying structures if OIOP vars are material 2022-10-31 09:38:22 -05:00
Ayaz Hafiz
debe6332c5
Support OIOP for type aliases 2022-10-31 09:38:21 -05:00
Ayaz Hafiz
85e58440de
Allow too many args 2022-10-31 09:37:41 -05:00
Ayaz Hafiz
4d48ea7c2f
Materialize extension variable polarity in error type reporting 2022-10-31 09:37:40 -05:00
Ayaz Hafiz
3c15ff4694
Correctly print wildcards as appropriate in error messages 2022-10-31 09:37:39 -05:00
Ayaz Hafiz
d77080529a
Introduce polarity for extension variable printing 2022-10-31 09:37:39 -05:00
Ayaz Hafiz
0da72df5e9
Add ability slice to eq obligation checker 2022-10-24 14:00:46 -05:00
Ayaz Hafiz
46b741e9dd
Correctly clone able vars across subs 2022-10-24 13:59:52 -05:00
Ayaz Hafiz
49e19d96e5
Print multiple abilities in error types 2022-10-24 13:59:52 -05:00
Ayaz Hafiz
94fc58a508
Pretty-print variables bound to multiple abilities 2022-10-24 13:59:52 -05:00
Ayaz Hafiz
1e6181d2cb
New data structure for storing sorted abilities bound to a variable 2022-10-24 13:59:51 -05:00
Ayaz Hafiz
229548571b
Represent "able" variables with slices of abilities 2022-10-24 13:59:51 -05:00
Ayaz Hafiz
0f0678ce73
s/closure_names/symbol_names/g in subs 2022-10-24 13:59:51 -05:00
Ayaz Hafiz
6bb97c92b9
Canonicalize multiple abilities bound to a type variable 2022-10-24 13:56:07 -05:00
Ayaz
89f14e73a0
Merge pull request #4358 from roc-lang/derive-opaque-defs
Auto-derive ability implementations for opaques in canonicalization
2022-10-24 13:24:51 -05:00
Ayaz Hafiz
5164994fb5
Do not attempt to lookup functions in expects
Functions are not useful to print in expect results, because they are
only printed opaquely as `<function>`. Moreover, their transformation to
closure sets during mono can be extremely lossy, up to and including the
elision of symbols for function closure symbols. As such, simply do not
attempt to lookup or print functions referenced in expects.

Closes #4389
2022-10-24 10:28:56 -05:00
Ayaz Hafiz
e75f3c3c79
Get rid of MemberImpl::Derived
We don't need this anymore, since derived members become Impls during
canonicalization now!
2022-10-23 20:48:07 -05:00
Ayaz Hafiz
05e8e6de6f
Disallow typing optional fields when required fields are annotated
Closes #4313
2022-10-18 15:50:20 -05:00
Ayaz Hafiz
20e4295eea
Make sure type variables bound to abilities are instantiated in aliases
Closes #4259
2022-10-14 13:56:00 -05:00
Ayaz Hafiz
a9c79db5db
Allow complicated type 2022-10-11 10:49:24 -05:00
Ayaz Hafiz
7e79ff55f1
Serialize abilities store and solved implementations with subs 2022-10-11 10:31:21 -05:00
Ayaz Hafiz
46aab8ad8c
Use roc_serialize for subs serialization 2022-10-11 09:19:25 -05:00
Ayaz Hafiz
781d1a2642
Serialize uls_of_var in subs cache 2022-10-10 16:42:04 -05:00
Ayaz
51c687df54
Merge branch 'main' into i4150
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-10-08 16:08:35 -05:00
Ayaz Hafiz
178b634266
Treat single quote literals as ranged numbers for inference purposes 2022-10-05 17:28:00 -05:00
Ayaz Hafiz
16f43f5768
Clippy 2022-10-05 17:25:12 -05:00
Ayaz Hafiz
61cf8e53e6
Have FunctionOrTagUnion include multiple possible tags 2022-10-05 17:24:52 -05:00
Ayaz Hafiz
e9efc95425
Obligation checking for the Hash ability
This implements type-level checks that types can and cannot implement
the `Hash` ability.

Part of #4195
2022-10-04 10:51:14 -05:00
kilianv
6dbebd7834
Update Bool to be opaque 2022-09-20 14:42:01 -05:00
Ayaz Hafiz
041b91e031
Add more test cases 2022-09-19 10:45:31 -05:00
Ayaz Hafiz
8a42d60ca2
Move inhabited check to subs module 2022-09-19 10:08:18 -05:00
dependabot[bot]
0079048944
Bump bumpalo from 3.10.0 to 3.11.0
Bumps [bumpalo](https://github.com/fitzgen/bumpalo) from 3.10.0 to 3.11.0.
- [Release notes](https://github.com/fitzgen/bumpalo/releases)
- [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fitzgen/bumpalo/compare/3.10.0...3.11.0)

---
updated-dependencies:
- dependency-name: bumpalo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-12 21:08:56 +00:00
Jan Van Bruggen
4625a0a869
Rephrase CPU-related "platform"/"host" to "target"/"your machine" 2022-09-11 10:25:02 -06:00
Ayaz Hafiz
4ed579d7a6
Use default instead of new 2022-09-06 15:48:59 -05:00
Ayaz Hafiz
53e1551cd1
Move external specializations storage subs into its own struct 2022-09-06 14:33:41 -05:00
Ayaz Hafiz
882d589d5f
Basic caching of variables saved into storage subs 2022-09-06 14:11:03 -05:00
Ayaz Hafiz
c57fe24805
Use OptVariable rather than Option<Variable> 2022-08-31 14:23:50 -05:00
Folkert
d93d42da8c
make chasing an ext return a custom type 2022-08-30 00:51:24 +02:00
Folkert de Vries
acb71d6007
Merge pull request #3835 from roc-lang/ext-vars-in-derivers
Support bound and unbound extension variables in deriving
2022-08-30 00:34:50 +02:00
Ayaz Hafiz
a01583efff
Add derive key tests for able ext vars 2022-08-23 10:41:06 -05:00
Ayaz Hafiz
a8bd529664
Support derivers for tag unions with ext vars 2022-08-23 10:41:06 -05:00
Ayaz Hafiz
a1d8f8392a
Include RigidOptional as optional field 2022-08-23 10:39:51 -05:00
Richard Feldman
ccd0d32332
Merge remote-tracking branch 'origin/main' into glue-dict 2022-08-21 09:51:22 -04:00
Ayaz Hafiz
1e1c44264f
Make sure to use result from inserting into subs, rather than uninit buffer 2022-08-15 11:11:33 -05:00
Richard Feldman
7e12bcff1d
Rename variant_var to tag_union_var 2022-08-15 11:11:32 -05:00
Ayaz Hafiz
aa5e1e6a27
Build derive keys for derivable records 2022-08-15 11:11:30 -05:00