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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print int[] as int array. #13700

Merged
merged 15 commits into from Sep 15, 2022
Merged

Print int[] as int array. #13700

merged 15 commits into from Sep 15, 2022

Conversation

nojaf
Copy link
Contributor

@nojaf nojaf commented Aug 16, 2022

Initial attempt to address fsharp/fslang-suggestions#635.
The result of a pair-programming session with @edgarfgp 馃帀.

@edgarfgp
Copy link
Contributor

@nojaf As we suspected we have a bunch of test failing now . Good first step. let tackle them in the next pair session :)

@nojaf nojaf force-pushed the int-array-signature branch 2 times, most recently from e63be54 to e5b2bd8 Compare August 19, 2022 15:09
@edgarfgp
Copy link
Contributor

We are getting closer :D . We have some baseline tests that I created a PR to you fork to fix them :)

Some VS integration test are also failing . Im not sure how to fix them . But we can finish that in our next Pair session :)

@nojaf nojaf force-pushed the int-array-signature branch 4 times, most recently from 30056b8 to 6e56873 Compare August 25, 2022 13:28
@edgarfgp
Copy link
Contributor

@nojaf I think we need an extra rebasing on to main. to grab the fix for the test that are failing in the CI . Thanks in advance :)

@nojaf nojaf force-pushed the int-array-signature branch 2 times, most recently from 42d5b17 to f4f6aee Compare August 31, 2022 07:23
@nojaf nojaf marked this pull request as ready for review September 1, 2022 14:41
@edgarfgp
Copy link
Contributor

edgarfgp commented Sep 6, 2022

@vzarytovskii This is ready for a review :) .

@dsyme
Copy link
Contributor

dsyme commented Sep 8, 2022

@vzarytovskii I'm happy with this.

@edgarfgp
Copy link
Contributor

edgarfgp commented Sep 15, 2022

@vzarytovskii I was wondering if this could make it to the next VS preview version ? . This will also benefit VSCode and Rider :)


let (|TTypeMultiDimensionalArrayAsGeneric|_|) (t: TType) =
let rec (|Impl|_|) t =
match t with
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is wrong

  1. once again we're matching directly on TType, we should almost never be doing this
  2. it looks like it is detecting jagged arrays, which is wrong

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will have a look next week

@@ -893,6 +903,10 @@ module PrintTypes =
// Always prefer 'float' to 'float<1>'
| TType_app (tc, args, _) when tc.IsMeasureableReprTycon && List.forall (isDimensionless g) args ->
layoutTypeWithInfoAndPrec denv env prec (reduceTyconRefMeasureableOrProvided g tc args)

// Special case for nested array<array<'t>> shape
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong, and this rule should be removed. Also there are no tests for jagged arrays - they should be added.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update next week. Thanks for the review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants