| Safe Haskell | Safe-Inferred |
|---|
Util.Precedence
- class Precedence a where
- precedence :: a -> Int
- associativity :: a -> Associativity
- sameOperator :: a -> a -> Bool
- data Associativity
- = AssocNone
- | AssocLeft
- | AssocRight
Documentation
class Precedence a whereSource
Methods
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.
Instances
| Precedence Type | |
| Precedence (Proc seq CSPOperator pn ev evs (seq (ev, ev))) |
data Associativity Source
The associativity of an operator
Constructors
| AssocNone | |
| AssocLeft | |
| AssocRight |
Instances