ExtCore
ExtCore copied to clipboard
Result type in ExtCore collides with the Result type in FSharp.Core 4.2
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.