anchor.diff:  
   ///Test wether the given expr fails with the given expected exception (or a subclass thereof).
   let inline raises<'a when 'a :> exn> (expr:Expr) = 
  -    let reducedExprs = expr |> reduceFully
  -    let lastExpr = reducedExprs |> List.rev |> List.head
  +    let reducedExprs, lastExpr = reduceFullyAndGetLast expr
       match lastExpr with
       | Patterns.Value(lastValue,lastValueTy) when lastValue <> null && typeof<exn>.IsAssignableFrom(lastValueTy) -> //it's an exception
           if typeof<'a>.IsAssignableFrom(lastValueTy) then () //it's the correct exception
  
positive.code:             outputReducedExprsMsg outputNonFsiTestFailedMsg
  #endif
  
  open Internal
  
  //making inline (together with catch/raise) ensures stacktraces clean in test framework output
  
negative.code:         with 
          | e -> raise e
  
  ///Test wether the given expr fails with the given expected exception (or a subclass thereof) when the additional assertion on the exception object holds.
  let inline raisesWhen<'a when 'a :> exn> (expr:Expr) (exnWhen: 'a -> Expr<bool>) = 
      let reducedExprs, lastExpr = reduceFullyAndGetLast expr
      match lastExpr with
      | Patterns.Value(lastValue,lastValueTy) when lastValue <> null && typeof<exn>.IsAssignableFrom(lastValueTy) -> //it's an exception
          if typeof<'a>.IsAssignableFrom(lastValueTy) then //it's the correct exception
              //but we also need to check the exnWhen condition is true
              let lastValue = lastValue :?> 'a
              let exnWhenExpr = exnWhen lastValue
              let exnWhenReducedExprs, exnWhenLastExpr = reduceFullyAndGetLast exnWhenExpr
              match exnWhenLastExpr with
              | DerivedPatterns.Bool(true) -> () //the exnWhen condition is true
              | _ ->  
                  try
                      testFailed reducedExprs (sprintf "Got the expected exception, but the when condition failed:\nWhen Expression:\n\n%s\n\nTest Expression:\n" (reducedExprs |> List.map decompile |> String.concat "\n"))
                  with 
                  | e -> raise e //we catch and raise e here to hide stack traces for clean test framework output
  
          else //it's not the correct exception
              try
                  testFailed reducedExprs (sprintf "Expected %s but got %s" typeof<'a>.Name (lastValueTy.Name))
              with 
              | e -> raise e
      | _ -> //it's not an exception
          try
              testFailed reducedExprs (sprintf "Expected %s but got nothing" typeof<'a>.Name)
          with 
          | e -> raise e
      
  let inline (=?) x y = test <@ x = y @>
  let inline (<?) x y = test <@ x < y @>
  