anchor.diff:                  //
                   // Parse any primer position directive
                   let fwdTailLenMax,revTailLenMax =
  -                    match hd.pragmas.TryGetValues("primerpos") with
  -                    | Some(v) ->
  -                        match v |> List.map (fun (s:string) -> s.ToUpper()) with
  -                        // TODO: these should be parsed and converted into union cases much earlier
  -                        // in compiler execution
  -                        | [ "FWD"; offsetStr ] ->
  -                                let x = (hd.dna.Length+1)-int(offsetStr) |> max 0// Convert to tail length
  -                                x, 999999
  -                        | [ "REV"; offsetStr ] ->
  -                                let x = int(offsetStr) |> max 0
  -                                999999,x
  -                        | _ -> failwithf "ERROR: invalid primerpos pragma '%A', should be fwd ### or rev ### " v
  -                    | None -> 999999,999999
  +                    match parsePrimerPos hd.pragmas with
  +                    | FWD(offset) ->
  +                        let x = (hd.dna.Length+1)-offset |> max 0// Convert to tail length
  +                        x, 999999
  +                    | REV(offset) ->
  +                        let x = offset |> max 0
  +                        999999,x
  +                    | NONE -> 999999,999999 // no primerpos
  +
                   if verbose then
                       printf "primerpos directive: fwdTailLenMax = %A revTailLenMax = %A\n" fwdTailLenMax revTailLenMax
   
  
positive.code:                 (hd.dna.Length > 100 || hd.pragmas.ContainsKey("amp")) ->
  
                  printfn "procAssembly: ... generate seamless junction between prev=%s and this=%s" pHd.description hd.description
                  let primerF,offsetF,primerR,offsetR = seamless dp pHd hd
                  // If we stitched fwd/rev off of linker hd then the previous and next elements (prev) and next
                  // might need to be modified (chopped) if the ends were flexible
                  let sliceOut' = match prev with | [] -> sliceOut | p::_ -> (cutRight p offsetR)::(List.tail sliceOut)
  
negative.code:     | DPP(dpp) -> sprintf "DPP(%s)" dpp.name 
      | GAP -> "GAP"
      | SANDWICHGAP -> "GAPSANDWICH"
  
  type PrimerPosOrient = FWD of int |REV of int |NONE
  let parsePrimerPos (pragmas:PragmaCollection) =
          match pragmas.TryGetValues("primerpos") with
          | Some(v) ->
              match v |> List.map (fun (s:string) -> s.ToUpper()) with
              // TODO: these should be parsed and converted into union cases much earlier
              // in compiler execution
              | [ "FWD"; offsetStr ] -> FWD(int offsetStr)
              | [ "REV"; offsetStr ] -> REV(int offsetStr)
              | _ -> failwithf "ERROR: invalid primerpos pragma '%A', should be fwd ### or rev ### " v
          | None -> NONE
  
  /// Time to design some primers given a list of assemblyout structures
  let designPrimers (opts:ParsedOptions) (linkedTree : DnaAssembly list) =
  