ExtCore icon indicating copy to clipboard operation
ExtCore copied to clipboard

Result type in ExtCore collides with the Result type in FSharp.Core 4.2

Open 7sharp9 opened this issue 7 years ago • 0 comments

So if you open System then you get both the one from FSharp.Core and ExtCore so you have to prefix pattern matching on the Error case to avoid collision:

                 let result =
                   try Ok (analyse exp basicEnv)
                   with ex -> Result.Error (ex.Message)
                 if printResult then
                      printfn "%s" name
                      printfn "Expression: %s" (HMBasic.exp.toString exp)
                      match result with
                      | Ok result ->
                          printfn "inferred: %s\n" (HMBasic.ty.toString result)
                      | Result.Error error -> printfn "inferred: %s\n" error )

I mean its easy enough to prefix, but its unnecessary noise, maybe depreciate the result type or not open is by default.

7sharp9 avatar Mar 04 '18 14:03 7sharp9