It's probably a corner case, but it's breaking the repl:
module App
let test xss =
let f xss = xss |> List.choose (function Some a -> Some a | _ -> None)
xss |> f |> List.collect (fun xs -> [ for s in xs do yield s ])
[<EntryPoint>]
let main argv =
let res = test [ Some [ "a" ] ]
printfn "res: %A" res
0
runtime error:
Seq.js:470
}, xs[Symbol.iterator]()));
^
TypeError: xs[Symbol.iterator] is not a function
basically, the issue is xs does not have the correct value, the correct value is in the xs.value property.
Damn, the change with Options is affecting more places than expected, as happened with the uncurrying optimization. Let's see if we don't have many more surprises... I hope I'm not introducing too many exceptional behaviours in Fable 馃檹
Thanks for reporting and for the code to reproduce the issue as always @ncave!
@alfonsogarciacaro It's making the world a better place (a more exceptional one). Thanks!
@alfonsogarciacaro Hooray, that actually worked, the repl is operational again. Thanks!
Most helpful comment
@alfonsogarciacaro Hooray, that actually worked, the repl is operational again. Thanks!