Skip to content

Instantly share code, notes, and snippets.

@1tgr
Created June 2, 2011 15:13
Show Gist options
  • Select an option

  • Save 1tgr/1004615 to your computer and use it in GitHub Desktop.

Select an option

Save 1tgr/1004615 to your computer and use it in GitHub Desktop.
An F# compiler crash
C:\tim\temp>type temp.fs
namespace Tim
type SomeClass() =
member private t.Impl _ _ = ()
type SomeRecord = {
Inner : SomeClass
} with
member t.Generate arg =
let fn _ = ()
t.Inner.Impl fn arg
C:\tim\temp>"C:\Program Files\Microsoft F#\v4.0\fsc.exe"
Microsoft (R) F# 2.0 Compiler build 4.0.30319.1
Copyright (c) Microsoft Corporation. All Rights Reserved.
temp.fs(11,9): error FS0073: internal error: The lists had different lengths.
Parameter name: xs2 (ArgumentException)
temp.fs(10,9): error FS0073: internal error: The lists had different lengths.
Parameter name: xs2 (ArgumentException)
temp.fs(10,9): error FS0073: internal error: The lists had different lengths.
Parameter name: xs2 (ArgumentException)
temp.fs(6,1): error FS0073: internal error: The lists had different lengths.
Parameter name: xs2 (ArgumentException)
temp.fs(6,1): error FS0073: internal error: The lists had different lengths.
Parameter name: xs2 (ArgumentException)
temp.fs(3,1): error FS0073: internal error: The lists had different lengths.
Parameter name: xs2 (ArgumentException)
error FS0193: internal error: The lists had different lengths.
Parameter name: xs2
error FS0073: internal error: The lists had different lengths.
Parameter name: xs2 (ArgumentException)
error FS0193: internal error: The lists had different lengths.
Parameter name: xs2
Unhandled Exception: System.ArgumentException: The lists had different lengths.
Parameter name: xs2
at Microsoft.FSharp.Primitives.Basics.List.map2ToFreshConsTail[a,b,c](FSharpList`1 cons, FSharpFunc`3 f, FSharpList`1 xs1, FSharpList`1 xs2)
at Microsoft.FSharp.Primitives.Basics.List.map2[T1,T2,TResult](FSharpFunc`2 mapping, FSharpList`1 xs1, FSharpList`1 xs2)
at Microsoft.FSharp.Collections.ListModule.Map2[T1,T2,TResult](FSharpFunc`2 mapping, FSharpList`1 list1, FSharpList`1 list2)
at Microsoft.FSharp.Compiler.Typrelns.MakeCalledMeth[a](InfoReader infoReader, Boolean checkingAttributeCall, FSharpFunc`2 freshenMethInfo, range m, AccessorDomain ad, MethInfo minfo, FSharpList`1 minst, FSharpList`1 uminst, FSharpOption`1 pinfoOpt, FSharpList`1 objArgs, FSharpList`1 callerArgs, Boolean allowParamArgs, Boolean allowOutAndOptArgs)
at Microsoft.FSharp.Compiler.TypeChecker.mk_CalledMeth@7217(Boolean checkingAttributeCall, cenv cenv, FSharpOption`1 tyargsOpt, range m, AccessorDomain ad, FSharpList`1 objArgTys, FSharpList`1 unnamedCurriedCallerArgs, FSharpList`1 namedCurriedCallerArgs, MethInfo minfo, FSharpOption`1 pinfoOpt, Boolean usesParamArrayConversion)
at Microsoft.FSharp.Compiler.TypeChecker.preArgumentTypeCheckingCalledMethGroup@7224-1.Invoke(Tuple`2 tupledArg)
at Microsoft.FSharp.Collections.IEnumerator.map@109.DoMoveNext(b& )
at Microsoft.FSharp.Collections.IEnumerator.MapEnumerator`1.System-Collections-IEnumerator-MoveNext()
at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeOuter@651[T,TResult](ConcatEnumerator`2 x, Unit unitVar0)
at <StartupCode$FSharp-Core>.$Seq.MoveNextImpl@751.GenerateNext(IEnumerable`1& next)
at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.MoveNextImpl()
at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.System-Collections-IEnumerator-MoveNext()
at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
at Microsoft.FSharp.Compiler.TypeChecker.TcMethodApplication(Boolean checkingAttributeCall, cenv cenv, tcEnv env, SyntacticUnscopedTyparEnv tpenv, FSharpOption`1 tyargsOpt, FSharpList`1 objArgs, range m, String methodName, AccessorDomain ad, mutates mut, Boolean isProp, FSharpList`1 calledMethsAndProps, ValUseFlag isSuperInit, FSharpList`1 curriedCallerArgs, typ exprTy, FSharpList`1 delayed)
at Microsoft.FSharp.Compiler.TypeChecker.TcMethodApplicationThen(cenv cenv, tcEnv env, typ overallTy, SyntacticUnscopedTyparEnv tpenv, FSharpOption`1 userTypeArgs, FSharpList`1 objArgs, range m, String methodName, AccessorDomain ad, mutates mut, Boolean isProp, FSharpList`1 meths, ValUseFlag isSuperInit, FSharpList`1 args, ExprAtomicFlag atomicFlag, FSharpList`1 delayed)
at Microsoft.FSharp.Compiler.TypeChecker.TcExpr(cenv cenv, typ ty, tcEnv env, SyntacticUnscopedTyparEnv tpenv, SynExpr expr)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ReraiseIfWatsonable(Exception exn)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ErrorLogger.ErrorRecovery(ErrorLogger x, Exception exn, range m)
at Microsoft.FSharp.Compiler.TypeChecker.TcExpr(cenv cenv, typ ty, tcEnv env, SyntacticUnscopedTyparEnv tpenv, SynExpr expr)
at Microsoft.FSharp.Compiler.TypeChecker.TcExprThatCanBeCtorBody(cenv cenv, typ ty, tcEnv env, SyntacticUnscopedTyparEnv tpenv, SynExpr expr)
at Microsoft.FSharp.Compiler.TypeChecker.TcExprUndelayed@4922-11.Invoke(typ ty, tcEnv env, SyntacticUnscopedTyparEnv tpenv, SynExpr expr)
at Microsoft.FSharp.Compiler.TypeChecker.TcLinearLetExprs(FSharpFunc`2 bodyChecker, cenv cenv, tcEnv env, typ overallTy, FSharpFunc`2 builder, SyntacticUnscopedTyparEnv tpenv, Boolean processUseBindings, Boolean isRec, Boolean isUse, FSharpList`1 binds, SynExpr body, range m)
at Microsoft.FSharp.Compiler.TypeChecker.TcExprUndelayed(cenv cenv, typ ty, tcEnv env, SyntacticUnscopedTyparEnv tpenv, SynExpr expr)
at Microsoft.FSharp.Compiler.TypeChecker.TcExpr(cenv cenv, typ ty, tcEnv env, SyntacticUnscopedTyparEnv tpenv, SynExpr expr)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ReraiseIfWatsonable(Exception exn)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ErrorLogger.ErrorRecovery(ErrorLogger x, Exception exn, range m)
at Microsoft.FSharp.Compiler.TypeChecker.TcExpr(cenv cenv, typ ty, tcEnv env, SyntacticUnscopedTyparEnv tpenv, SynExpr expr)
at Microsoft.FSharp.Compiler.TypeChecker.TcIteratedLambdas(cenv cenv, Boolean isFirst, tcEnv env, typ ty, FSharpSet`1 takenNames, SyntacticUnscopedTyparEnv tpenv, SynExpr e)
at Microsoft.FSharp.Compiler.TypeChecker.TcIteratedLambdas(cenv cenv, Boolean isFirst, tcEnv env, typ ty, FSharpSet`1 takenNames, SyntacticUnscopedTyparEnv tpenv, SynExpr e)
at Microsoft.FSharp.Compiler.TypeChecker.TcIteratedLambdas(cenv cenv, Boolean isFirst, tcEnv env, typ ty, FSharpSet`1 takenNames, SyntacticUnscopedTyparEnv tpenv, SynExpr e)
at Microsoft.FSharp.Compiler.TypeChecker.TcExprUndelayed(cenv cenv, typ ty, tcEnv env, SyntacticUnscopedTyparEnv tpenv, SynExpr expr)
at Microsoft.FSharp.Compiler.TypeChecker.TcExpr(cenv cenv, typ ty, tcEnv env, SyntacticUnscopedTyparEnv tpenv, SynExpr expr)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ReraiseIfWatsonable(Exception exn)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ErrorLogger.ErrorRecovery(ErrorLogger x, Exception exn, range m)
at Microsoft.FSharp.Compiler.TypeChecker.TcExpr(cenv cenv, typ ty, tcEnv env, SyntacticUnscopedTyparEnv tpenv, SynExpr expr)
at Microsoft.FSharp.Compiler.TypeChecker.TcExprThatCantBeCtorBody(cenv cenv, typ ty, tcEnv env, SyntacticUnscopedTyparEnv tpenv, SynExpr expr)
at Microsoft.FSharp.Compiler.TypeChecker.tc@7829-1.Invoke(cenv cenv, typ ty, tcEnv env, SyntacticUnscopedTyparEnv tpenv, SynExpr expr)
at Microsoft.FSharp.Compiler.TypeChecker.TcNormalizedBinding(DeclKind declKind, cenv cenv, tcEnv env, SyntacticUnscopedTyparEnv tpenv, typ overallTy, FSharpOption`1 safeThisValOpt, SafeInitData safeInitInfo, FSharpList`1 enclosingDeclaredTypars, ExplicitTyparInfo _arg428, NormalizedBinding bind)
at Microsoft.FSharp.Compiler.TypeChecker.TcLetrecBinding(cenv cenv, tcEnv envRec, range scopem, FSharpList`1 extraGeneralizableTypars, FSharpOption`1 reqdThisValTyOpt, tcEnv envNonRec, FSharpList`1 generalizedRecBinds, FSharpList`1 preGeneralizationRecBinds, SyntacticUnscopedTyparEnv tpenv, FSharpMap`2 uncheckedRecBindsTable, PreCheckingRecursiveBinding rbind)
at Microsoft.FSharp.Compiler.TypeChecker.TyconBindingChecking.TcTyconBindings@10425-9.Invoke(TyconBindingsPassA defnA)
at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.List.mapfold[a,b,c](FSharpFunc`2 f, a s, FSharpList`1 l)
at Microsoft.FSharp.Compiler.TypeChecker.TyconBindingChecking.TcTyconBindings@10414-7.Invoke(Tuple`3 tupledArg)
at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.List.mapfold[a,b,c](FSharpFunc`2 f, a s, FSharpList`1 l)
at Microsoft.FSharp.Compiler.TypeChecker.TyconBindingChecking.TcTyconBindings(cenv cenv, tcEnv env, SyntacticUnscopedTyparEnv tpenv, range bindsm, range scopem, FSharpList`1 bindsl)
at Microsoft.FSharp.Compiler.TypeChecker.TcTyconMemberDefns(cenv cenv, tcEnv env, ParentRef parent, range bindsm, range scopem, FSharpList`1 tyconDefnMembers)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ReraiseIfWatsonable(Exception exn)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ErrorLogger.ErrorRecovery(ErrorLogger x, Exception exn, range m)
at Microsoft.FSharp.Compiler.TypeChecker.TcTyconMemberDefns(cenv cenv, tcEnv env, ParentRef parent, range bindsm, range scopem, FSharpList`1 tyconDefnMembers)
at Microsoft.FSharp.Compiler.TypeChecker.TcTypeDeclarations.TcTyconDefns(cenv cenv, tcEnv env, ParentRef parent, SyntacticUnscopedTyparEnv tpenv, FSharpList`1 typeDefs, range m, range scopem)
at Microsoft.FSharp.Compiler.TypeChecker.TcModuleOrNamespaceElement@12907-1.Invoke(Unit unitVar)
at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.EventuallyModule.catch@670.Invoke(Unit unitVar0)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ReraiseIfWatsonable(Exception exn)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ErrorLogger.ErrorRecovery(ErrorLogger x, Exception exn, range m)
at Microsoft.FSharp.Compiler.TypeChecker.TcModuleOrNamespaceElement@12906-20.Invoke(Exception _arg459)
at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.EventuallyModule.bind@661.Invoke(Unit unitVar0)
at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.EventuallyModule.bind@661.Invoke(Unit unitVar0)
at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.EventuallyModule.bind@661.Invoke(Unit unitVar0)
at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.EventuallyModule.catch@670.Invoke(Unit unitVar0)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ReraiseIfWatsonable(Exception exn)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ErrorLogger.ErrorRecovery(ErrorLogger x, Exception exn, range m)
at Microsoft.FSharp.Compiler.TypeChecker.TcModuleOrNamespaceElement@12906-20.Invoke(Exception _arg459)
at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.EventuallyModule.bind@661.Invoke(Unit unitVar0)
at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.EventuallyModule.bind@661.Invoke(Unit unitVar0)
at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.EventuallyModule.bind@661.Invoke(Unit unitVar0)
at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.EventuallyModule.bind@661.Invoke(Unit unitVar0)
at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.EventuallyModule.bind@661.Invoke(Unit unitVar0)
at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.EventuallyModule.catch@670.Invoke(Unit unitVar0)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ReraiseIfWatsonable(Exception exn)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ErrorLogger.ErrorRecovery(ErrorLogger x, Exception exn, range m)
at Microsoft.FSharp.Compiler.Build.TypecheckOneInputEventually@4173-16.Invoke(Exception _arg521)
at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.EventuallyModule.forceWhile[a](FSharpFunc`2 check, Eventually`1 e)
at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.EventuallyModule.force[a](Eventually`1 e)
at Microsoft.FSharp.Compiler.Build.TypecheckOneInput(FSharpFunc`2 checkForNoErrors, TcConfig tcConfig, TcImports tcImports, TcGlobals tcGlobals, FSharpOption`1 prefixPathOpt, TcState tcState, Input inp)
at Microsoft.FSharp.Compiler.Build.TypecheckMultipleInputs@4300.Invoke(TcState tcState, Input inp)
at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.List.mapfold[a,b,c](FSharpFunc`2 f, a s, FSharpList`1 l)
at Microsoft.FSharp.Compiler.Build.TypecheckMultipleInputs(FSharpFunc`2 checkForNoErrors, TcConfig tcConfig, TcImports tcImports, TcGlobals tcGlobals, FSharpOption`1 prefixPathOpt, TcState tcState, FSharpList`1 inputs)
at Microsoft.FSharp.Compiler.Build.TypecheckClosedInputSet(FSharpFunc`2 checkForNoErrors, TcConfig tcConfig, TcImports tcImports, TcGlobals tcGlobals, FSharpOption`1 prefixPathOpt, TcState tcState, FSharpList`1 inputs)
at Microsoft.FSharp.Compiler.Driver.TypeCheck(TcConfig tcConfig, TcImports tcImports, TcGlobals tcGlobals, ErrorLogger errorLogger, String assemblyName, NiceNameGenerator niceNameGen, tcEnv tcEnv0, FSharpList`1 inputs)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ReraiseIfWatsonable(Exception exn)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ErrorLogger.ErrorRecovery(ErrorLogger x, Exception exn, range m)
at Microsoft.FSharp.Compiler.ErrorLogger.errorRecovery(Exception exn, range m)
at Microsoft.FSharp.Compiler.Driver.TypeCheck(TcConfig tcConfig, TcImports tcImports, TcGlobals tcGlobals, ErrorLogger errorLogger, String assemblyName, NiceNameGenerator niceNameGen, tcEnv tcEnv0, FSharpList`1 inputs)
at Microsoft.FSharp.Compiler.Driver.main1$cont@1403(LexResourceManager lexResourceManager, FSharpList`1 sourceFiles, String assemblyName, TcConfig tcConfig, ErrorLogger errorLogger, NiceNameGenerator niceNameGen, Unit unitVar)
at Microsoft.FSharp.Compiler.Driver.main1(String[] argv)
at Microsoft.FSharp.Compiler.Driver.main(String[] argv)
at Microsoft.FSharp.Compiler.CommandLineMain.main(String[] argv)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ReraiseIfWatsonable(Exception exn)
at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ErrorLogger.ErrorRecovery(ErrorLogger x, Exception exn, range m)
at Microsoft.FSharp.Compiler.ErrorLogger.errorRecovery(Exception exn, range m)
at Microsoft.FSharp.Compiler.CommandLineMain.main(String[] argv)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment