Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- infixRules :: Map Text Precedence
- isTopLevelPrecedence :: Precedence -> Bool
- increment :: Precedence -> Precedence
- data Precedence
- data InfixPrecedence
- infixLevels :: [[Text]]
- operatorPrecedence :: Text -> Maybe Precedence
Documentation
isTopLevelPrecedence :: Precedence -> Bool Source #
Indicates this is the RHS of a top-level definition.
increment :: Precedence -> Precedence Source #
data Precedence Source #
Basement | The lowest precedence, used for top-level bindings |
Bottom | Used for terms that never need parentheses |
Annotation | Type annotations |
Statement | A statement in a block |
Control | Control flow constructs like `if`, |
InfixOp InfixPrecedence | Infix operators |
Application | Function application |
Prefix | Prefix operators like `'`, |
Top | The highest precedence, used for let bindings and blocks |
Instances
Show Precedence Source # | |
Defined in Unison.Syntax.Precedence showsPrec :: Int -> Precedence -> ShowS # show :: Precedence -> String # showList :: [Precedence] -> ShowS # | |
Eq Precedence Source # | |
Defined in Unison.Syntax.Precedence (==) :: Precedence -> Precedence -> Bool # (/=) :: Precedence -> Precedence -> Bool # | |
Ord Precedence Source # | |
Defined in Unison.Syntax.Precedence compare :: Precedence -> Precedence -> Ordering # (<) :: Precedence -> Precedence -> Bool # (<=) :: Precedence -> Precedence -> Bool # (>) :: Precedence -> Precedence -> Bool # (>=) :: Precedence -> Precedence -> Bool # max :: Precedence -> Precedence -> Precedence # min :: Precedence -> Precedence -> Precedence # |
data InfixPrecedence Source #
Instances
Show InfixPrecedence Source # | |
Defined in Unison.Syntax.Precedence showsPrec :: Int -> InfixPrecedence -> ShowS # show :: InfixPrecedence -> String # showList :: [InfixPrecedence] -> ShowS # | |
Eq InfixPrecedence Source # | |
Defined in Unison.Syntax.Precedence (==) :: InfixPrecedence -> InfixPrecedence -> Bool # (/=) :: InfixPrecedence -> InfixPrecedence -> Bool # | |
Ord InfixPrecedence Source # | |
Defined in Unison.Syntax.Precedence compare :: InfixPrecedence -> InfixPrecedence -> Ordering # (<) :: InfixPrecedence -> InfixPrecedence -> Bool # (<=) :: InfixPrecedence -> InfixPrecedence -> Bool # (>) :: InfixPrecedence -> InfixPrecedence -> Bool # (>=) :: InfixPrecedence -> InfixPrecedence -> Bool # max :: InfixPrecedence -> InfixPrecedence -> InfixPrecedence # min :: InfixPrecedence -> InfixPrecedence -> InfixPrecedence # |
infixLevels :: [[Text]] Source #
operatorPrecedence :: Text -> Maybe Precedence Source #
Returns the precedence of an infix operator, if it has one.