diff --git a/src/FSharpLint.Core/Framework/Ast.fs b/src/FSharpLint.Core/Framework/Ast.fs index 43e4e6d2b..28a02b40d 100644 --- a/src/FSharpLint.Core/Framework/Ast.fs +++ b/src/FSharpLint.Core/Framework/Ast.fs @@ -65,11 +65,12 @@ module Ast = /// Inlines pipe operators to give a flat function application expression /// e.g. `x |> List.map id` to `List.map id x`. + [] let (|FuncApp|_|) functionApplication = match functionApplication with | AstNode.Expression(SynExpr.App(_, _, _, _, range) as functionApplication) -> - Some(flattenFuncExpr List.Empty functionApplication, range) - | _ -> None + ValueSome(flattenFuncExpr List.Empty functionApplication, range) + | _ -> ValueNone [] type Lambda = { Arguments:SynSimplePats list; Body:SynExpr }