Safe Haskell | Safe-Inferred |
---|
- class Precedence a where
- precedence :: a -> Int
- associativity :: a -> Associativity
- sameOperator :: a -> a -> Bool
- data Associativity
- = AssocNone
- | AssocLeft
- | AssocRight
Documentation
class Precedence a whereSource
precedence :: a -> IntSource
Returns the binding strength of the operator. Higher numbers bind more loosely.
associativity :: a -> AssociativitySource
Returns the associativity of the operator.
sameOperator :: a -> a -> BoolSource
True if the two items are the same operator. This is used to decide when to paranthesise.
Precedence Type | |
Precedence (Proc seq CSPOperator pn ev evs (seq (ev, ev))) |
data Associativity Source
The associativity of an operator