anchor.diff:              ExtensionMethods.Compile(queryExpr).Invoke()
   
           [<System.Runtime.CompilerServices.Extension>]
  -        static member Select<'T, 'R>(queryExpr : ParallelQueryExpr<IEnumerable<'T>>, selector : Expression<Func<'T, 'R>>) =
  -            new ParallelQueryExpr<IEnumerable<'R>>(Transform (selector, queryExpr.QueryExpr, typeof<'R>))
  -
  -        [<System.Runtime.CompilerServices.Extension>]
  -        static member Where<'T>(queryExpr : ParallelQueryExpr<IEnumerable<'T>>, predicate : Expression<Func<'T, bool>>) =
  -            new ParallelQueryExpr<IEnumerable<'T>>(Filter (predicate, queryExpr.QueryExpr, typeof<'T>))
  -
  -        [<System.Runtime.CompilerServices.Extension>]
  -        static member Sum(queryExpr : ParallelQueryExpr<IEnumerable<double>>) =
  +        static member Select<'T, 'R>(queryExpr : ParallelQueryExpr<IEnumerable<'T>>, selector : Expression<Func<'T, 'R>>)
  +                        : ParallelQueryExpr<IEnumerable<'R>> =
  +            new ParallelQueryExpr<_>(Transform (selector, queryExpr.QueryExpr, typeof<'R>))
  +
  +        [<System.Runtime.CompilerServices.Extension>]
  +        static member Where<'T>(queryExpr : ParallelQueryExpr<IEnumerable<'T>>, predicate : Expression<Func<'T, bool>>) 
  +                        : ParallelQueryExpr<IEnumerable<'T>> =
  +            new ParallelQueryExpr<_>(Filter (predicate, queryExpr.QueryExpr, typeof<'T>))
  +
  +        [<System.Runtime.CompilerServices.Extension>]
  +        static member Sum(queryExpr : ParallelQueryExpr<IEnumerable<double>>) : ParallelQueryExpr<double> =
               new ParallelQueryExpr<double>(Sum (queryExpr.QueryExpr, typeof<double>))
   
           [<System.Runtime.CompilerServices.Extension>]
  -        static member Sum(queryExpr : ParallelQueryExpr<IEnumerable<int>>) =
  +        static member Sum(queryExpr : ParallelQueryExpr<IEnumerable<int>>) : ParallelQueryExpr<int> =
               new ParallelQueryExpr<int>(Sum (queryExpr.QueryExpr, typeof<int>))
   
           [<System.Runtime.CompilerServices.Extension>]
  -        static member SelectMany<'T, 'R>(queryExpr : ParallelQueryExpr<IEnumerable<'T>>, selector : Expression<Func<'T, IEnumerable<'R>>>) =
  +        static member SelectMany<'T, 'R>(queryExpr : ParallelQueryExpr<IEnumerable<'T>>, selector : Expression<Func<'T, IEnumerable<'R>>>) 
  +                        : ParallelQueryExpr<IEnumerable<'R>> =
               let queryExpr' = 
                   match selector with
                   | Lambda ([paramExpr], bodyExpr) ->
                       NestedQuery ((paramExpr, Compiler.toQueryExpr bodyExpr), queryExpr.QueryExpr, typeof<'R>)
                   | _ -> failwithf "Invalid state %A" selector
   
  -            new ParallelQueryExpr<IEnumerable<'R>>(queryExpr')
  +            new ParallelQueryExpr<_>(queryExpr')
   
           [<System.Runtime.CompilerServices.Extension>]
           static member SelectMany<'T, 'Col, 'R>(queryExpr : ParallelQueryExpr<IEnumerable<'T>>, 
                                                   collectionSelector : Expression<Func<'T, IEnumerable<'Col>>>, 
  -                                                resultSelector : Expression<Func<'T, 'Col, 'R>>) =
  +                                                resultSelector : Expression<Func<'T, 'Col, 'R>>) 
  +                            : ParallelQueryExpr<IEnumerable<'R>> =
               let queryExpr' = 
                   match collectionSelector with
                   | Lambda ([paramExpr], bodyExpr) ->
                       NestedQueryTransform ((paramExpr, Compiler.toQueryExpr bodyExpr), resultSelector, queryExpr.QueryExpr, typeof<'R>)
                   | _ -> failwithf "Invalid state %A" collectionSelector
   
  -            new ParallelQueryExpr<IEnumerable<'R>>(queryExpr')
  -
  -        [<System.Runtime.CompilerServices.Extension>]
  -        static member GroupBy<'T, 'Key>(queryExpr : ParallelQueryExpr<IEnumerable<'T>>, keySelector : Expression<Func<'T, 'Key>>) =
  -            new ParallelQueryExpr<IEnumerable<IGrouping<'Key, 'T>>>(GroupBy (keySelector, queryExpr.QueryExpr, typeof<IGrouping<'Key, 'T>>))
  -
  -        [<System.Runtime.CompilerServices.Extension>]
  -        static member OrderBy<'T, 'Key>(queryExpr : ParallelQueryExpr<IEnumerable<'T>>, keySelector : Expression<Func<'T, 'Key>>) = 
  -            new ParallelQueryExpr<IEnumerable<'T>>(OrderBy (keySelector, Order.Ascending, queryExpr.QueryExpr, typeof<'T>))
  -
  -        [<System.Runtime.CompilerServices.Extension>]
  -        static member OrderByDescending<'T, 'Key>(queryExpr : ParallelQueryExpr<IEnumerable<'T>>, keySelector : Expression<Func<'T, 'Key>>) = 
  -            new ParallelQueryExpr<IEnumerable<'T>>(OrderBy (keySelector, Order.Descending, queryExpr.QueryExpr, typeof<'T>))
  +            new ParallelQueryExpr<_>(queryExpr')
  +
  +        [<System.Runtime.CompilerServices.Extension>]
  +        static member GroupBy<'T, 'Key>(queryExpr : ParallelQueryExpr<IEnumerable<'T>>, keySelector : Expression<Func<'T, 'Key>>) 
  +                        : ParallelQueryExpr<IEnumerable<IGrouping<'Key, 'T>>> =
  +            new ParallelQueryExpr<_>(GroupBy (keySelector, queryExpr.QueryExpr, typeof<IGrouping<'Key, 'T>>))
  +
  +        [<System.Runtime.CompilerServices.Extension>]
  +        static member OrderBy<'T, 'Key>(queryExpr : ParallelQueryExpr<IEnumerable<'T>>, keySelector : Expression<Func<'T, 'Key>>) 
  +                                    : ParallelQueryExpr<IEnumerable<'T>> = 
  +            new ParallelQueryExpr<_>(OrderBy (keySelector, Order.Ascending, queryExpr.QueryExpr, typeof<'T>))
  +
  +        [<System.Runtime.CompilerServices.Extension>]
  +        static member OrderByDescending<'T, 'Key>(queryExpr : ParallelQueryExpr<IEnumerable<'T>>, keySelector : Expression<Func<'T, 'Key>>) 
  +                                : ParallelQueryExpr<IEnumerable<'T>> = 
  +            new ParallelQueryExpr<_>(OrderBy (keySelector, Order.Descending, queryExpr.QueryExpr, typeof<'T>))
  
positive.code:             | s when s.StartsWith "System.Linq.Enumerable+<RangeIterator>"  ->
                  let start = ty.GetFields().First(fun f -> f.Name.EndsWith "__start").GetValue(enumerable)
                  let count = ty.GetFields().First(fun f -> f.Name.EndsWith "__count").GetValue(enumerable)
                  new QueryExpr<IEnumerable<'T>>(RangeGenerator(start :?> int, count :?> int))
              | s when s.StartsWith "System.Linq.Enumerable+<RepeatIterator>"  ->
                  let element = ty.GetFields().First(fun f -> f.Name.EndsWith "__element").GetValue(enumerable)
                  let count = ty.GetFields().First(fun f -> f.Name.EndsWith "__count").GetValue(enumerable)
                  new QueryExpr<IEnumerable<'T>>(RepeatGenerator(element, typeof<'T>, count :?> int))
              | _ -> new QueryExpr<IEnumerable<'T>>(Source (constant enumerable, typeof<'T>))
  
          [<System.Runtime.CompilerServices.Extension>]
          static member Compile<'T>(queryExpr : QueryExpr<'T>) : Func<'T> =
  
negative.code:         [<System.Runtime.CompilerServices.Extension>]
          static member GroupBy<'T, 'Key>(queryExpr : QueryExpr<IEnumerable<'T>>, keySelector : Expression<Func<'T, 'Key>>)
                                  : QueryExpr<IEnumerable<IGrouping<'Key, 'T>>> = 
              new QueryExpr<_>(GroupBy (keySelector, queryExpr.QueryExpr, typeof<IGrouping<'Key, 'T>>))
  
          [<System.Runtime.CompilerServices.Extension>]
          static member OrderBy<'T, 'Key>(queryExpr : QueryExpr<IEnumerable<'T>>, keySelector : Expression<Func<'T, 'Key>>)
                                  : QueryExpr<IEnumerable<'T>> = 
              new QueryExpr<_>(OrderBy (keySelector, Order.Ascending, queryExpr.QueryExpr, typeof<'T>))
  
          [<System.Runtime.CompilerServices.Extension>]
          static member OrderByDescending<'T, 'Key>(queryExpr : QueryExpr<IEnumerable<'T>>, keySelector : Expression<Func<'T, 'Key>>)
                                  : QueryExpr<IEnumerable<'T>> = 
              new QueryExpr<_>(OrderBy (keySelector, Order.Descending, queryExpr.QueryExpr, typeof<'T>))
  
          [<System.Runtime.CompilerServices.Extension>]
          static member ToList(queryExpr : QueryExpr<IEnumerable<'T>>) : QueryExpr<List<'T>> = 
              new QueryExpr<_>(ToList queryExpr.QueryExpr)
  
          [<System.Runtime.CompilerServices.Extension>]
          static member ToArray(queryExpr : QueryExpr<IEnumerable<'T>>) : QueryExpr<'T []> = 
              new QueryExpr<_>(ToArray queryExpr.QueryExpr)
  
          // ParallelQuery ExtensionMethods
          [<System.Runtime.CompilerServices.Extension>]
          static member AsQueryExpr(parallelQuery : ParallelQuery<'T>) : ParallelQueryExpr<IEnumerable<'T>> = 
              new ParallelQueryExpr<_>(Source (constant parallelQuery, typeof<'T>))
  
          [<System.Runtime.CompilerServices.Extension>]
          static member Compile<'T>(queryExpr : ParallelQueryExpr<'T>) : Func<'T> =
  