safesparrow / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
1 stars 0 forks source link

Some AST pointers #6

Closed nojaf closed 1 year ago

nojaf commented 1 year ago

Hey, some additional pointers for the AST traversal.

Sometimes there is duplicate information inside the syntax tree:

On some levels, you could easily collect the information in parallel (using PLinq or something else):

visitMulti could become something along the lines of

open System.Linq

let visitMulti (f: 't -> 'i seq) (items: 't seq) : 'i seq = 
    items.AsParallel().SelectMany(f)

I hope that helps.

Cheers!

nojaf commented 1 year ago

This is no longer actionable.