Skip to content

Commit fb832ec

Browse files
Copilot Daily Doc UpdaterCopilot
authored andcommitted
docs: document F# 8 dot-lambda syntax fix in CHANGELOG (PR #199)
Add Fixed entry for the F# 8 _.property shorthand syntax support, including the Fantomas.Core/FCS upgrade from 7.0.0 to 7.0.5. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7f92dfb commit fb832ec

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

CHANGELOG.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
### Added
99
- `SynType.CreateFromLongIdent` helper in `Myriad.Core.AstExtensions`. Plugin authors can now convert a `LongIdent` to a `SynType` using this single convenience method instead of manually chaining `SynLongIdent.Create` and `SynType.CreateLongIdent`.
1010

11+
### Fixed
12+
- Myriad now correctly processes input files that contain F# 8 dot-lambda (`_.property`) shorthand syntax. Previously, types using `_.` in `with member` bodies would cause a parse error:
13+
14+
```
15+
Fantomas.Core.ParseException: Unexpected symbol '_' in expression
16+
```
17+
18+
This was resolved by upgrading `Fantomas.Core` and `Fantomas.FCS` from `7.0.0` to `7.0.5`, which includes full support for `SynExpr.DotLambda`. For example, the following now works correctly:
19+
1120
```fsharp
12-
static member CreateFromLongIdent (parent: LongIdent) =
13-
SynLongIdent.Create (parent |> List.map (fun i -> i.idText))
14-
|> SynType.CreateLongIdent
21+
type MyType = {
22+
items: MyItem list
23+
} with
24+
member self.itemIds = self.items |> List.map _.id
1525
```
1626

1727
## [0.8.4]

0 commit comments

Comments
 (0)