typeCheckBinop :: Binop -> TypeCheck Type
typeCheckBinop = \case
  BAnd   -> return b2
  BOr    -> return b2
  BXor   -> return b2
  IPlus  -> return i2
  IMinus -> return i2
  ITimes -> return i2
  IDiv   -> return i2
  IEq    -> return (TInteger ~> TInteger ~> TBool)
  where b2 = (TBool ~> TBool ~> TBool)
        i2 = (TInteger ~> TInteger ~> TInteger)
typeCheckBinop :: Binop -> TypeCheck Type
typeCheckBinop = \case
  BAnd   -> return b2
  BOr    -> return b2
  BXor   -> return b2
  IPlus  -> return i2
  IMinus -> return i2
  ITimes -> return i2
  IDiv   -> return i2
  IEq    -> return (TInteger ~> TInteger ~> TBool)
  where b2 = (TBool ~> TBool ~> TBool)
        i2 = (TInteger ~> TInteger ~> TInteger)
typeCheckBinop = \case
  BAnd   -> return b2
  BOr    -> return b2
  BXor   -> return b2
  IPlus  -> return i2
  IMinus -> return i2
  ITimes -> return i2
  IDiv   -> return i2
  IEq    -> return (TInteger ~> TInteger ~> TBool)
  where b2 = (TBool ~> TBool ~> TBool)
        i2 = (TInteger ~> TInteger ~> TInteger)