When executing the code above on Azure F# Notebook, the following error is raised:
Expression evaluation failed: Object reference not set to an instance of an object NullReferenceExceptionObject reference not set to an instance of an object at Microsoft.FSharp.Core.Operators.FailurePattern (System.Exception error) [0x00001] in <5939249c904cf4daa74503839c243959>:0 at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ReraiseIfWatsonable (System.Exception exn) [0x0002d] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ErrorLogger.ErrorRecovery (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger x, System.Exception exn, Microsoft.FSharp.Compiler.Range+range m) [0x000d2] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ErrorLogger.StopProcessingRecovery (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger x, System.Exception exn, Microsoft.FSharp.Compiler.Range+range m) [0x000b5] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.InteractiveCatch[b] (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger errorLogger, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] f, b istate) [0x00033] in <590496d0ddab8ea7a7450383d0960459>:0
at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.ExecInteraction (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library+CompilationThreadToken ctok, Microsoft.FSharp.Compiler.CompileOps+TcConfig tcConfig, Microsoft.FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState istate, Microsoft.FSharp.Compiler.Ast+ParsedFsiInteraction action, Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger errorLogger) [0x00010] in <590496d0ddab8ea7a7450383d0960459>:0
at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.execParsedInteractions (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library+CompilationThreadToken ctok, Microsoft.FSharp.Compiler.CompileOps+TcConfig tcConfig, Microsoft.FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState istate, Microsoft.FSharp.Core.FSharpOption1[T] action, Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger errorLogger, Microsoft.FSharp.Core.FSharpOption1[T] lastResult) [0x002a4] in <590496d0ddab8ea7a7450383d0960459>:0
at Microsoft.FSharp.Compiler.Interactive.Shell+clo@2089-298.Invoke (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library+CompilationThreadToken ctok, Microsoft.FSharp.Compiler.CompileOps+TcConfig tcConfig, Microsoft.FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState istate) [0x00003] in <590496d0ddab8ea7a7450383d0960459>:0
at Microsoft.FSharp.Core.FSharpFunc2[T,TResult].InvokeFast[V,W] (Microsoft.FSharp.Core.FSharpFunc2[T,TResult] func, T arg1, TResult arg2, V arg3) [0x0000d] in <5939249c904cf4daa74503839c243959>:0
at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.mainThreadProcessAction[a,b] (a ctok, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] action, b istate) [0x0004a] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ReraiseIfWatsonable (System.Exception exn) [0x00040] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ErrorLogger.ErrorRecovery (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger x, System.Exception exn, Microsoft.FSharp.Compiler.Range+range m) [0x000d2] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ErrorLogger.StopProcessingRecovery (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger x, System.Exception exn, Microsoft.FSharp.Compiler.Range+range m) [0x000b5] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.mainThreadProcessAction[a,b] (a ctok, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] action, b istate) [0x00104] in <590496d0ddab8ea7a7450383d0960459>:0
at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.mainThreadProcessParsedInteractions (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library+CompilationThreadToken ctok, Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger errorLogger, Microsoft.FSharp.Core.FSharpOption1[T] action, Microsoft.FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState istate) [0x0000b] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+EvalInteraction@2232.Invoke (Microsoft.FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState istate) [0x00013] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.InteractiveCatch[b] (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger errorLogger, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] f, b istate) [0x00018] in <590496d0ddab8ea7a7450383d0960459>:0
at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ReraiseIfWatsonable (System.Exception exn) [0x00040] in <590496d0ddab8ea7a7450383d0960459>:0
at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ErrorLogger.ErrorRecovery (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger x, System.Exception exn, Microsoft.FSharp.Compiler.Range+range m) [0x000d2] in <590496d0ddab8ea7a7450383d0960459>:0
at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ErrorLogger.StopProcessingRecovery (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger x, System.Exception exn, Microsoft.FSharp.Compiler.Range+range m) [0x000b5] in <590496d0ddab8ea7a7450383d0960459>:0
at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.InteractiveCatch[b] (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger errorLogger, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] f, b istate) [0x00033] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.EvalInteraction (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library+CompilationThreadToken ctok, System.String sourceText, System.String scriptFileName, Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger errorLogger) [0x00058] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+FsiEvaluationSession.EvalInteractionNonThrowing (System.String code) [0x0001c] in <590496d0ddab8ea7a7450383d0960459>:0 at IfSharp.Kernel.IfSharpKernel.executeRequest (IfSharp.Kernel.KernelMessage msg, IfSharp.Kernel.ExecuteRequest content) [0x00096] in <5a67f98b1b085d3da74503838bf9675a>:0
Known workarounds
Works in Visual Studio with latest F# version.
shell.log
Not sure if this is IfSharp related or the problem is on Azure side.
Repro steps
Trying to execute this on F# notebook: https://notebooks.azure.com/algunion/libraries/list-splitter
Expected behavior
xs should look like this:
[([|0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15|], [||]); ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15|], [|0|]); ([|0; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15|], [|1|]); ([|2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15|], [|0; 1|]); ([|0; 1; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15|], [|2|]); ([|1; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15|], [|0; 2|]); ([|0; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15|], [|1; 2|]); ([|3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15|], [|0; 1; 2|]); ([|0; 1; 2; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15|], [|3|]); ([|1; 2; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15|], [|0; 3|]); ([|0; 2; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15|], [|1; 3|]); ([|2; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15|], [|0; 1; 3|]);...
Actual behavior
When executing the code above on Azure F# Notebook, the following error is raised:
Expression evaluation failed: Object reference not set to an instance of an object NullReferenceExceptionObject reference not set to an instance of an object at Microsoft.FSharp.Core.Operators.FailurePattern (System.Exception error) [0x00001] in <5939249c904cf4daa74503839c243959>:0 at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ReraiseIfWatsonable (System.Exception exn) [0x0002d] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ErrorLogger.ErrorRecovery (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger x, System.Exception exn, Microsoft.FSharp.Compiler.Range+range m) [0x000d2] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ErrorLogger.StopProcessingRecovery (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger x, System.Exception exn, Microsoft.FSharp.Compiler.Range+range m) [0x000b5] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.InteractiveCatch[b] (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger errorLogger, Microsoft.FSharp.Core.FSharpFunc
2[T,TResult] f, b istate) [0x00033] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.ExecInteraction (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library+CompilationThreadToken ctok, Microsoft.FSharp.Compiler.CompileOps+TcConfig tcConfig, Microsoft.FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState istate, Microsoft.FSharp.Compiler.Ast+ParsedFsiInteraction action, Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger errorLogger) [0x00010] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.execParsedInteractions (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library+CompilationThreadToken ctok, Microsoft.FSharp.Compiler.CompileOps+TcConfig tcConfig, Microsoft.FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState istate, Microsoft.FSharp.Core.FSharpOption1[T] action, Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger errorLogger, Microsoft.FSharp.Core.FSharpOption
1[T] lastResult) [0x002a4] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+clo@2089-298.Invoke (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library+CompilationThreadToken ctok, Microsoft.FSharp.Compiler.CompileOps+TcConfig tcConfig, Microsoft.FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState istate) [0x00003] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Core.FSharpFunc2[T,TResult].InvokeFast[V,W] (Microsoft.FSharp.Core.FSharpFunc
2[T,TResult] func, T arg1, TResult arg2, V arg3) [0x0000d] in <5939249c904cf4daa74503839c243959>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.mainThreadProcessAction[a,b] (a ctok, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] action, b istate) [0x0004a] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ReraiseIfWatsonable (System.Exception exn) [0x00040] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ErrorLogger.ErrorRecovery (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger x, System.Exception exn, Microsoft.FSharp.Compiler.Range+range m) [0x000d2] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ErrorLogger.StopProcessingRecovery (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger x, System.Exception exn, Microsoft.FSharp.Compiler.Range+range m) [0x000b5] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.mainThreadProcessAction[a,b] (a ctok, Microsoft.FSharp.Core.FSharpFunc
2[T,TResult] action, b istate) [0x00104] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.mainThreadProcessParsedInteractions (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library+CompilationThreadToken ctok, Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger errorLogger, Microsoft.FSharp.Core.FSharpOption1[T] action, Microsoft.FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState istate) [0x0000b] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+EvalInteraction@2232.Invoke (Microsoft.FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState istate) [0x00013] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.InteractiveCatch[b] (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger errorLogger, Microsoft.FSharp.Core.FSharpFunc
2[T,TResult] f, b istate) [0x00018] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ReraiseIfWatsonable (System.Exception exn) [0x00040] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ErrorLogger.ErrorRecovery (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger x, System.Exception exn, Microsoft.FSharp.Compiler.Range+range m) [0x000d2] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ErrorLogger.StopProcessingRecovery (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger x, System.Exception exn, Microsoft.FSharp.Compiler.Range+range m) [0x000b5] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.InteractiveCatch[b] (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger errorLogger, Microsoft.FSharp.Core.FSharpFunc2[T,TResult] f, b istate) [0x00033] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor.EvalInteraction (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library+CompilationThreadToken ctok, System.String sourceText, System.String scriptFileName, Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger errorLogger) [0x00058] in <590496d0ddab8ea7a7450383d0960459>:0 at Microsoft.FSharp.Compiler.Interactive.Shell+FsiEvaluationSession.EvalInteractionNonThrowing (System.String code) [0x0001c] in <590496d0ddab8ea7a7450383d0960459>:0 at IfSharp.Kernel.IfSharpKernel.executeRequest (IfSharp.Kernel.KernelMessage msg, IfSharp.Kernel.ExecuteRequest content) [0x00096] in <5a67f98b1b085d3da74503838bf9675a>:0
Known workarounds
Works in Visual Studio with latest F# version. shell.log