All pastes #414731 Raw Edit

Miscellany

public text v1 · immutable
#414731 ·published 2007-03-29 06:56 UTC
rendered paste body
| trexp (A.OpExp{left,oper=A.LtOp,right,pos}) =
                  let val tyleft = trexp(left)
                     val tyright = trexp(right)
                     in if tyeq(tyleft,tyright) then
                           case tyleft of E.INT => E.INT
                                         | E.STRING => E.INT
                                         | _ => ((err pos "INT or STRING required"); E.ERROR);
                     else ((err pos "exps must be the same type"); E.ERROR);
                  end