Skip to content

Myriad throws errors when trying to process a file with new F# syntax #178

@OrfeasZ

Description

@OrfeasZ

I have a file that has a type that looks similar to this:

type MyType = {
  items: MyItem list
} with
  member self.itemIds = self.items |> List.map _.id

This uses the new _. shorthand syntax introduced in F# 8.

When trying to process this file, Myriad fails with the following error (and a bunch more after it):

OTHER: System.Exception: Error in Myriad.Plugins.LensesGenerator: LensesGenerator Failure
!CompilationError
Fantomas.Core.ParseException: ParseException
  [{ Severity = Error
     SubCategory = "parse"
     Range = Some (937,107--937,108)
     ErrorNumber = Some 10
     Message = "Unexpected symbol '_' in expression" };

Is this just a matter of updating the version of the F# compiler services & Fantomas used by Myriad? If so I'm happy to give it a go and submit a PR.

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