"Defining constants with `=>` at the top level makes sure they are interpreted as constant functions; hence, they are evaluated every time they are needed.\n"+
"This is the default understanding of `=` in global scope.\n"+
"The inverse is {{`=:`}}, which defines an identifier to be a graph."
,syntax_description="Imports code from other modules. With the `from` keyword, one can achieve more granularity. In case of name clashes, `qualified` can be used (undocumented)."
,syntax_description=
"Imports code from other modules.\n"+
"With the `from` keyword, one can achieve more granularity.\n"+
"In case of name clashes, `qualified` can be used (undocumented)."
,syntax_doc_location=[CLR4"2.5""_Toc311797991"]
,syntax_examples=
[EX"Function""import ..."
,EX"Function""import StdEnv // Import all code from the StdEnv definition module"
,EX"Function""from StdFunc import o // Import only the o function from StdFunc"
,EX"Function""import qualified Data.Map as M // Import Data.Map such that functions are available as e.g. 'M'.get."
,syntax_examples=map(EX"Function")
["import ..."
,"import StdEnv // Import all code from the StdEnv definition module"
,"from StdFunc import o // Import only the o function from StdFunc"
,"import qualified Data.Map as M // Import Data.Map such that functions are available as e.g. 'M'.get."
]
})
bs_infix=(["infix","infixl","infixr"],
{syntax_title="infix operator"
,syntax_code=["infix[l,r]"]
,syntax_description="Defines a function with arity 2 that can be used in infix position. `n` determines the precedence. `infixl` and `infixr` indicate associativity."
,syntax_code=["infix[l,r] [...]"]
,syntax_description=
"Defines a function with arity 2 that can be used in infix position.\n"+
"The following number, if any, determines the precedence.\n"+
"`infixl` and `infixr` indicate associativity."
,syntax_doc_location=[CLR5"3.7.2""_Toc311798011"]
,syntax_examples=
[EX"Function""(...) infix n :: ..."
,EX"Function""(bitor) infixl 6 :: !Int !Int -> Int // Left-associative infix function with precedence 6"
,EXs"Function""macro""(o) infixr 9 // Infix macro\n(o) f g :== \x -> f (g x)"
[EX"Function""(bitor) infixl 6 :: !Int !Int -> Int // Left-associative infix function with precedence 6"
,EXs"Function""macro""(o) infixr 9 // Infix macro\n(o) f g :== \\x -> f (g x)"
,EX"TypeDef"":: MyType = (:+:) infixl 6 Int Int // Infix data constructor, can be used as (5 :+: 10)"
,syntax_description="Defines a new type name for an existing type, while the type behaves as an abstract type for the programmer. This allows compiler optimisations on abstract types."
,syntax_doc_location=[CLR7"5.4.1""_Toc311798054"]
,syntax_examples=[EX"TypeDef"":: Stack a (:== [a])"]
})
bs_tuples=[make_tuplen\\n<-[1..31]]
where
make_tuple::Int->([SyntaxPattern],SyntaxEntry)
make_tuplen=([toString['(':repeatn n ','++[')']],withargs,"tuple"],
{syntax_title=ary+"ary tuple"
,syntax_code=[withvars]
,syntax_description=
"Tuples allow bundling a finite number of expressions of different types into one object without defining a new data type.\n"+