anchor.diff:  
       let (|Lit|_|) = castLiteral
   
  +    let tupleGet idx e =
  +        let erlang = litAtom "erlang" |> constr
  +        let element = litAtom "element" |> constr
  +        let idx = idx+1 |> cerl.LInt
  +        modCall erlang element [cerl.Lit idx |> constr; e]
  +
       //TODO: should we consult the FSharpType as well?
       let mapConst (o : obj) =
           match o with
  
positive.code:                                                             ctx)
                                             s rest)
  
              printfn "merged %A"  (thenPatsGrouped, merged)
              yield! merged |> Map.toList
              yield! processITEs d nm esle
          | B.DecisionTreeSuccess(idx, []) ->
  
negative.code:                             // TODO if e is a let it should be in pattern
                              altExpr (cerl.Pat pat, grd, e))
                  cerl.Case (caseExpr, alts), nm
              | B.FSharpFieldGet (Some e, t, fld) ->
                  // TODO when would the expr be None here
                  let tupleIndex =
                      t.TypeDefinition.FSharpFields
                      |> Seq.findIndex ((=) fld)
                      |> (+) 1
                  let e, nm = processExpr nm e
                  tupleGet tupleIndex e, nm
              | B.NewRecord (t, args) ->
                  let args, nm = foldNames nm processExpr args
                  //type to atom
                  let recordName =
                      litAtom t.TypeDefinition.LogicalName |> constr
                  cerl.Tuple (recordName :: args), nm
              | x -> failwithf "not implemented %A" x
          constr res, nmOut
  
  