typedBinOp op =
  case op of
    A.Add -> Add
    A.Sub -> Sub
    A.Mul -> Mul
    A.Div -> Div
    A.Or -> Or
    A.And -> And
    A.Implies -> Implies
    A.ArrayIndex -> error "typedBinOp: no array indexes"
    A.RelOp rop -> RelOp (typedROp rop) VoidType
typedBinOp op =
  case op of
    A.Add -> Add
    A.Sub -> Sub
    A.Mul -> Mul
    A.Div -> Div
    A.Or -> Or
    A.And -> And
    A.Implies -> Implies
    A.ArrayIndex -> error "typedBinOp: no array indexes"
    A.RelOp rop -> RelOp (typedROp rop) VoidType
typedBinOp op =
  case op of
    A.Add -> Add
    A.Sub -> Sub
    A.Mul -> Mul
    A.Div -> Div
    A.Or -> Or
    A.And -> And
    A.Implies -> Implies
    A.ArrayIndex -> error "typedBinOp: no array indexes"
    A.RelOp rop -> RelOp (typedROp rop) VoidType