{-
infixdecl   ->  fixity [digit] ops  (fixity declaration)  
fixity      ->  "infixl" | "infixr" | "infix"  
ops         ->  op1 "," ... "," opn    (n>=1)  
-}

infixdecl :: HParser (Range -> Declaration)
infixdecl = 
    do
        f <- fixity
        p <- fmap fromInteger (option 9 (fmap read lexInt)) :: HParser Int
        when (p < 0 || p > 9) (fail Texts.parserSingleDigitPriority)
        os <- ops
        return $ \r -> Declaration_Fixity r f (MaybeInt_Just p) os
infixdecl :: HParser (Range -> Declaration)
infixdecl = 
    do
        f <- fixity
        p <- fmap fromInteger (option 9 (fmap read lexInt)) :: HParser Int
        when (p < 0 || p > 9) (fail Texts.parserSingleDigitPriority)
        os <- ops
        return $ \r -> Declaration_Fixity r f (MaybeInt_Just p) os
infixdecl = 
    do
        f <- fixity
        p <- fmap fromInteger (option 9 (fmap read lexInt)) :: HParser Int
        when (p < 0 || p > 9) (fail Texts.parserSingleDigitPriority)
        os <- ops
        return $ \r -> Declaration_Fixity r f (MaybeInt_Just p) os