jet / falanx

Generates F# code from protobuf schema for binary and json format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove extra lambda call on Fleece generation

7sharp9 opened this issue · comments

Currently on generating the following is created:

    fun url title -> 
        { url = url
          title = title } 
    |> fun f -> withFields (f)
    |> fun codec -> 
        let decode = fst codec
        let encode = snd codec
        jfieldOpt ("url") (fun x -> x.url) (decode, encode)
    |> fun codec -> 
        let decode = fst codec
        let encode = snd codec
        jfieldOpt ("url") (fun x -> x.title) (decode, encode)

Notice the extra lambda:

    |> fun f -> withFields (f)