Giter Site home page Giter Site logo

Comments (3)

 avatar commented on September 20, 2024

Fix is probably here, adding the second line below:

        entity.AllFieldsAsList
        |> List.filter (fun x -> not x.IsCompilerGenerated)
        |> List.map (fun x -> FSharpRecordField(g,  RecdFieldData.Recd (mkRecdFieldRef entity x.Name)))

Reviewing the use of FSharpRecordField and the data on the corresponding RecdField in the F# compiler, there are some other issues too.

  • It looks like it is really be renamed to "FSharpField", i.e. including class fields (it already includes union fields)
  • There are other attributes we should reveal, e.g. IsStatic, IsVolatile, IsZeroInit (called UsesDefaultValue when we expose it?).
  • There is a question of how F# enum declarations will look through the API. Although enum declarations look superficially like union declarations in the syntax of the language, inside the compiler they are represented as an object model type with a set of static fields, each with a literal value. This is because thi is how they are compiled in .NET. We should probably just reveal these like this in the API, it's the simplest thing to do. This means FSharpField would need a LiteralValue property.

from fsharp-compiler-docs.

ovatsus avatar ovatsus commented on September 20, 2024

Is anyone going to work on this?

from fsharp-compiler-docs.

 avatar commented on September 20, 2024

See 0.0.14. There is a property IsCompilerGenerated on FSharpField, FSharp.Formatting should now filter for that.

from fsharp-compiler-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.