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 98 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
12 changes: 6 additions & 6 deletions fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,12 @@
<Compile Include="$(FSharpSourcesRoot)/fsharp/PatternMatchCompilation.fs">
<Link>Logic/PatternMatchCompilation.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/FindUnsolved.fsi">
<Link>Logic/FindUnsolved.fsi</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/FindUnsolved.fs">
<Link>Logic/FindUnsolved.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/ConstraintSolver.fsi">
<Link>Logic/ConstraintSolver.fsi</Link>
</Compile>
Expand All @@ -472,12 +478,6 @@
<Compile Include="$(FSharpSourcesRoot)/fsharp/CheckFormatStrings.fs">
<Link>Logic/CheckFormatStrings.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/FindUnsolved.fsi">
<Link>Logic/FindUnsolved.fsi</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/FindUnsolved.fs">
<Link>Logic/FindUnsolved.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/QuotationTranslator.fsi">
<Link>Logic/QuotationTranslator.fsi</Link>
</Compile>
Expand Down
3 changes: 3 additions & 0 deletions src/fsharp/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 All @@ -46,6 +48,7 @@ type AccessorDomain =
| AccessibleFromEverywhere -> 2
| AccessibleFromSomeFSharpCode -> 3
| AccessibleFromSomewhere -> 4

static member CustomEquals(g:TcGlobals, ad1:AccessorDomain, ad2:AccessorDomain) =
match ad1, ad2 with
| AccessibleFrom(cs1, tc1), AccessibleFrom(cs2, tc2) -> (cs1 = cs2) && (match tc1, tc2 with None, None -> true | Some tc1, Some tc2 -> tyconRefEq g tc1 tc2 | _ -> false)
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/CheckFormatStrings.fs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ open FSharp.Compiler.TcGlobals
type FormatItem = Simple of TType | FuncAndVal

let copyAndFixupFormatTypar m tp =
let _,_,tinst = FreshenAndFixupTypars m TyparRigidity.Flexible [] [] [tp]
let _,_,tinst = FreshenAndFixupTypars traitCtxtNone m TyparRigidity.Flexible [] [] [tp]
List.head tinst

let lowestDefaultPriority = 0 (* See comment on TyparConstraint.DefaultsTo *)
Expand Down
3 changes: 1 addition & 2 deletions src/fsharp/CompileOps.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5408,14 +5408,13 @@ module ScriptPreprocessClosure =
yield! loop subSource
else
yield ClosureFile(subFile, m, None, [], [], [])

yield ClosureFile(filename, m, Some parsedScriptAst, parseDiagnostics, errorLogger.Diagnostics, noWarns)

| None ->
printfn "yielding source %s (failed parse)" filename
yield ClosureFile(filename, m, None, parseDiagnostics, [], [])
else
// Don't traverse into .fs leafs.
printfn "yielding non-script source %s" filename
yield ClosureFile(filename, m, None, [], [], []) ]

closureSources |> List.collect loop, tcConfig
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/CompileOptions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ let internalFlags (tcConfigB:TcConfigBuilder) =
[
CompilerOption
("stamps", tagNone,
OptionUnit ignore,
OptionSet DebugPrint.layoutStamps,
Some(InternalCommandLineOption("--stamps", rangeCmdArgs)), None)

CompilerOption
Expand Down
480 changes: 312 additions & 168 deletions src/fsharp/ConstraintSolver.fs

Large diffs are not rendered by default.

25 changes: 18 additions & 7 deletions src/fsharp/ConstraintSolver.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ open FSharp.Compiler.Import
open FSharp.Compiler.Infos
open FSharp.Compiler.InfoReader
open FSharp.Compiler.MethodCalls
open FSharp.Compiler.NameResolution
open FSharp.Compiler.Range
open FSharp.Compiler.SyntaxTree
open FSharp.Compiler.TcGlobals
Expand All @@ -36,16 +37,19 @@ val NewInferenceTypes: 'a list -> TType list

/// Given a set of formal type parameters and their constraints, make new inference type variables for
/// each and ensure that the constraints on the new type variables are adjusted to refer to these.
val FreshenAndFixupTypars: range -> TyparRigidity -> Typars -> TType list -> Typars -> Typars * TyparInst * TType list
val FreshenAndFixupTypars : ITraitContext option -> range -> TyparRigidity -> Typars -> TType list -> Typars -> Typars * TyparInst * TType list

val FreshenTypeInst: range -> Typars -> Typars * TyparInst * TType list
/// Make new type inference variables for the use of a generic construct at a particular location
val FreshenTypeInst : ITraitContext option -> range -> Typars -> Typars * TyparInst * TType list

val FreshenTypars: range -> Typars -> TType list
/// Make new type inference variables for the use of a generic construct at a particular location
val FreshenTypars : ITraitContext option -> range -> Typars -> TType list

val FreshenMethInfo: range -> MethInfo -> TType list
/// Make new type inference variables for the use of a method at a particular location
val FreshenMethInfo : ITraitContext option -> range -> MethInfo -> TType list

[<RequireQualifiedAccess>]
/// Information about the context of a type equation.
/// Information about the context of a type equation, for better error reporting
type ContextInfo =

/// No context was given.
Expand Down Expand Up @@ -205,6 +209,13 @@ val CodegenWitnessesForTraitWitness : TcValF -> TcGlobals -> ImportMap -> range
/// to its constraints and applies that solution by using a constraint.
val ChooseTyparSolutionAndSolve : ConstraintSolverState -> DisplayEnv -> Typar -> unit

val IsApplicableMethApprox: TcGlobals -> ImportMap -> range -> MethInfo -> TType -> bool
/// Apply defaults arising from 'default' constraints in FSharp.Core
/// for any unsolved free inference type variables.
val ApplyDefaultsForUnsolved: ConstraintSolverState -> DisplayEnv -> Typar list -> unit

val CanonicalizePartialInferenceProblem: ConstraintSolverState -> DisplayEnv -> range -> Typars -> unit
/// Choose solutions for any remaining unsolved free inference type variables.
val ChooseSolutionsForUnsolved: ConstraintSolverState -> DisplayEnv -> Typar list -> unit

val IsApplicableMethApprox: TcGlobals -> ImportMap -> range -> ITraitContext option -> MethInfo -> TType -> bool

val CanonicalizePartialInferenceProblem: ConstraintSolverState -> DisplayEnv -> range -> Typars -> bool -> unit
5 changes: 3 additions & 2 deletions src/fsharp/FSComp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,9 @@ csExpectedArguments,"Expected arguments to an instance member"
csIndexArgumentMismatch,"This indexer expects %d arguments but is here given %d"
csExpectTypeWithOperatorButGivenFunction,"Expecting a type supporting the operator '%s' but given a function type. You may be missing an argument to a function."
csExpectTypeWithOperatorButGivenTuple,"Expecting a type supporting the operator '%s' but given a tuple type"
csTypesDoNotSupportOperator,"None of the types '%s' support the operator '%s'"
csTypesDoNotSupportOperator,"The types '%s' do not support the operator '%s'"
csTypeDoesNotSupportOperator,"The type '%s' does not support the operator '%s'"
csTypesDoNotSupportOperatorNullable,"None of the types '%s' support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'."
csTypesDoNotSupportOperatorNullable,"The types '%s' do not support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'."
csTypeDoesNotSupportOperatorNullable,"The type '%s' does not support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'."
csTypeDoesNotSupportConversion,"The type '%s' does not support a conversion to the type '%s'"
csMethodFoundButIsStatic,"The type '%s' has a method '%s' (full name '%s'), but the method is static"
Expand Down Expand Up @@ -1512,4 +1512,5 @@ featureFixedIndexSlice3d4d,"fixed-index slice 3d/4d"
featureAndBang,"applicative computation expressions"
featureNullableOptionalInterop,"nullable optional interop"
featureDefaultInterfaceMemberConsumption,"default interface member consumption"
featureExtensionConstraintSolutions,"extension constraint solutions"
featureWitnessPassing,"witness passing"
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,12 @@
<Compile Include="..\PatternMatchCompilation.fs">
<Link>Logic\PatternMatchCompilation.fs</Link>
</Compile>
<Compile Include="..\FindUnsolved.fsi">
<Link>Logic\FindUnsolved.fsi</Link>
</Compile>
<Compile Include="..\FindUnsolved.fs">
<Link>Logic\FindUnsolved.fs</Link>
</Compile>
<Compile Include="..\ConstraintSolver.fsi">
<Link>Logic\ConstraintSolver.fsi</Link>
</Compile>
Expand All @@ -474,12 +480,6 @@
<Compile Include="..\CheckFormatStrings.fs">
<Link>Logic\CheckFormatStrings.fs</Link>
</Compile>
<Compile Include="..\FindUnsolved.fsi">
<Link>Logic\FindUnsolved.fsi</Link>
</Compile>
<Compile Include="..\FindUnsolved.fs">
<Link>Logic\FindUnsolved.fs</Link>
</Compile>
<Compile Include="..\QuotationTranslator.fsi">
<Link>Logic\QuotationTranslator.fsi</Link>
</Compile>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/FSharp.Core/prim-types.fs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ namespace Microsoft.FSharp.Core
member x.Value = value
new () = new AllowNullLiteralAttribute(true)

[<AttributeUsage(AttributeTargets.Method, AllowMultiple=false)>]
[<Sealed>]
type AllowOverloadByReturnTypeAttribute() =
inherit System.Attribute()

[<AttributeUsage(AttributeTargets.Field, AllowMultiple=false)>]
[<Sealed>]
type VolatileFieldAttribute() =
Expand Down
10 changes: 10 additions & 0 deletions src/fsharp/FSharp.Core/prim-types.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,16 @@ namespace Microsoft.FSharp.Core
/// <summary>The value of the attribute, indicating whether the type allows the null literal or not</summary>
member Value: bool

/// <summary>Adding this attribute to a method allows that method to be overloaded by return type.</summary>
[<AttributeUsage (AttributeTargets.Method,AllowMultiple=false)>]
[<Sealed>]
type AllowOverloadByReturnTypeAttribute =
inherit Attribute

/// <summary>Creates an instance of the attribute</summary>
/// <returns>AllowOverloadByReturnTypeAttribute</returns>
new : unit -> AllowOverloadByReturnTypeAttribute

/// <summary>Adding this attribute to a value causes it to be compiled as a CLI constant literal.</summary>
[<AttributeUsage (AttributeTargets.Field,AllowMultiple=false)>]
[<Sealed>]
Expand Down
11 changes: 10 additions & 1 deletion src/fsharp/FindUnsolved.fs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ and accOp cenv env (op, tyargs, args, _m) =
accTypeInst cenv env tys
| _ -> ()

and accTraitInfo cenv env (TTrait(tys, _nm, _, argtys, rty, _sln)) =
and accTraitInfo cenv env (TTrait(tys, _nm, _, argtys, rty, _sln, _traitCtxt)) =
argtys |> accTypeInst cenv env
rty |> Option.iter (accTy cenv env)
tys |> List.iter (accTy cenv env)
Expand Down Expand Up @@ -282,4 +282,13 @@ let UnsolvedTyparsOfModuleDef g amap denv (mdef, extraAttribs) =
accAttribs cenv Nix extraAttribs
List.rev cenv.unsolved

let UnsolvedTyparsOfExpr g amap denv expr =
let cenv =
{ g =g
amap=amap
denv=denv
unsolved = [] }
accExpr cenv Nix expr
List.rev cenv.unsolved


3 changes: 3 additions & 0 deletions src/fsharp/FindUnsolved.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ open FSharp.Compiler.Import

/// Find all unsolved inference variables after type inference for an entire file
val UnsolvedTyparsOfModuleDef: g: TcGlobals -> amap: ImportMap -> denv: DisplayEnv -> mdef : ModuleOrNamespaceExpr * extraAttribs: Attrib list -> Typar list

/// Find all unsolved inference variables after adhoc generation of witness
val UnsolvedTyparsOfExpr: g: TcGlobals -> amap: ImportMap -> denv: DisplayEnv -> expr: Expr -> Typar list
6 changes: 3 additions & 3 deletions src/fsharp/IlxGen.fs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ let ComputeTypeAccess (tref: ILTypeRef) hidden =
type TypeReprEnv(reprs: Map<Stamp, uint16>, count: int) =

/// Lookup a type parameter
member __.Item (tp: Typar, m: range) =
member __.LookupTyparRepr (tp: Typar, m: range) =
try reprs.[tp.Stamp]
with :? KeyNotFoundException ->
errorR(InternalError("Undefined or unsolved type variable: " + showL(typarL tp), m))
Expand Down Expand Up @@ -542,7 +542,7 @@ and GenTypeAux amap m (tyenv: TypeReprEnv) voidOK ptrsOK ty =
if tps.IsEmpty then GenTypeAux amap m tyenv VoidNotOK ptrsOK tau
else EraseClosures.mkILTyFuncTy g.ilxPubCloEnv

| TType_var tp -> mkILTyvarTy tyenv.[tp, m]
| TType_var tp -> mkILTyvarTy (tyenv.LookupTyparRepr(tp, m))

| TType_measure _ -> g.ilg.typ_Int32

Expand Down Expand Up @@ -4565,7 +4565,7 @@ and GenGenericParams cenv eenv tps =
tps |> DropErasedTypars |> List.map (GenGenericParam cenv eenv)

and GenGenericArgs m (tyenv: TypeReprEnv) tps =
tps |> DropErasedTypars |> List.map (fun c -> (mkILTyvarTy tyenv.[c, m]))
tps |> DropErasedTypars |> List.map (fun c -> mkILTyvarTy (tyenv.LookupTyparRepr(c, m)))

/// Generate the closure class for a function
and GenLambdaClosure cenv (cgbuf: CodeGenBuffer) eenv isLocalTypeFunc thisVars expr =
Expand Down
3 changes: 3 additions & 0 deletions src/fsharp/LanguageFeatures.fs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type LanguageFeature =
| NullableOptionalInterop
| DefaultInterfaceMemberConsumption
| WitnessPassing
| ExtensionConstraintSolutions

/// LanguageVersion management
type LanguageVersion (specifiedVersionAsString) =
Expand Down Expand Up @@ -65,6 +66,7 @@ type LanguageVersion (specifiedVersionAsString) =
LanguageFeature.NameOf, previewVersion
LanguageFeature.OpenStaticClasses, previewVersion
LanguageFeature.PackageManagement, previewVersion
LanguageFeature.ExtensionConstraintSolutions, previewVersion
LanguageFeature.AndBang, previewVersion
LanguageFeature.NullableOptionalInterop, previewVersion
LanguageFeature.DefaultInterfaceMemberConsumption, previewVersion
Expand Down Expand Up @@ -138,6 +140,7 @@ type LanguageVersion (specifiedVersionAsString) =
| LanguageFeature.NullableOptionalInterop -> FSComp.SR.featureNullableOptionalInterop()
| LanguageFeature.DefaultInterfaceMemberConsumption -> FSComp.SR.featureDefaultInterfaceMemberConsumption()
| LanguageFeature.WitnessPassing -> FSComp.SR.featureWitnessPassing()
| LanguageFeature.ExtensionConstraintSolutions -> FSComp.SR.featureExtensionConstraintSolutions()

/// Get a version string associated with the given feature.
member _.GetFeatureVersionString feature =
Expand Down
1 change: 1 addition & 0 deletions src/fsharp/LanguageFeatures.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type LanguageFeature =
| NullableOptionalInterop
| DefaultInterfaceMemberConsumption
| WitnessPassing
| ExtensionConstraintSolutions

/// LanguageVersion management
type LanguageVersion =
Expand Down
Loading