google-code-export / unquote

Automatically exported from code.google.com/p/unquote
Apache License 2.0
1 stars 1 forks source link

Partialy applied symbolic function not decompiled correctly #86

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We note that the difference between this issue and 85 is that (+) is being 
considered a binary op while (~~~) a unary op.

> let (~~~) x y z = x - y - z;;

val ( ~~~ ) : int -> int -> int -> int

> <@ (~~~) 1 1 @>;;
val it : Quotations.Expr<(int -> int)> =
  Let (x, Value (1),
     Let (y, Value (1), Lambda (z, Call (None, op_LogicalNot, [x, y, z]))))
    {CustomAttributes = [NewTuple (Value ("DebugRange"),
          NewTuple (Value ("stdin"), Value (88), Value (4), Value (88),
                    Value (12)))];
     Raw = ...;
     Type = Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32];}
> decompile <@ (~~~) 1 1 @>;;
val it : string = "(~~~~)"
> decompile <@ (~~~) 1 @>;;
val it : string = "(~~~~)"
> decompile <@ (~~~) @>;;
val it : string = "(~~~~)"
> decompile <@ (~~~) 1 1 1 @>;;
val it : string = "op_LogicalNot 1 1 1"

Original issue reported on code.google.com by stephen....@gmail.com on 23 Apr 2012 at 2:32

GoogleCodeExporter commented 9 years ago

Original comment by stephen....@gmail.com on 29 Apr 2012 at 7:43

GoogleCodeExporter commented 9 years ago

Original comment by stephen....@gmail.com on 20 May 2012 at 4:23