autolib-util
Safe HaskellNone
LanguageHaskell98

Autolib.Symbol

Synopsis

Documentation

class (Size s, Hash s, Eq s, Ord s, ToDoc s, Show s, Reader s) => Symbol s where Source #

Minimal complete definition

Nothing

Methods

arity :: s -> Int Source #

set_arity :: Int -> s -> s Source #

precedence :: s -> Maybe Int Source #

default: not as operator, i. e. prefix notation with parentheses if Just p, then for binary ops: use infix notation; for unary ops, use prefix notation without parentheses (allows "! ! x")

assoc :: s -> Assoc Source #

pool :: [s] Source #

symbol_toDoc :: s -> Doc Source #

symbol_reader :: Parser s Source #

stringify :: [s] -> String Source #

use to create a directory name

toDoc_list :: [s] -> Doc Source #

used for SRS output

Instances

Instances details
Symbol () Source # 
Instance details

Defined in Autolib.Symbol

Methods

arity :: () -> Int Source #

set_arity :: Int -> () -> () Source #

precedence :: () -> Maybe Int Source #

assoc :: () -> Assoc Source #

pool :: [()] Source #

symbol_toDoc :: () -> Doc Source #

symbol_reader :: Parser () Source #

stringify :: [()] -> String Source #

toDoc_list :: [()] -> Doc Source #

Symbol Bool Source # 
Instance details

Defined in Autolib.Symbol

Symbol Char Source # 
Instance details

Defined in Autolib.Symbol

Symbol Int Source # 
Instance details

Defined in Autolib.Symbol

(Symbol a, Symbol b) => Symbol (a, b) Source # 
Instance details

Defined in Autolib.Symbol

Methods

arity :: (a, b) -> Int Source #

set_arity :: Int -> (a, b) -> (a, b) Source #

precedence :: (a, b) -> Maybe Int Source #

assoc :: (a, b) -> Assoc Source #

pool :: [(a, b)] Source #

symbol_toDoc :: (a, b) -> Doc Source #

symbol_reader :: Parser (a, b) Source #

stringify :: [(a, b)] -> String Source #

toDoc_list :: [(a, b)] -> Doc Source #

unused :: Symbol s => Int -> Set s -> [s] Source #

is_operator :: Symbol s => s -> Bool Source #

unary: omit parens around argument binary: use infix notation

Orphan instances

Size Bool Source # 
Instance details

Methods

size :: Bool -> Int Source #