☰

clojerl

0.7.0+build.2033.refc431a40

  • Home
  • API Reference

Modules

  • clj_analyzer
  • clj_behaviour
  • clj_cache
  • clj_compiler
  • clj_edn
  • clj_emitter
  • clj_emitter_pattern
  • clj_env
  • clj_hash_collision
  • clj_module
  • clj_multimethod
  • clj_murmur3
  • clj_protocol
  • clj_reader
  • clj_rt
  • clj_scope
  • clj_utils
  • clj_vector
  • clojerl
  • core_eval
  • Basic Types

  • clojerl.BitString
  • clojerl.Boolean
  • clojerl.Float
  • clojerl.Fn
  • clojerl.Integer
  • clojerl.Keyword
  • clojerl.Nil
  • clojerl.String
  • clojerl.Symbol
  • erlang.Fn
  • erlang.Port
  • erlang.Process
  • erlang.Reference
  • erlang.Type
  • erlang.util.Date
  • erlang.util.Regex
  • erlang.util.UUID
  • Namespaces & Vars

  • clojerl.Namespace
  • clojerl.Var
  • Collections & Data Structures

  • clojerl.Cons
  • clojerl.Cycle
  • clojerl.Iterate
  • clojerl.LazySeq
  • clojerl.List
  • clojerl.Map
  • clojerl.Range
  • clojerl.Repeat
  • clojerl.Set
  • clojerl.SortedMap
  • clojerl.SortedSet
  • clojerl.TupleMap
  • clojerl.Vector
  • erlang.List
  • erlang.Map
  • erlang.Tuple
  • Concurrency

  • clojerl.Agent
  • clojerl.Atom
  • clojerl.Delay
  • clojerl.Future
  • clojerl.ProcessVal
  • clojerl.Promise
  • I/O

  • erlang.io.File
  • erlang.io.PushbackReader
  • erlang.io.StringReader
  • erlang.io.StringWriter
  • Errors

  • clojerl.ArityError
  • clojerl.AssertionError
  • clojerl.BadArgumentError
  • clojerl.Error
  • clojerl.ExceptionInfo
  • clojerl.IllegalAccessError
  • Protocols

  • clojerl.IAssociative
  • clojerl.IBlockingDeref
  • clojerl.IChunk
  • clojerl.IChunkedSeq
  • clojerl.IColl
  • clojerl.ICounted
  • clojerl.IDeref
  • clojerl.IEncodeClojure
  • clojerl.IEncodeErlang
  • clojerl.IEquiv
  • clojerl.IError
  • clojerl.IExceptionInfo
  • clojerl.IFn
  • clojerl.IHash
  • clojerl.IIndexed
  • clojerl.IKVReduce
  • clojerl.ILookup
  • clojerl.IMap
  • clojerl.IMeta
  • clojerl.INamed
  • clojerl.IOError
  • clojerl.IPending
  • clojerl.IRecord
  • clojerl.IReduce
  • clojerl.IReference
  • clojerl.IReversible
  • clojerl.ISeq
  • clojerl.ISeqable
  • clojerl.ISequential
  • clojerl.ISet
  • clojerl.ISorted
  • clojerl.IStack
  • clojerl.IStringable
  • clojerl.IType
  • clojerl.IVector
  • erlang.io.ICloseable
  • erlang.io.IPushbackReader
  • erlang.io.IReader
  • erlang.io.IWriter

clj_compiler

Clojerl compiler's entrypoint.

Provides functions to compile files, strings and forms.

Summary

Types

  • clj_flag()
  • compiled_modules()
  • options()

Functions

  • eval(Form)
    Equivalent to eval(Form, default_options()).
  • eval(Form, Opts)
    Evaluates a form.
  • file(File)
    Equivalent to file(File, default_options()).
  • file(File, Opts)
    Compiles the file whose path is File using the provided options.
  • load(PushbackReader)
    Compiles and load code from avoid reader.
  • load_file(Path)
    Compiles and load code from a file.
  • load_string(Src)
    Compiles and load code from a string.
  • string(Src)
    Equivalent to string(Src, default_options()).
  • string(Src, Opts)
    Compiles the code in Src using the provided options.

Types

clj_flag()
-type clj_flag() ::
          'no-warn-symbol-as-erl-fun' | 'no-warn-dynamic-var-name'.

compiled_modules()
-type compiled_modules() :: [file:filename_all()].

options()
-type options() ::
          #{clj_flags => [clj_flag()],
            file => string(),
            reader_opts => map(),
            time => boolean(),
            output => binary | asm | core,
            fake => boolean()}.

Functions

eval(Form)
-spec eval(any()) -> {any(), clj_env:env()}.

Equivalent to eval(Form, default_options()).

eval(Form, Opts)
-spec eval(any(), options()) -> {any(), clj_env:env()}.

Evaluates a form.

Returns the evaluated value for the form and the resulting clj_env:env() compilation context.

file(File)
-spec file(file:filename_all()) -> compiled_modules().

Equivalent to file(File, default_options()).

file(File, Opts)
-spec file(file:filename_all(), options()) -> compiled_modules().

Compiles the file whose path is File using the provided options.

Returns a list of paths for the generated BEAM binaries. This can be used to keep track of the compiling dependency between files, which is useful for incremental compiling.

load(PushbackReader)
-spec load('erlang.io.PushbackReader':type()) -> any().

Compiles and load code from avoid reader.

Returns the value of the last expression.

load_file(Path)
-spec load_file(binary()) -> any().

Compiles and load code from a file.

Returns the value of the last expression.

load_string(Src)
-spec load_string(binary()) -> any().

Compiles and load code from a string.

Returns the value of the last expression.

string(Src)
-spec string(binary()) -> clj_env:env().

Equivalent to string(Src, default_options()).

string(Src, Opts)
-spec string(binary(), options()) -> clj_env:env().

Compiles the code in Src using the provided options.

Returns a clj_env:env() compilation context.