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

Reduction Feature Request: do not reduce expressions which return Lambda Values #24

Closed
GoogleCodeExporter opened this issue Jun 21, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

Related to issue 23, Let(_,x,Lambda(_)) when x |> isReduced should be 
considered reduced, since we don't want to see generated lambda names sprinted

So instead of

> unquote <@ 23 + 3 + 4 + 1, let x = 2 + 3 in (fun j -> j + x) @>;;
> 
(23 + 3 + 4 + 1, (let x = 2 + 3 in fun j -> j + x))
(26 + 4 + 1, (let x = 5 in fun j -> j + x))
(30 + 1, <fun:ToFSharpFunc@3051-1>)
(31, <fun:ToFSharpFunc@3051-1>)

should be

> unquote <@ 23 + 3 + 4 + 1, let x = 2 + 3 in (fun j -> j + x) @>;;
> 
(23 + 3 + 4 + 1, (let x = 2 + 3 in fun j -> j + x))
(26 + 4 + 1, (let x = 5 in fun j -> j + x))
(30 + 1, (let x = 5 in fun j -> j + x))
(31, (let x = 5 in fun j -> j + x))

Original issue reported on code.google.com by stephen....@gmail.com on 22 Mar 2011 at 2:13

@GoogleCodeExporter
Copy link
Author

Original comment by stephen....@gmail.com on 22 Mar 2011 at 2:31

  • Changed state: Fixed
  • Added labels: Milestone-Release1.2.4, Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

I had a change of heart, I am on the brink of completing work to "re-sugar" 
various partially applied lambda call expressions and this issue no longer 
seems relevant: there are too many expression cases which may reduce as Lambda 
values and there are too few cases where you'd even encounter this situation in 
test expressions. 

Original comment by stephen....@gmail.com on 26 Mar 2011 at 1:51

  • Changed state: WontFix

@GoogleCodeExporter
Copy link
Author

Original comment by stephen....@gmail.com on 26 Mar 2011 at 1:51

  • Removed labels: Milestone-Release1.2.4

@GoogleCodeExporter
Copy link
Author

FALSE!  this turns out to indeed be a critical part of issue 23.  But i'm not 
quite ready to mark as "Fixed" quite yet... needs to be more definite in 
results.

Original comment by stephen....@gmail.com on 26 Mar 2011 at 2:33

@GoogleCodeExporter
Copy link
Author

Original comment by stephen....@gmail.com on 26 Mar 2011 at 11:54

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Marking as fixed: we do reduce in most appropriate scenarios, but sometimes 
it's not appropriate, e.g.

> <@ [1;2;3] |> List.map (+) @> |> unquote;;

[1; 2; 3] |> List.map (+)
[<fun:ToFSharpFunc@3051-1>; <fun:ToFSharpFunc@3051-1>; 
<fun:ToFSharpFunc@3051-1>] 

Original comment by stephen....@gmail.com on 2 Apr 2011 at 8:27

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Original comment by stephen....@gmail.com on 2 Apr 2011 at 7:59

  • Added labels: Milestone-Release1.3.0

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

No branches or pull requests

1 participant