Jieko

Documentation for Jieko.

Jieko.Jieko — Module

Prelude

Contains Jieko.Prelude, all public definitions can be imported by using Jieko.Prelude.

Definitions

Constants

DEFLIST
DEF

Macros

@prelude_module
@pub <definition>

Structs

struct NotImplementedError <: Exception

Interfaces

not_implemented_error()
stub(mod::Module) -> JiekoStub
source
Jieko.DEF — Constant
DEF

Similar to SIGNATURES but has more precise method/struct information obtained directly from the @pub macro.

source
Jieko.DEFLIST — Constant
DEFLIST

List all the @pub definitions of a module. It shows nothing if the binded object is not a module.

source
Jieko.stub — Method
stub(mod::Module) -> JiekoStub

Return the interface stub storage for a module.

source
Jieko.@prelude_module — Macro
@prelude_module

Wrap 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

end
source
Jieko.@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.

source