diff --git a/src/fsharp/autobox.fs b/src/fsharp/autobox.fs index 7d4398fea80..b32e07f0798 100644 --- a/src/fsharp/autobox.fs +++ b/src/fsharp/autobox.fs @@ -17,7 +17,7 @@ open Microsoft.FSharp.Compiler.TypeRelations // Decide the set of mutable locals to promote to heap-allocated reference cells type cenv = - { g: TcGlobals; + { g: TcGlobals amap: Import.ImportMap } /// Find all the mutable locals that escape a method, function or lambda expression diff --git a/src/fsharp/lib.fs b/src/fsharp/lib.fs index 1a1e64acd23..766f6f023f6 100755 --- a/src/fsharp/lib.fs +++ b/src/fsharp/lib.fs @@ -178,14 +178,11 @@ module ListAssoc = //------------------------------------------------------------------------ module ListSet = - (* NOTE: O(n)! *) - let rec contains f x l = - match l with - | [] -> false - | x'::t -> f x x' || contains f x t + let inline contains f x l = List.exists (f x) l (* NOTE: O(n)! *) let insert f x l = if contains f x l then l else x::l + let unionFavourRight f l1 l2 = match l1, l2 with | _, [] -> l1