Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC FS-1043] Extension members visible to trait constraints #6805

Draft
wants to merge 279 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
279 commits
Select commit Hold shift + click to select a range
06b15b2
Merge branch 'feature/ext' of https://github.com/dotnet/fsharp into f…
dsyme Jan 31, 2020
8d8894b
Merge branch 'master' of https://github.com/dotnet/fsharp into featur…
dsyme Jan 31, 2020
87d087a
Merge branch 't7' of https://github.com/dsyme/visualfsharp into featu…
dsyme Jan 31, 2020
fa29949
Merge pull request #8438 from dotnet/merges/master-to-feature/ext
KevinRansom Feb 1, 2020
5603467
add return type overloading, extensive + operator widening tests, pre…
dsyme Feb 3, 2020
59be345
Merge branch 'feature/ext' of https://github.com/dotnet/fsharp into f…
dsyme Feb 3, 2020
c0fe961
merge master
dsyme Feb 3, 2020
00f8e3d
fix test
dsyme Feb 3, 2020
1f15262
minimize diff
dsyme Feb 3, 2020
d7fa8fd
fix build
dsyme Feb 3, 2020
992c6b2
update baselines and add extension priority testing
dsyme Feb 4, 2020
8f8c0b3
PR for trials related to FS-1043 (#8404)
dsyme Feb 4, 2020
a06c2ee
fix baseline
dsyme Feb 4, 2020
821649c
Merge branch 'feature/ext' of https://github.com/dotnet/fsharp into f…
dsyme Feb 4, 2020
7f5a0c2
fix baseline
dsyme Feb 4, 2020
d49b827
better version checks
dsyme Feb 4, 2020
e9b569d
update test files
dsyme Feb 5, 2020
1dca3d1
Merge pull request #8460 from dotnet/merges/master-to-feature/ext
KevinRansom Feb 5, 2020
cb997ca
Merge pull request #8482 from dotnet/merges/master-to-feature/ext
KevinRansom Feb 5, 2020
d5768b3
push traitCtxt to all freshen operations
dsyme Feb 6, 2020
fa3599d
Merge branch 'feature/ext' of https://github.com/dotnet/fsharp into f…
dsyme Feb 6, 2020
1760f84
merge master
dsyme Feb 6, 2020
5a52af6
Merge branch 'master' of https://github.com/dotnet/fsharp into featur…
dsyme Feb 7, 2020
f52f54e
remove tests that no longer apply
dsyme Feb 7, 2020
0af746d
fix f# extension members
dsyme Feb 7, 2020
e27a5b2
integrate master
dsyme Feb 7, 2020
3eb1e90
integrate master
dsyme Feb 7, 2020
0628597
add tests for compat problem
dsyme Feb 10, 2020
eb5b81b
Update tests/fsharp/typecheck/sigs/neg132.fs
dsyme Feb 10, 2020
bc78327
integrate master
dsyme Mar 12, 2020
b3249ef
Merge branch 'master' of https://github.com/dotnet/fsharp into featur…
dsyme Mar 12, 2020
2fa2a14
merge master
dsyme Mar 17, 2020
2f10846
Merge branch 'master' of https://github.com/dotnet/fsharp into featur…
dsyme Mar 19, 2020
4d4402a
debug
dsyme Mar 19, 2020
f57f947
squash unsolved variables arising from witness generation
dsyme Mar 20, 2020
f0287a1
add test
dsyme Mar 20, 2020
de0907d
Merge branch 'master' of https://github.com/dotnet/fsharp into featur…
dsyme Mar 20, 2020
a8c4dba
fix build
dsyme Mar 20, 2020
889fcdb
revert shwow typar
dsyme Mar 20, 2020
149f290
fix test baseline
dsyme Mar 20, 2020
d2a99d6
fix test baseline
dsyme Mar 20, 2020
194d7b3
fix options
dsyme Mar 20, 2020
d83b53b
merge master
dsyme Mar 23, 2020
fa2e6cc
reduce diff
dsyme Mar 24, 2020
013ae26
Merge branch 'master' into feature/ext
cartermp Mar 24, 2020
09a4a50
merge master
dsyme Mar 25, 2020
e0e07a4
merge master
dsyme Mar 25, 2020
c59eb82
merge master
dsyme Mar 26, 2020
9f5b3fc
Merge branch 'master' of https://github.com/dotnet/fsharp into featur…
dsyme Mar 27, 2020
d1a651c
merge master, fix test
dsyme Mar 27, 2020
7fbdf53
merge master
dsyme Mar 30, 2020
9812a27
Merge pull request #8864 from dotnet/merges/master-to-feature/ext
KevinRansom Apr 2, 2020
649885c
Merge branch 'master' of https://github.com/dotnet/fsharp into featur…
dsyme Apr 7, 2020
542fb42
Merge pull request #8901 from dotnet/merges/master-to-feature/ext
KevinRansom Apr 8, 2020
f2c28a9
Merge pull request #8916 from dotnet/merges/master-to-feature/ext
KevinRansom Apr 10, 2020
35435dc
Merge pull request #8923 from dotnet/merges/master-to-feature/ext
KevinRansom Apr 10, 2020
903f194
Merge pull request #8930 from dotnet/merges/master-to-feature/ext
KevinRansom Apr 10, 2020
6596958
Merge pull request #8946 from dotnet/merges/master-to-feature/ext
KevinRansom Apr 15, 2020
53056ac
Merge pull request #8956 from dotnet/merges/master-to-feature/ext
KevinRansom Apr 17, 2020
3b78880
Merge pull request #8976 from dotnet/merges/master-to-feature/ext
KevinRansom Apr 17, 2020
238c534
Merge pull request #8988 from dotnet/merges/master-to-feature/ext
KevinRansom Apr 18, 2020
7789da1
merge master
dsyme Apr 20, 2020
6ac7ae1
Merge branch 'master' of https://github.com/dotnet/fsharp into featur…
dsyme Apr 27, 2020
b88855d
Merge branch 'master' of https://github.com/dotnet/fsharp into featur…
dsyme May 5, 2020
233c70b
Merge branch 'master' into feature/ext
dsyme May 21, 2020
fa957c7
integrate master
dsyme Jun 3, 2020
e06f268
integrate master
dsyme Jun 3, 2020
e800fc2
fix tests
dsyme Jun 3, 2020
0910392
Merge pull request #9439 from dotnet/merges/master-to-feature/ext
KevinRansom Jun 13, 2020
8561fd7
fix build
dsyme Jun 15, 2020
6cdb9b4
alternative fix for 9449
dsyme Jun 15, 2020
23e33a1
Merge pull request #9451 from dotnet/merges/master-to-feature/ext
KevinRansom Jun 16, 2020
c38ebd8
add test case
dsyme Jun 16, 2020
150a2a5
fix 9449 properly by assert type equations simultaneously
dsyme Jun 16, 2020
d0803ca
Merge branch 'master' of https://github.com/dotnet/fsharp into featur…
dsyme Jun 16, 2020
5625ce6
merge fix for 9449
dsyme Jun 16, 2020
5becff6
integrate master
dsyme Jun 17, 2020
aa41f56
fix build
dsyme Jun 17, 2020
da9d15c
Merge pull request #9476 from dotnet/merges/master-to-feature/ext
KevinRansom Jun 17, 2020
9448b5f
Merge pull request #9486 from dotnet/merges/master-to-feature/ext
KevinRansom Jun 18, 2020
59bb105
Merge pull request #9492 from dotnet/merges/master-to-feature/ext
KevinRansom Jun 18, 2020
1538942
merge main
Oct 23, 2020
3995669
merge main
Oct 23, 2020
8131090
Merge commit '0b69e41ae38243961beb34eac52d58ddf208f6d5' of https://gi…
Oct 24, 2020
9e6c37a
merge main
Oct 24, 2020
4639d76
fix test
Oct 24, 2020
9a2ab26
fix test after merge
Oct 25, 2020
2124bfc
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/ext
Oct 28, 2020
ef3f5cb
Merge pull request #10351 from dotnet/merges/main-to-feature/ext
KevinRansom Oct 28, 2020
1d402a2
Merge pull request #10354 from dotnet/merges/main-to-feature/ext
dsyme Oct 30, 2020
fc1f2bd
Merge pull request #10361 from dotnet/merges/main-to-feature/ext
KevinRansom Oct 30, 2020
8d1e29e
Merge pull request #10367 from dotnet/merges/main-to-feature/ext
KevinRansom Nov 1, 2020
7f7397a
Reduce number of typeEquiv checks (#10324) (#10373)
dotnet-bot Nov 1, 2020
9fb35d0
Merge pull request #10377 from dotnet/merges/main-to-feature/ext
KevinRansom Nov 2, 2020
c4fa8c8
merge main
Nov 11, 2020
ef46f65
Merge pull request #10429 from dotnet/merges/main-to-feature/ext
KevinRansom Nov 11, 2020
716cb79
merge main
Dec 7, 2020
c07e803
fix merge
Dec 8, 2020
f43d2fd
fix test
Dec 8, 2020
2acbce3
Delete FSharp.Compiler.Service.fsproj
dsyme Dec 8, 2020
16ce5c5
Delete CompileOps.fs
dsyme Dec 8, 2020
3bf60c8
merge main
Dec 10, 2020
ca43bfe
add expression testing for unitized operators
Dec 10, 2020
b4aa2c0
fix witnesses for unitized operators
Dec 10, 2020
448ecf0
add expression testing for unitized operators
Dec 10, 2020
4f8d614
fix witnesses for primitive operators with units of measure
Dec 10, 2020
f031bf3
first check test cases fail for primitive operators with units of mea…
Dec 10, 2020
bb67fd6
fix witnesses for primitive operators with units of measure
Dec 10, 2020
5142207
fix witnesses
Dec 10, 2020
391873d
integrate fix99
Dec 10, 2020
ed81de9
Merge pull request #10673 from dotnet/merges/main-to-feature/ext
KevinRansom Dec 11, 2020
ee6ab0e
merge main
Dec 13, 2020
f578906
fix tests
Dec 13, 2020
af59e7e
Merge pull request #10700 from dotnet/merges/main-to-feature/ext
KevinRansom Dec 14, 2020
d525bb8
Merge pull request #10711 from dotnet/merges/main-to-feature/ext
KevinRansom Dec 14, 2020
119a3cf
Merge pull request #10714 from dotnet/merges/main-to-feature/ext
KevinRansom Dec 15, 2020
9147d71
Merge pull request #10724 from dotnet/merges/main-to-feature/ext
KevinRansom Dec 16, 2020
4fc866e
Merge pull request #10731 from dotnet/merges/main-to-feature/ext
KevinRansom Dec 16, 2020
377bbc7
Merge pull request #10742 from dotnet/merges/main-to-feature/ext
KevinRansom Dec 16, 2020
0f35e68
Merge pull request #10747 from dotnet/merges/main-to-feature/ext
KevinRansom Dec 17, 2020
7ed0bc6
integrate main
Dec 21, 2020
dfaf5fa
Merge pull request #10775 from dotnet/merges/main-to-feature/ext
KevinRansom Dec 22, 2020
4441479
Merge pull request #10789 from dotnet/merges/main-to-feature/ext
KevinRansom Dec 23, 2020
8343d34
Merge pull request #10796 from dotnet/merges/main-to-feature/ext
cartermp Dec 23, 2020
aaf2dd8
Merge pull request #10801 from dotnet/merges/main-to-feature/ext
KevinRansom Dec 23, 2020
1a5e4e1
integrate main
Feb 4, 2021
c593774
Merge pull request #11013 from dotnet/merges/main-to-feature/ext
KevinRansom Feb 5, 2021
ebaa575
Merge pull request #11038 from dotnet/merges/main-to-feature/ext
cartermp Feb 6, 2021
9bb5cb2
Merge pull request #11053 from dotnet/merges/main-to-feature/ext
KevinRansom Feb 8, 2021
9c86d04
Merge pull request #11064 from dotnet/merges/main-to-feature/ext
KevinRansom Feb 9, 2021
77f6bfa
Merge pull request #11081 from dotnet/merges/main-to-feature/ext
KevinRansom Feb 11, 2021
f8e6348
Merge pull request #11094 from dotnet/merges/main-to-feature/ext
KevinRansom Feb 12, 2021
a325bdf
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/ext
Mar 29, 2021
bc2cd76
merge main
May 24, 2021
12ecd65
merge main
Jun 8, 2021
275db0c
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/ext
dsyme Jun 9, 2021
e42ca26
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/ext
dsyme Jun 10, 2021
d5653c1
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/ext
Jun 24, 2021
4c85d50
fix test
Jun 24, 2021
dd4c051
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/ext
Jun 25, 2021
db58a25
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/ext
Jul 14, 2021
27bb056
Merge branch 'main' into feature/ext
vzarytovskii Jul 16, 2021
fe4caec
Merge branch 'main' into feature/ext
vzarytovskii Jul 20, 2021
698aacb
merge main
dsyme Sep 14, 2021
ebd00d6
fix build
dsyme Sep 14, 2021
5fbc583
fix build
dsyme Sep 14, 2021
fdfa29d
trim diff
dsyme Sep 15, 2021
66d8ec5
merge part of main
dsyme Jul 12, 2022
77a150e
merge part of main
dsyme Jul 12, 2022
aea2110
merge part of main
dsyme Jul 12, 2022
024adcc
Merge commit 'f24f6793d03277d41ee2f9294aabb09e005f0e69' into feature/ext
dsyme Jul 12, 2022
509111e
merge part of main
dsyme Jul 12, 2022
b4d3590
merge part of main
dsyme Jul 12, 2022
0aba41b
Merge commit '363b72c4a5e9ccd1ddac4b1b559237c2a0a1e8de' into feature/ext
dsyme Jul 12, 2022
ff7b1e4
Merge commit 'd7f2a28b3954e7122a6c48c57d507a8083e5dd48' into feature/ext
dsyme Jul 12, 2022
7728437
merge part of main
dsyme Jul 12, 2022
8e329ae
Merge commit 'f814611157c53a197df31b2c32a9cddcf3dc69a7' into feature/ext
dsyme Jul 12, 2022
27fd7d2
Merge commit '89e476cf7f152e67428c25afc1a1fb82226eee8a' into feature/ext
dsyme Jul 12, 2022
e8b1a0f
Merge commit '084a6824175849f96a00fb1b4707d4d6ede5e615' into feature/ext
dsyme Jul 12, 2022
e67141c
merge part of main
dsyme Jul 12, 2022
2b5755d
Merge commit '271dd95d6aea24508e44888f4386c423cd701717' into feature/ext
dsyme Jul 12, 2022
05497a6
Merge commit 'c3f6d704dee5afd3dc87374045f38d7bb9cf1d3b' into feature/ext
dsyme Jul 12, 2022
be0cd39
Merge commit '7abc88be0ba87a29abb888bf5ff849be82cb379c' into feature/ext
dsyme Jul 12, 2022
6180624
Merge commit 'e3599215c61ad4d866bcf5867a18ab53d250000f' into feature/ext
dsyme Jul 12, 2022
ba25fba
Merge commit '8c6588a977ba49d6c0b448664a8f1f415b351202' into feature/ext
dsyme Jul 12, 2022
be5b0ef
Merge commit '37b9738999c1fc5256147c54f9a5b443ea36d180' into feature/ext
dsyme Jul 12, 2022
cae7e70
Merge commit 'd31eae100fa976cc146099080e45915b5df7db36' into feature/ext
dsyme Jul 12, 2022
51d72d3
merge part of main
dsyme Jul 12, 2022
c830f4e
merge part of main
dsyme Jul 12, 2022
fe51067
merge part of main
dsyme Jul 12, 2022
03ed2cd
merge part of main
dsyme Jul 12, 2022
9498a38
merge part of main
dsyme Jul 12, 2022
c6d33b3
merge part of main
dsyme Jul 12, 2022
3d34d5c
Merge commit '1134707154c534a6270b3f25f127ba16a450596f' into feature/ext
dsyme Jul 12, 2022
5f49725
merge part of main
dsyme Jul 12, 2022
26ea799
merge part of main
dsyme Jul 12, 2022
5a24c8d
Merge commit '0b5b8f0b946f0d66a52b00c9cd9c6b00c90a44e5' into feature/ext
dsyme Jul 12, 2022
a29c9ee
Merge commit '972c3cbf66c0cb81a5da3ecddba787c36deaedd2' into feature/ext
dsyme Jul 12, 2022
7f3136c
Merge commit '0006b73bbe776413184d128eae2b1631ba90f8b7' into feature/ext
dsyme Jul 12, 2022
c528beb
Merge commit '92c2c5e9a26a530ca1af24e24ff33f1e96402a2b' into feature/ext
dsyme Jul 12, 2022
0cc844a
merge part of main
dsyme Jul 12, 2022
1fb7408
merge part of main
dsyme Jul 12, 2022
5f68ca2
Merge commit '36f01e368fd0a8eb8c8782b0a6f4a723fc112c31' into feature/ext
dsyme Jul 12, 2022
4b25198
Merge commit '40f7eee6fe95a4f910e576e57393e66bfcb7c48b' into feature/ext
dsyme Jul 12, 2022
15b2fa6
Merge commit 'fcffdd2e8fbe438a545b2eba14120efdd6267328' into feature/ext
dsyme Jul 12, 2022
fa4a07e
Merge commit 'd0baa9a5762a74209d7943d680ae062c2e4ded44' into feature/ext
dsyme Jul 12, 2022
d41c2e0
Merge commit '778b04c08b8e4646ed328f2c9db70cd6e5a7cd6a' into feature/ext
dsyme Jul 12, 2022
2afd4fa
Merge commit '05b560d09c611306d91a26cbacd45a1504827e14' into feature/ext
dsyme Jul 12, 2022
6626676
merge part of main
dsyme Jul 12, 2022
9f8b28f
Merge commit '5b1a3ae5d16fe93af1f8b055ab0be5bb5e47ff20' into feature/ext
dsyme Jul 12, 2022
f64b81a
Merge commit '1632f46071b5e87df438dfa6cf802a5532a38713' into feature/ext
dsyme Jul 12, 2022
86c27f6
Merge commit 'db4bf11c5b28a7fb416e8e8a0d503742985da017' into feature/ext
dsyme Jul 12, 2022
52394f7
Merge commit 'e6b9dc6f768daad67b7d576887d8b57f8270be5d' into feature/ext
dsyme Jul 12, 2022
cbe19c3
merge part of main
dsyme Jul 12, 2022
fce4e9e
Merge commit '0fb398da74ecfc675145806f16c5a8162f2f788d' into feature/ext
dsyme Jul 12, 2022
731edf1
merge part of main
dsyme Jul 12, 2022
f5fcbc4
Merge commit 'edee6d0fb6e5865c1ace95f4f60ffc5c0be4c548' into feature/ext
dsyme Jul 12, 2022
c49f57d
merge part of main
dsyme Jul 12, 2022
65c99a7
Merge commit 'cd3e57aa0d2c4fe40810295c4c2b97789095f090' into feature/ext
dsyme Jul 12, 2022
890d1f7
Merge commit 'a65ace7698c159c34bd00f6408c7d4beb89b687d' into feature/ext
dsyme Jul 12, 2022
fe8ab0f
Merge commit 'e7b073a3dd32ca2b965a72c835f96586439bdda2' into feature/ext
dsyme Jul 12, 2022
fa918ff
Merge commit '62d878e2f0736267a85fa16814cc77641fade962' into feature/ext
dsyme Jul 12, 2022
933d4b0
Merge commit 'e074564d2dd08a02fae4cd0a44b124ac8edf40d4' into feature/ext
dsyme Jul 12, 2022
ce9e24f
Merge commit 'a9d2cc0898071f612abf68df4456471daf87e6b8' into feature/ext
dsyme Jul 12, 2022
f3a121f
Merge commit '70ad2e5f2a9923bfbab519106d02dfa97347f58e' into feature/ext
dsyme Jul 12, 2022
df51cb4
Merge commit 'fdd49655d1b2ff810aacfd491a558b78419bbc61' into feature/ext
dsyme Jul 12, 2022
707cc64
Merge commit 'd91b6c5c97accf363d135d1f99816410da4ec341' into feature/ext
dsyme Jul 12, 2022
80974b3
Merge commit '0b829fd0cb01819440f2895fbf30a69b4870002d' into feature/ext
dsyme Jul 12, 2022
53982c6
Merge commit 'f9c5b42ccbefd486fb41e83143f5d46ad589dc68' into feature/ext
dsyme Jul 12, 2022
4567458
Merge commit '5a5a5f6cd07aa4a8326baa07d4f7af1305ced6f4' into feature/ext
dsyme Jul 12, 2022
990c456
Merge commit 'a901fe2862dce0644ac8104d24e51e664b2d553f' into feature/ext
dsyme Jul 12, 2022
27cf633
Merge commit '41035ab58740a46a3d18d69b510bfacf8b667754' into feature/ext
dsyme Jul 12, 2022
79850cc
Merge commit 'a19aa4a4d31dc8c36accd492f8040885f902887c' into feature/ext
dsyme Jul 12, 2022
9860967
Merge commit 'bf6063ae851aa95e3f754066aca18cb933b5512a' into feature/ext
dsyme Jul 12, 2022
db847b1
merge part of main
dsyme Jul 12, 2022
200389b
Merge commit '3229db8c0ac891d47b875b297783eb8f2e7fe0aa' into feature/ext
dsyme Jul 12, 2022
6c3ebf8
Merge commit 'ec5b4450b2dbfe2a6ab1ac7ac4ac27e9328bcd57' into feature/ext
dsyme Jul 12, 2022
00dc205
Merge commit '32c0bc8a56528d5297a52065d508eea31ec593f2' into feature/ext
dsyme Jul 12, 2022
f9c3c72
Merge commit '7a010776e0f766e16e002ed321e7faab2c307163' into feature/ext
dsyme Jul 12, 2022
061348f
Merge commit '267d0a57f217df756d9ac33c6aa4ffbfe3b53097' into feature/ext
dsyme Jul 12, 2022
180a9f0
merge part of main
dsyme Jul 12, 2022
321f3b4
fix merge
dsyme Jul 12, 2022
7d6944f
fix merge
dsyme Jul 12, 2022
6e0521b
fix merge
dsyme Jul 12, 2022
bf4b44a
fix build
dsyme Jul 12, 2022
134aac4
fromat source
dsyme Jul 12, 2022
6710063
reduce diff
dsyme Jul 12, 2022
84a8115
update tests
dsyme Jul 12, 2022
1b4d0e7
merge main
dsyme Jul 12, 2022
a84c6a4
fix tests
dsyme Jul 12, 2022
8b93a24
fix tests
dsyme Jul 12, 2022
cd87f56
fix tests
dsyme Jul 12, 2022
24fcafa
merge main
dsyme Oct 26, 2022
ae3083a
Merge commit '0666a98921b1314d4262871efea2fc373fd1ede1' into feature/ext
dsyme Oct 26, 2022
28d680b
Merge commit '2bfb60540c6def7f76ca2fcef8a48dfdc843eeac' into feature/ext
dsyme Oct 26, 2022
c44e06a
merge main
dsyme Oct 26, 2022
43d260a
Merge commit 'ca151613407a256b062c81eb63321ead0c13c598' into feature/ext
dsyme Oct 26, 2022
5654ad1
merge main
dsyme Oct 26, 2022
8072f3e
Merge commit '11692d9d05e22cce4da3064e28caf09651550d0d' into feature/ext
dsyme Oct 26, 2022
666f179
Merge commit 'c29a3329a0d15d2e114f566740b2f53796c4a37b' into feature/ext
dsyme Oct 26, 2022
e050a3f
Merge commit 'f8b56cb6db3c90348810263fd7a5d37dc5719e92' into feature/ext
dsyme Oct 26, 2022
b5d85cf
merge main
dsyme Oct 26, 2022
3167771
merge main
dsyme Oct 26, 2022
dde4ef9
merge main
dsyme Oct 26, 2022
10c9950
merge main
dsyme Oct 26, 2022
5496e1d
merge main
dsyme Oct 26, 2022
1116a85
merge main
dsyme Oct 26, 2022
75e7898
merge main
dsyme Oct 26, 2022
b1774ba
merge main
dsyme Oct 26, 2022
96be154
merge main
dsyme Oct 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ project.lock.json
Backup/
tests/fsharp/core/array/dont.run.peverify
tests/fsharp/core/innerpoly/dont.run.peverify
tests/fsharp/typecheck/sigs/neg94-pre.dll
tests/fsharp/typecheck/sigs/*.dll
tests/fsharp/typecheck/sigs/*.exe
times
/tests/fsharpqa/testenv/bin/System.ValueTuple.dll
source_link.json
Expand Down
2 changes: 2 additions & 0 deletions src/Compiler/Checking/AccessibilityLogic.fs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ type AccessorDomain =
/// An AccessorDomain which returns all items
| AccessibleFromSomewhere

interface ITraitAccessorDomain

// Hashing and comparison is used for the memoization tables keyed by an accessor domain.
// It is dependent on a TcGlobals because of the TyconRef in the data structure
static member CustomGetHashCode(ad:AccessorDomain) =
Expand Down
2 changes: 2 additions & 0 deletions src/Compiler/Checking/AccessibilityLogic.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ type AccessorDomain =
/// An AccessorDomain which returns all items
| AccessibleFromSomewhere

interface ITraitAccessorDomain

// Hashing and comparison is used for the memoization tables keyed by an accessor domain.
// It is dependent on a TcGlobals because of the TyconRef in the data structure
static member CustomEquals: g: TcGlobals * ad1: AccessorDomain * ad2: AccessorDomain -> bool
Expand Down
14 changes: 13 additions & 1 deletion src/Compiler/Checking/CheckBasics.fs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,18 @@ type TcEnv =

member tenv.AccessRights = tenv.eAccessRights

/// Makes this environment available in a form that can be stored into a trait during solving.
member tenv.TraitContext = Some (tenv :> ITraitContext)

interface ITraitContext with

member tenv.SelectExtensionMethods(traitInfo, m, infoReader) =
let infoReader = unbox<InfoReader>(infoReader)
SelectExtensionMethInfosForTrait(traitInfo, m, tenv.eNameResEnv, infoReader)
|> List.map (fun (supportTy, minfo) -> supportTy, (minfo :> ITraitExtensionMember))

member tenv.AccessRights = (tenv.eAccessRights :> ITraitAccessorDomain)

override tenv.ToString() = "TcEnv(...)"

/// Represents the compilation environment for typechecking a single file in an assembly.
Expand Down Expand Up @@ -337,7 +349,7 @@ type TcFileState =

let niceNameGen = NiceNameGenerator()
let infoReader = InfoReader(g, amap)
let instantiationGenerator m tpsorig = FreshenTypars g m tpsorig
let instantiationGenerator m tpsorig traitCtxt = FreshenTypars g traitCtxt m tpsorig
let nameResolver = NameResolver(g, amap, infoReader, instantiationGenerator)
{ g = g
amap = amap
Expand Down
4 changes: 4 additions & 0 deletions src/Compiler/Checking/CheckBasics.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ type TcEnv =

member AccessRights: AccessorDomain

member TraitContext: ITraitContext option

interface ITraitContext

/// Represents the current environment of type variables that have implicit scope
/// (i.e. are without explicit declaration).
type UnscopedTyparEnv = UnscopedTyparEnv of NameMap<Typar>
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Checking/CheckComputationExpressions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ let (|JoinRelation|_|) cenv env (expr: SynExpr) =

let isOpName opName vref s =
(s = opName) &&
match ResolveExprLongIdent cenv.tcSink cenv.nameResolver m ad env.eNameResEnv TypeNameResolutionInfo.Default [ident(opName, m)] with
match ResolveExprLongIdent cenv.tcSink cenv.nameResolver m ad env.TraitContext env.eNameResEnv TypeNameResolutionInfo.Default [ident(opName, m)] with
| Result (_, Item.Value vref2, []) -> valRefEq cenv.g vref vref2
| _ -> false

Expand Down
58 changes: 23 additions & 35 deletions src/Compiler/Checking/CheckDeclarations.fs
Original file line number Diff line number Diff line change
Expand Up @@ -833,8 +833,7 @@ module MutRecBindingChecking =
AddLocalTyconRefs true g cenv.amap tcref.Range [tcref] initialEnvForTycon

// Make fresh version of the class type for type checking the members and lets *
let _, copyOfTyconTypars, _, objTy, thisTy = FreshenObjectArgType cenv tcref.Range TyparRigidity.WillBeRigid tcref isExtrinsic declaredTyconTypars

let _, copyOfTyconTypars, _, objTy, thisTy = FreshenObjectArgType cenv envForTycon.TraitContext tcref.Range TyparRigidity.WillBeRigid tcref isExtrinsic declaredTyconTypars

// The basic iteration over the declarations in a single type definition
let initialInnerState = (None, envForTycon, tpenv, recBindIdx, uncheckedBindsRev)
Expand Down Expand Up @@ -2207,7 +2206,7 @@ module TcExceptionDeclarations =
match reprIdOpt with
| Some longId ->
let resolution =
ResolveExprLongIdent cenv.tcSink cenv.nameResolver m ad env.NameEnv TypeNameResolutionInfo.Default longId
ResolveExprLongIdent cenv.tcSink cenv.nameResolver m ad env.TraitContext env.NameEnv TypeNameResolutionInfo.Default longId
|> ForceRaise
match resolution with
| _, Item.ExnCase exnc, [] ->
Expand Down Expand Up @@ -2723,7 +2722,7 @@ module EstablishTypeDefinitionCores =
| None -> None
| Some (tc, args, m) ->
let ad = envinner.AccessRights
match ResolveTypeLongIdent cenv.tcSink cenv.nameResolver ItemOccurence.UseInType OpenQualified envinner.NameEnv ad tc TypeNameResolutionStaticArgsInfo.DefiniteEmpty PermitDirectReferenceToGeneratedType.Yes with
match ResolveTypeLongIdent cenv.tcSink cenv.nameResolver ItemOccurence.UseInType OpenQualified envinner.NameEnv ad envinner.TraitContext tc TypeNameResolutionStaticArgsInfo.DefiniteEmpty PermitDirectReferenceToGeneratedType.Yes with
| Result (_, tcrefBeforeStaticArguments) when
tcrefBeforeStaticArguments.IsProvided &&
not tcrefBeforeStaticArguments.IsErased ->
Expand Down Expand Up @@ -3185,7 +3184,7 @@ module EstablishTypeDefinitionCores =
let info = RecdFieldInfo(thisTyInst, thisTyconRef.MakeNestedRecdFieldRef fspec)
let nenv' = AddFakeNameToNameEnv fspec.LogicalName nenv (Item.RecdField info)
// Name resolution gives better info for tooltips
let item = Item.RecdField(FreshenRecdFieldRef cenv.nameResolver m (thisTyconRef.MakeNestedRecdFieldRef fspec))
let item = Item.RecdField(FreshenRecdFieldRef cenv.nameResolver envinner.TraitContext m (thisTyconRef.MakeNestedRecdFieldRef fspec))
CallNameResolutionSink cenv.tcSink (fspec.Range, nenv, item, emptyTyparInst, ItemOccurence.Binding, ad)
// Environment is needed for completions
CallEnvSink cenv.tcSink (fspec.Range, nenv', ad)
Expand Down Expand Up @@ -3847,15 +3846,15 @@ module TcDeclarations =

// This records a name resolution of the type at the location
let resInfo = TypeNameResolutionStaticArgsInfo.FromTyArgs synTypars.Length
ResolveTypeLongIdent cenv.tcSink cenv.nameResolver ItemOccurence.Binding OpenQualified envForDecls.NameEnv ad longPath resInfo PermitDirectReferenceToGeneratedType.No
ResolveTypeLongIdent cenv.tcSink cenv.nameResolver ItemOccurence.Binding OpenQualified envForDecls.NameEnv ad envForDecls.TraitContext longPath resInfo PermitDirectReferenceToGeneratedType.No
|> ignore

mkLocalTyconRef tycon

| _ ->
let resInfo = TypeNameResolutionStaticArgsInfo.FromTyArgs synTypars.Length
let _, tcref =
match ResolveTypeLongIdent cenv.tcSink cenv.nameResolver ItemOccurence.Binding OpenQualified envForDecls.NameEnv ad longPath resInfo PermitDirectReferenceToGeneratedType.No with
match ResolveTypeLongIdent cenv.tcSink cenv.nameResolver ItemOccurence.Binding OpenQualified envForDecls.NameEnv ad envForDecls.TraitContext longPath resInfo PermitDirectReferenceToGeneratedType.No with
| Result res -> res
| res when inSig && List.isSingleton longPath ->
errorR(Deprecated(FSComp.SR.tcReservedSyntaxForAugmentation(), m))
Expand Down Expand Up @@ -5047,7 +5046,7 @@ let AddCcuToTcEnv (g, amap, scopem, env, assemblyName, ccu, autoOpens, internals

(env, autoOpens) ||> List.collectFold (ApplyAssemblyLevelAutoOpenAttributeToTcEnv g amap ccu scopem)

let emptyTcEnv g =
let emptyTcEnv g : TcEnv =
let cpath = compPathInternal // allow internal access initially
{ eNameResEnv = NameResolutionEnv.Empty g
eUngeneralizableItems = []
Expand Down Expand Up @@ -5104,23 +5103,10 @@ let ApplyDefaults (cenv: cenv) g denvAtEnd m moduleContents extraAttribs =
try
let unsolved = FindUnsolved.UnsolvedTyparsOfModuleDef g cenv.amap denvAtEnd moduleContents extraAttribs

CanonicalizePartialInferenceProblem cenv.css denvAtEnd m unsolved

// The priority order comes from the order of declaration of the defaults in FSharp.Core.
for priority = 10 downto 0 do
unsolved |> List.iter (fun tp ->
if not tp.IsSolved then
// Apply the first default. If we're defaulting one type variable to another then
// the defaults will be propagated to the new type variable.
ApplyTyparDefaultAtPriority denvAtEnd cenv.css priority tp)
CanonicalizePartialInferenceProblem cenv.css denvAtEnd m unsolved false

// OK, now apply defaults for any unsolved TyparStaticReq.HeadType
unsolved |> List.iter (fun tp ->
if not tp.IsSolved then
if (tp.StaticReq <> TyparStaticReq.None) then
ChooseTyparSolutionAndSolve cenv.css denvAtEnd tp)
with exn ->
errorRecovery exn m
ApplyDefaultsForUnsolved cenv.css denvAtEnd unsolved
with e -> errorRecovery e m

let CheckValueRestriction denvAtEnd infoReader rootSigOpt implFileTypePriorToSig m =
if Option.isNone rootSigOpt then
Expand All @@ -5145,9 +5131,7 @@ let CheckValueRestriction denvAtEnd infoReader rootSigOpt implFileTypePriorToSig
let SolveInternalUnknowns g (cenv: cenv) denvAtEnd moduleContents extraAttribs =
let unsolved = FindUnsolved.UnsolvedTyparsOfModuleDef g cenv.amap denvAtEnd moduleContents extraAttribs

for tp in unsolved do
if (tp.Rigidity <> TyparRigidity.Rigid) && not tp.IsSolved then
ChooseTyparSolutionAndSolve cenv.css denvAtEnd tp
ChooseSolutionsForUnsolved cenv.css denvAtEnd unsolved

let CheckModuleSignature g (cenv: cenv) m denvAtEnd rootSigOpt implFileTypePriorToSig implFileSpecPriorToSig moduleContents =
match rootSigOpt with
Expand Down Expand Up @@ -5200,25 +5184,27 @@ let CheckOneImplFile
conditionalDefines,
tcSink,
isInternalTestSpanStackReferring,
env,
env: TcEnv,
rootSigOpt: ModuleOrNamespaceType option,
synImplFile) =

let (ParsedImplFileInput (_, isScript, qualNameOfFile, scopedPragmas, _, implFileFrags, isLastCompiland, _)) = synImplFile
let infoReader = InfoReader(g, amap)

cancellable {
let envinner, moduleTyAcc = MakeInitialEnv env

let tcVal = LightweightTcValForUsingInBuildMethodCall g envinner.TraitContext

let cenv =
cenv.Create (g, isScript, amap, thisCcu, false, Option.isSome rootSigOpt,
conditionalDefines, tcSink, (LightweightTcValForUsingInBuildMethodCall g), isInternalTestSpanStackReferring,
conditionalDefines, tcSink, tcVal, isInternalTestSpanStackReferring,
tcPat=TcPat,
tcSimplePats=TcSimplePats,
tcSequenceExpressionEntry=TcSequenceExpressionEntry,
tcArrayOrListSequenceExpression=TcArrayOrListComputedExpression,
tcComputationExpression=TcComputationExpression)

let envinner, moduleTyAcc = MakeInitialEnv env

let defs = [ for x in implFileFrags -> SynModuleDecl.NamespaceFragment x ]
let! moduleContents, topAttrs, envAtEnd = TcModuleOrNamespaceElements cenv ParentNone qualNameOfFile.Range envinner PreXmlDoc.Empty None openDecls0 defs

Expand Down Expand Up @@ -5294,7 +5280,7 @@ let CheckOneImplFile

try
let reportErrors = not (checkForErrors())
let tcVal = LightweightTcValForUsingInBuildMethodCall g
let tcVal = LightweightTcValForUsingInBuildMethodCall g envAtEnd.TraitContext
PostTypeCheckSemanticChecks.CheckImplFile
(g, cenv.amap, reportErrors, cenv.infoReader,
env.eInternalsVisibleCompPaths, cenv.thisCcu, tcVal, envAtEnd.DisplayEnv,
Expand Down Expand Up @@ -5335,18 +5321,20 @@ let CheckOneImplFile
/// Check an entire signature file
let CheckOneSigFile (g, amap, thisCcu, checkForErrors, conditionalDefines, tcSink, isInternalTestSpanStackReferring) tcEnv (sigFile: ParsedSigFileInput) =
cancellable {
let envinner, moduleTyAcc = MakeInitialEnv tcEnv

let tcVal = LightweightTcValForUsingInBuildMethodCall g envinner.TraitContext

let cenv =
cenv.Create
(g, false, amap, thisCcu, true, false, conditionalDefines, tcSink,
(LightweightTcValForUsingInBuildMethodCall g), isInternalTestSpanStackReferring,
tcVal, isInternalTestSpanStackReferring,
tcPat=TcPat,
tcSimplePats=TcSimplePats,
tcSequenceExpressionEntry=TcSequenceExpressionEntry,
tcArrayOrListSequenceExpression=TcArrayOrListComputedExpression,
tcComputationExpression=TcComputationExpression)

let envinner, moduleTyAcc = MakeInitialEnv tcEnv

let specs = [ for x in sigFile.Contents -> SynModuleSigDecl.NamespaceFragment x ]
let! tcEnv = TcSignatureElements cenv ParentNone sigFile.QualifiedName.Range envinner PreXmlDoc.Empty None specs

Expand Down
Loading