Martin

Results 95 comments of Martin

Interesting: ``` > let es: seq = [];; val es: int seq = [] > let es2: seq = Seq.empty;; val es2: int seq > es;; val it: int seq...

I don't think it is in aspnetcore. ``` > let es: seq = [];; val es: int seq = [] > let es2: seq = Seq.empty;; val es2: int seq...

F# type checking infers `es` in the above example to be of type `int list` and `es2` to be of type `ÈmptyEnumerable`. I don't think there is anything wrong with...

Somebody produces an object that has `seq` / `IEnumerable` as runtime type. If this sequence is empty, than the correct `ToString()` representation is `EmptyEnumerable`. Why should it render as `[]`...

> I really think this has to do with something (S.T.J. most likely, being used by aspnetcore) using a runtime detection. And when it sees an F# DU at runtime...

Thanks for spotting / remembering this!

[`parseFile`](https://fsprojects.github.io/fantomas/reference/fantomas-fcs-parse.html) in the [Fantomas.FCS](https://www.nuget.org/packages/Fantomas.FCS) package might do exactly what you want. (It is not the newest FCS version though, but the one selected for Fantomas.)

I am right now doing some experiments in that direction - will take time though.

> My instinct is to go in the direction of "enable a wholesale reimplementation" In principle, I agree. That's what a spec is for. It should specify the language completely...

> One of the reasons for `exit` is that it is a term used in dotnet and compiled F# applications already. And in shells. BTW `exit 0;;` already works.