Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456 Syntax
Syntax
The syntax of Cayenne is very close to that of Haskell.
Lexical structure
Identifiers
Identifiers consist of an initial letter optionally followed by
more letters, digits, single quote ('), or dollar sign ($).
If an identifier contains a dollar sign it is a module identifier
and it can only be used to name modules.
Some normal identifiers: x, x',
foo, Bool.
Some module identifiers: foo$bar, System$Bool
Reserved words
Some identifiers are reserved words and cannot be used as variables:
abstract, case, concrete, data, do, in, interface, let, module
of, open, native, private, public, sig, struct, type, use
Operators
Operators are built from a sequence of the characters:
Numeric literals consist of a (nonempty) sequence of digits, as in
4711.
Numeric literals have type System$Int.Int.
Character literals and String literals
Character literals are written between single quotes, as in
'a', and strings between double quotes, as in
"Hello".
Escape codes may be used in characters and
strings to represent special characters. Note that a single quote '
may be used in a string, but must be escaped in a character;
similarly, a double quote " may be used in a character, but must be
escaped in a string. \ must always be escaped. The category charesc
also includes portable representations for the characters "alert"
(\a), "backspace" (\b), "form feed" (\f), "new line" (\n), "carriage
return" (\r), "horizontal tab" (\t), and "vertical tab" (\v).
Character literals have type System$Char.Char and string
literals System$String.String.
Layout
Cayenne uses the same kind of layout rule as Haskell.
In syntactic construct with of the form { item; ... }
the curly braces and semicolons can be replaced by layout.