declareInfixWithDegree :: (Int -> Q Exp) -> (Int -> Q Type) -> Fixity -> Char -> (Int -> Q [Dec])
declareInfixWithDegree expressionOfDegree typeOfDegree fixity symbol n = do
  let name = mkName $ "<" ++ replicate n symbol ++ ">"
  (expression, type_) <- (,) <$> expressionOfDegree n <*> typeOfDegree n
  pure $ SigD name type_
       : ValD (VarP name) (NormalB expression) []
       : InfixD fixity name
       : []
declareInfixWithDegree :: (Int -> Q Exp) -> (Int -> Q Type) -> Fixity -> Char -> (Int -> Q [Dec])
declareInfixWithDegree expressionOfDegree typeOfDegree fixity symbol n = do
  let name = mkName $ "<" ++ replicate n symbol ++ ">"
  (expression, type_) <- (,) <$> expressionOfDegree n <*> typeOfDegree n
  pure $ SigD name type_
       : ValD (VarP name) (NormalB expression) []
       : InfixD fixity name
       : []
declareInfixWithDegree expressionOfDegree typeOfDegree fixity symbol n = do
  let name = mkName $ "<" ++ replicate n symbol ++ ">"
  (expression, type_) <- (,) <$> expressionOfDegree n <*> typeOfDegree n
  pure $ SigD name type_
       : ValD (VarP name) (NormalB expression) []
       : InfixD fixity name
       : []