Jieko
Documentation for Jieko.
Jieko.JiekoJieko.DEFJieko.DEFLISTJieko.not_implemented_errorJieko.stubJieko.@prelude_moduleJieko.@pub
Jieko.Jieko — ModulePrelude
Contains Jieko.Prelude, all public definitions can be imported by using Jieko.Prelude.
Definitions
Constants
DEFLISTDEFMacros
@prelude_module@pub <definition>Structs
struct NotImplementedError <: ExceptionInterfaces
not_implemented_error()stub(mod::Module) -> JiekoStubJieko.DEF — ConstantDEFSimilar to SIGNATURES but has more precise method/struct information obtained directly from the @pub macro.
Jieko.DEFLIST — ConstantDEFLISTList all the @pub definitions of a module. It shows nothing if the binded object is not a module.
Jieko.not_implemented_error — MethodRaise a NotImplementedError exception. This is useful to mark an interface method as not implemented yet.
Jieko.stub — Methodstub(mod::Module) -> JiekoStubReturn the interface stub storage for a module.
Jieko.@prelude_module — Macro@prelude_moduleWrap all interfaces from the module in which this macro is called in a Prelude module and export them. This is useful for exporting all interfaces from a module to be used in other modules.
Optionally, you can pass a list of extra symbols to be exported along with the interfaces.
The concept of Prelude is borrowed from rust, where it is used to give users an explicit way to import all the symbols from a package. This is useful for the package authors to provide a default set of symbols to be used by the users via using MyPackage.Prelude without giving them the easy way of importing everything from the package via using MyPackage.
Because Prelude module only contains the API symbols, it makes it easier for the toolchain to check the APIs without mixing them with the implementation details.
Example
module MyModule
using Jieko.Prelude # load everything you need from Jieko
@interface foo(x::Float64)::Int = 2
# export interface `foo` and some extra symbols
@prelude_module
endJieko.@pub — Macro@pub <definition>Mark a definition as public. This will help the toolchain generating docstring and other things.
If definition is a function. It will be treated as an interface definition as overloaded function cannot be denoted by public.