
let rec clone x n =
  let accum = [] in
  let rec helper accum n =
    if n < 1 then accum else helper (x :: accum) (n - 1) in
  helper accum n;;

let padZero l1 l2 =
  let (a,b) = ((List.length l1), (List.length l2)) in
  if a < b
  then ((List.append (clone 0 (b - a)) l1), l2)
  else if b < a then (l1, (List.append (clone 0 (a - b)) l2)) else (l1, l2);;

let rec removeZero l =
  match l with | [] -> [] | h::t -> if h = 0 then removeZero t else l;;

let bigAdd l1 l2 =
  let add (l1,l2) =
    let f a x = let (h::t,b) = a in a = ([], []) in
    let base = ((List.rev l1), []) in
    let args = l2 in let (_,res) = List.fold_left f base args in res in
  removeZero (add (padZero l1 l2));;


  fix 

 let rec clone x n = 
   let  = [ ] in 
   let rec helper accum n = 
     if n < 1 then accum else helper ( x : :  ) ( n - 1 ) in 
   helper accum n ; ; 

 let    = 
   let ( a , b ) = ( ( List.length l1 ) , (  l2 ) ) in 
   if a < b 
   then ( ( List.append ( clone 0 ( b - a ) ) l1 ) , l2 ) 
   else if b < a then ( l1 , ( List.append ( clone 0 ( a - b ) ) l2 ) ) else ( l1 , l2 ) ; ; 

 let rec removeZero l = 
   match l with | [ ] - > [ ] | h::t - > if h = 0 then removeZero t else l ; ; 

 let bigAdd l1 l2 = 
   let add ( l1,l2 ) = 
     let f a x = let ( h::t , _ ) = a in ( [ ] , [ ] ) in 
     let base = ( ( List.rev l1 ) , [ ] ) in 
     let args = l2 in let ( _ , res ) = List.fold_left f base args in res in 
   removeZero ( add (    ) ) ; ; 



let rec clone x n =
  let accum = [] in
  let rec helper accum n =
    if n < 1 then accum else helper (x :: accum) (n - 1) in
  helper accum n;;

let padZero l1 l2 =
  let (a,b) = ((List.length l1), (List.length l2)) in
  if a < b
  then ((List.append (clone 0 (b - a)) l1), l2)
  else if b < a then (l1, (List.append (clone 0 (a - b)) l2)) else (l1, l2);;

let rec removeZero l =
  match l with | [] -> [] | h::t -> if h = 0 then removeZero t else l;;

let bigAdd l1 l2 =
  let add (l1,l2) =
    let f a x = let (h::t,_) = a in ([], []) in
    let base = ((List.rev l1), []) in
    let args = l2 in let (_,res) = List.fold_left f base args in res in
  removeZero (add (padZero l1 l2));;

*)

  changed spans 
 ( 19,17)-(19,49 ) 
 let ( h : : t , _ ) = a in 
 ( [ ] , [ ] ) 
 LetG NonRec [ ( TuplePatG ( fromList [ EmptyPatG]),VarG ) ] ( TupleG [ EmptyG , EmptyG ] ) 


(19,17)-(19,49)
let (h :: t , _) = a in
([] , [])
LetG NonRec [(TuplePatG (fromList [EmptyPatG]),VarG)] (TupleG [EmptyG,EmptyG])

*)

  type error slice 
 ( 19,5)-(21,69 ) 
 (  ) 
 ( 19,13)-(19,49 ) 
 ( 19,17)-(19,49 ) 
 ( 19,37)-(19,38 ) 
 ( 19,37)-(19,49 ) 
 ( 19,41)-(19,49 ) 
 ( 21,36)-(21,50 ) 
 ( 21,36)-(21,62 ) 
 ( 21,51)-(21,52 ) 

(19,5)-(21,69)
(19,11)-(19,49)
(19,13)-(19,49)
(19,17)-(19,49)
(19,37)-(19,38)
(19,37)-(19,49)
(19,41)-(19,49)
(21,36)-(21,50)
(21,36)-(21,62)
(21,51)-(21,52)
*)


let rec clone x n =
  let accum = [] in
  let rec helper accum n =
    if n < 1 then accum else helper (x :: accum) (n - 1) in
  helper accum n;;

let padZero l1 l2 =
  let (a,b) = ((List.length l1), (List.length l2)) in
  if a < b
  then ((List.append (clone 0 (b - a)) l1), l2)
  else if b < a then (l1, (List.append (clone 0 (a - b)) l2)) else (l1, l2);;

let rec removeZero l =
  match l with | [] -> [] | h::t -> if h = 0 then removeZero t else l;;

let bigAdd l1 l2 =
  let add (l1,l2) =
    let f a x = let (h::t,b) = a in a = ([], []) in
    let base = ((List.rev l1), []) in
    let args = l2 in let (_,res) = List.fold_left f base args in res in
  removeZero (add (padZero l1 l2));;


  fix 

 let rec clone x n = 
   let  = [ ] in 
   let rec helper accum n = 
     if n < 1 then accum else helper ( x : :  ) ( n - 1 ) in 
   helper accum n ; ; 

 let    = 
   let ( a , b ) = ( ( List.length l1 ) , (  l2 ) ) in 
   if a < b 
   then ( ( List.append ( clone 0 ( b - a ) ) l1 ) , l2 ) 
   else if b < a then ( l1 , ( List.append ( clone 0 ( a - b ) ) l2 ) ) else ( l1 , l2 ) ; ; 

 let rec removeZero l = 
   match l with | [ ] - > [ ] | h::t - > if h = 0 then removeZero t else l ; ; 

 let bigAdd l1 l2 = 
   let add ( l1,l2 ) = 
     let f a x = let ( h::t , _ ) = a in ( [ ] , [ ] ) in 
     let base = ( ( List.rev l1 ) , [ ] ) in 
     let args = l2 in let ( _ , res ) = List.fold_left f base args in res in 
   removeZero ( add (    ) ) ; ; 



let rec clone x n =
  let accum = [] in
  let rec helper accum n =
    if n < 1 then accum else helper (x :: accum) (n - 1) in
  helper accum n;;

let padZero l1 l2 =
  let (a,b) = ((List.length l1), (List.length l2)) in
  if a < b
  then ((List.append (clone 0 (b - a)) l1), l2)
  else if b < a then (l1, (List.append (clone 0 (a - b)) l2)) else (l1, l2);;

let rec removeZero l =
  match l with | [] -> [] | h::t -> if h = 0 then removeZero t else l;;

let bigAdd l1 l2 =
  let add (l1,l2) =
    let f a x = let (h::t,_) = a in ([], []) in
    let base = ((List.rev l1), []) in
    let args = l2 in let (_,res) = List.fold_left f base args in res in
  removeZero (add (padZero l1 l2));;

*)

  changed spans 
 ( 19,17)-(19,49 ) 
 let ( h : : t , _ ) = a in 
 ( [ ] , [ ] ) 
 LetG NonRec [ ( TuplePatG ( fromList [ EmptyPatG]),VarG ) ] ( TupleG [ EmptyG , EmptyG ] ) 


(19,17)-(19,49)
let (h :: t , _) = a in
([] , [])
LetG NonRec [(TuplePatG (fromList [EmptyPatG]),VarG)] (TupleG [EmptyG,EmptyG])

*)

  type error slice 
 ( 19,5)-(21,69 ) 
 (  ) 
 ( 19,13)-(19,49 ) 
 ( 19,17)-(19,49 ) 
 ( 19,37)-(19,38 ) 
 ( 19,37)-(19,49 ) 
 ( 19,41)-(19,49 ) 
 ( 21,36)-(21,50 ) 
 ( 21,36)-(21,62 ) 
 ( 21,51)-(21,52 ) 

(19,5)-(21,69)
(19,11)-(19,49)
(19,13)-(19,49)
(19,17)-(19,49)
(19,37)-(19,38)
(19,37)-(19,49)
(19,41)-(19,49)
(21,36)-(21,50)
(21,36)-(21,62)
(21,51)-(21,52)
*)
