Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add infix operator legal characters to the docs #1772

Open
marsella opened this issue Nov 19, 2024 · 0 comments
Open

Add infix operator legal characters to the docs #1772

marsella opened this issue Nov 19, 2024 · 0 comments
Labels
docs LaTeX, markdown, literate haskell, or in-REPL documentation

Comments

@marsella
Copy link
Contributor

marsella commented Nov 19, 2024

Cryptol supports definition of custom infix operators, but there are some restrictions on what characters can be used in that definition. They're defined in the lexer; per @yav:

([\!\#\$\%\&\*\+\-\.\/\:\<\=\>\?\@\\\^\|\~] | $unisymbol)+
where unisymbol are things that in unicode are categorized like this:

Char.ConnectorPunctuation                                                     
Char.DashPunctuation                                                               
Char.OtherPunctuation                                                             
Char.MathSymbol                                                                     
Char.CurrencySymbol                                                    
Char.ModifierSymbol                                                                 
Char.OtherSymbol 

We should add documentation somewhere to document what the allowable characters are (and perhaps also the general syntax). I don't see anything about custom-defined infix operators in the book or the reference manual; this would probably fit best in the refman.

@marsella marsella added the docs LaTeX, markdown, literate haskell, or in-REPL documentation label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs LaTeX, markdown, literate haskell, or in-REPL documentation
Projects
None yet
Development

No branches or pull requests

1 participant