Changeset 2985


Ignore:
Timestamp:
Mar 27, 2013, 6:31:55 PM (4 years ago)
Author:
sacerdot
Message:

Order of printing of lines in LIN fixed again, truly this time. But I still
do not understand why I needed to reverse the list.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extracted/joint_printer.ml

    r2983 r2985  
    13861386  { cip_print_serialization_params = (lin_print_serialization_params lp pp);
    13871387    fold_code = (fun _ f m a ->
    1388     (List.foldr (fun x res ->
     1388    (Util.foldl (fun res x ->
    13891389      let { Types.fst = pc; Types.snd = res' } = res in
    13901390      { Types.fst = (Nat.S pc); Types.snd = (Obj.magic f pc x res') })
  • src/joint/joint_printer.ma

    r2983 r2985  
    104104 ∀string. printing_pass_independent_params string → list string → string ≝
    105105 λstring,pp.
    106   foldl ?? (print_concat … pp) (print_empty … pp). 
     106  foldr ?? (print_concat … pp) (print_empty … pp). 
    107107
    108108definition print_joint_seq :
     
    261261   (λA.λf:code_point (lin_params_to_params …) → ?.λM:codeT lp globals.
    262262    λa.
    263      \snd (foldr ??
    264       (λx.λres. let 〈pc,res'〉 ≝ res in 〈S pc,f pc x res'〉)
     263     \snd (foldl ??
     264      (λres,x. let 〈pc,res'〉 ≝ res in 〈S pc,f pc x res'〉)
    265265      〈0,a〉 M))
    266266     (λlinstr.
Note: See TracChangeset for help on using the changeset viewer.