"Classes are (sets of) overloaded functions. For classes with only one member function, a simplified syntax exists.\n"+
"Types can instantiate classes with the {{`instance`}} keyword."
,syntax_doc_location=[CLR8"6.1""_Toc311798056"]
,syntax_examples=map(EX"ClassDef")
["class zero a :: a // one member"// TODO highlighting
,"class Text s // multiple members\nwhere\n\ttextSize :: !s -> Int\n\tconcat :: ![s] -> s\n\t// ..."// TODO highlighting
]
})
bs_code=(["code","inline","code inline"],
{syntax_title="ABC code"
,syntax_code=["... = code [inline] { ... }"]
,syntax_description=
"A code block with raw ABC instructions, which can be used for primitive functions like integer addition, for linking with C, bypassing the type system... welcome down the rabbit hole!\n"+
"When `inline` is used, the function will be inlined when applied in a strict context."
,syntax_doc_location=[CLR13"11.2""_Toc311798115"]
,syntax_examples=map(EX"Function")// TODO highlighting
["add :: !Int !Int -> Int // Primitive function\nadd a b = code inline {\n\taddI\n}"
,"sleep :: !Int !*World -> *(!Int, !*World) // Linking with C\nsleep n w = code {\n\tccall sleep \"I:I:A\"\n}"
,"cast :: !.a -> .b // Bypassing the type system\ncast _ = code {\n\tpop_a 1\n}"
,syntax_description="The heading of a Clean file. Definition modules describe what things are exported (dcl files), implementation modules how they are implemented (icl files)."
,syntax_doc_location=[CLR4"2.2""_Toc311797983"]
,syntax_examples=
[EX"Function""definition module ..."
,EX"Function""definition module StdList // Exported definitions of list functions"
,EX"Function""implementation module StdList // The implementations of the functions"
,EX"Function""module test // An implementation module without corresponding dcl"
,EX"Function""system module StdInt // The definitions of a module that contains foreign code (see section 2.6 of the language report)"
,syntax_examples=map(EX"Function")
["definition module ..."
,"definition module StdList // Exported definitions of list functions"
,"implementation module StdList // The implementations of the functions"
,"module test // An implementation module without corresponding dcl"
,"system module StdInt // The definitions of a module that contains foreign code (see section 2.6 of the language report)"