Skip to content

Conversation

@7sharp9
Copy link
Member

@7sharp9 7sharp9 commented Feb 13, 2015

This works much the same way as GetMethods in that only the types are involved in the function are used. See the comment in service.fs line 170:

// ValReprInfo = None i.e. in let bindings defined in types or in local functions
// in this case use old approach and return only information about types

In this instance we use stripFunTy to produce the function argument types, and then in the for loop we use if isTupleTy and tryDestTupleTy if the argument is a tuple.

This produces the same CurriedParameterGroups as if the function was in a module binding i.e.

let test one two three =
   one + two + three

This would be:

IList[IList[parameter1]
      IList[parameter2]
      IList[parameter3]]
let test (one, two, three) =
   one + two + three

This would be:

IList[IList[parameter1;parameter2;parameter3]]

@7sharp9
Copy link
Member Author

7sharp9 commented Feb 13, 2015

@dsyme I added tests for this one now :-)

@7sharp9
Copy link
Member Author

7sharp9 commented Feb 16, 2015

Does this look good to merge now?

Copy link
Contributor

Choose a reason for hiding this comment

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

This case would return empty

Copy link
Member Author

Choose a reason for hiding this comment

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

I kept the fail with as thats how unmatched results were represented before. Empty would be better than a fail though.

7sharp9 added 2 commits February 17, 2015 15:11
Removed isOut/param/optional
Changed to list comprehension to a simple map
Remove match statement using type argument as is.
Empty collections are much better than exceptions.
@7sharp9
Copy link
Member Author

7sharp9 commented Feb 17, 2015

@dsyme I think Ive addressed all the points.

@7sharp9
Copy link
Member Author

7sharp9 commented Feb 24, 2015

Anything else to do here?

@haf
Copy link

haf commented Feb 26, 2015

+1 to this PR, see https://bugzilla.xamarin.com/show_bug.cgi?id=27452

fsgit added a commit that referenced this pull request Feb 26, 2015
Added curried parameter groups for nested functions
@fsgit fsgit merged commit c0bbebd into fsharp:master Feb 26, 2015
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.

4 participants