Project

General

Profile

Revision c02d255e src/dimension.ml

View differences:

src/dimension.ml
367 367
  | Dident id1, Dident id2 when id1 = id2 -> ()
368 368
  | _ -> raise (Unify (dim1, dim2))
369 369

  
370
let rec expr_replace_var fvar e = 
371
 { e with dim_desc = expr_replace_desc fvar e.dim_desc }
372
and expr_replace_desc fvar e =
373
  let re = expr_replace_var fvar in
374
  match e with
375
  | Dvar
376
  | Dunivar
377
  | Dbool _
378
  | Dint _ -> e
379
  | Dident v -> Dident (fvar v)
380
  | Dappl (id, el) -> Dappl (id, List.map re el)
381
  | Dite (g,t,e) -> Dite (re g, re t, re e)
382
  | Dlink e -> Dlink (re e)

Also available in: Unified diff