[project @ 1999-07-26 15:31:01 by simonpj]
[ghc-hetmet.git] / ghc / compiler / basicTypes / BasicTypes.lhs
index 39daeec..ded171f 100644 (file)
@@ -16,7 +16,8 @@ types that
 module BasicTypes(
        Version, Arity, 
        Unused, unused,
-       Fixity(..), FixityDirection(..), defaultFixity,
+       Fixity(..), FixityDirection(..),
+       defaultFixity, maxPrecedence, negateFixity, negatePrecedence,
        NewOrData(..), 
        RecFlag(..), isRec, isNonRec,
        TopLevelFlag(..), isTopLevel, isNotTopLevel
@@ -87,8 +88,14 @@ instance Outputable FixityDirection where
 instance Eq Fixity where               -- Used to determine if two fixities conflict
   (Fixity p1 dir1) == (Fixity p2 dir2) = p1==p2 && dir1 == dir2
 
+maxPrecedence = (9::Int)
+defaultFixity = Fixity maxPrecedence InfixL
 
-defaultFixity = Fixity 9 InfixL
+negateFixity :: Fixity
+negateFixity     = Fixity negatePrecedence InfixL      -- Precedence of unary negate is wired in as infixl 6!
+
+negatePrecedence :: Int
+negatePrecedence = 6
 \end{code}