lookupOp :: (Eq op, Show op) => op -> [(op, x)] -> x
lookupOp op table
  = fromMaybe (error msg) (lookup op table)
  where msg = "showOp: cannot find operator: " ++ show op

-- precedence tables, also for showing.
-- these tables could also be used for parsing operators.
lookupOp :: (Eq op, Show op) => op -> [(op, x)] -> x
lookupOp op table
  = fromMaybe (error msg) (lookup op table)
  where msg = "showOp: cannot find operator: " ++ show op

-- precedence tables, also for showing.
-- these tables could also be used for parsing operators.
lookupOp op table
  = fromMaybe (error msg) (lookup op table)
  where msg = "showOp: cannot find operator: " ++ show op

-- precedence tables, also for showing.
-- these tables could also be used for parsing operators.