Skip to content

F# values display badly in default formatting, esp plaintext #642

Open
@dsyme

Description

@dsyme

Therer are lots of cases where default formatting for F# values is way off. I'll document a few here and try and make progress on this.

  1. Evaluate a method info, e..d

    match <@ display("") @> with Quotations.Patterns.Call(_,mi,_) -> mi
    

    Expect: something reasonable
    Actual: a big mess

  2. Evaluate "<@ 1 @>" in a notebook.

    Expect: Some reasonable of the quotation.
    Actual, a big mess, see image at bottom

    Best would really be just the ToString() I think:

    Value (1)
    

    For reference FSI shows this, which is not great but not awful.

        val it : Quotations.Expr<int> =
      Value (1)
     {CustomAttributes = [NewTuple (Value ("DebugRange"),
           NewTuple (Value ("stdin"), Value (1), Value (3), Value (1), Value (4)))];
      Raw = ...;
      Type = System.Int32;}
    

Quotation image:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions