Changes are marked in bold which could result in backwards-incompatibility.
Note that since 0.3.0, no deprecations have actually resulted in removals. They are advisory only and we have no plans to break the deprecated forms.
pick-values
is now a special, allowing it to emit
better Lua output.fennel.getinfo
as source-map-aware equivalent of
debug.getinfo
.&
and &as
in the same
destructure clause.--require-as-include
.and
/or
forms
with potential side-effects.--keywords
option to add to the list of built-in
Lua keywords.,complete ,d
-> ,doc
.(set ___repl___.view-opts.depth 100)
.(set (. tbl field) val)
.fennel.compile
function now accepts an AST,
iterator, or file.(pick-values 0 (side-effects))
now correctly preserves
side effects_foo
arguments in
lambda
.,compile
repl
command.and
/or
inside
(fn [...])
now propagate varargs.macrodebug
on cyclic macro expansions now serialize to
valid code (no @1, ..
)(tail! (f x))
could sometimes compile
to return return f(x)
tail!
ensure its target is not a special form call
like (tail! (or x (f)))
make install
This was the last release that provided Linux arm32 binaries.
fennel.repl
is now a callable table, allowing the
default (fennel.repl)
options to be customized by setting
option fields on the table itself. This accidentally caused
incompatibility with
coroutine.create
.lambda
being
ignored.band
operator.icollect
with &into
and
multiple values.assert-repl
, as a drop-in replacement for
assert
, no longer takes an opts
param(. (a-macro) k)
bypassed protections
against invalid Lua output__fennelrest
destructuring
metamethod.tail!
which asserts that the argument is called in
tail position.assert-repl
to make an assertion which opens a repl
when it fails.--assert-as-repl
flag to replace
assert
calls with assert-repl
.,return FORM
command.*1
, *2
, and
*3
locals.fennel.runtime-version
will return version information
as a table if given optional argument___repl___
table, allowing
method redefinition at runtime.metadata.get
is called
without a key.:byte-escape
option to fennel.view
for
overriding default char escapesfennel-api(3)
,
fennel-reference(5)
, and fennel-tutorial(7)
from their respective documentation.Note for packagers: The man page
fennel.1
has been moved to man/man1/fennel.1
along with the new generated man pages. For build scripts that copy
files manually in lieu of make install
, this may require an
update.
{:true 1 true 2}
emit with
unstable key order{:__metatable true}
(as in
pandoc-lua) breaks fennel.viewmacros
only accepts table
literals, not table-returning exprs__pairs
metamethod in fennel.viewcase
which does pattern matching without pinning
existing localscase-try
which works like match-try
without pinning localsfaccumulate
macro as range analog to
accumulate
NO_COLOR
env
var is set&
for rest args in function arglists for
consistency with let
error-pinpoint
option to support custom error
highlightingfn
special now allows arbitrary compiler metadata
keys via the metadata table syntax{:once val}
or
{:once val :after other-val}
. See fennel.view
docstring for more infoset
did not catch unknown locals when
setting table fieldsctrl-d
in
readlinefennel.install
function to the API for adding the
searchertable?
predicate to fennel API to go with
list?
, sym?
, etc(values)
consistently evaluates to zero
valuespairs
table traversal for
reproducible buildsfcollect
macro for range "comprehension"include
splice modules in where they're used
instead of at the topast-source
function to API to get file/line info
from AST nodes&into
/&until
to certain looping
constructs--compile-binary
nil
nil
were emitted by unquote
in a macro, and the macro was not compiled correctly because the
resulting list length was calculated incorrectly,doc m.foo
did not resolve
multisym to macro for macro modules loaded as macro table via
(import-macros m :my.macro.module)
match-try
macro for chained pattern matching for
steps which might failfennel.parser
function now accepts a string in
addition to an iteratoraccumulate
macro can now accumulate over multiple
valuesfn
special now accepts a metadata table in place of
a docstring,reload mod
repl command can now reload macro
modules--skip-include
would mistakenly emit a
warningand
/or
nil
did not show up in
REPL completiongranulate
and string-stream
functions in the APIglobal
form in favor of using the
_G
tablecollect
to take two direct body arguments instead
of requiring values
--rename-native-module
when compiling
binaries:into
clause to collect
and
icollect
--globals "*"
--require-as-include
fails to find a
module to include--add-macro-path
for configuring macro path
similarly to fennel module paths__fennelrest
metamethod for changing
&
destructuring behavior&
destructuring inside
match
import-macros
fennel.view
function no longer outputs invalid
UTF-8 when given invalid input-?>
and -?>>
checked for false values, not just nillet
locals escaped their scope at the
top level of the replfennelview.lua
from the repo as
it is part of the main API nowdoc
special form; replace with
,doc
repl commandicollect
by avoiding unnecessary
length checksif
are treated as nil,
not zero values_
for else clause in
match
It's Fennel's 5th birthday! We've got the new accumulate
macro for reducing over tables, plus a couple new repl commands and more
flexibility when using include
.
accumulate
macro for reduce operations--skip-include
option to prevent modules from being
included in output,apropos pattern
and
,apropos-doc pattern
repl commands,complete foo
repl commandfennel.syntax
function describing built-ins-c
alias for --compile
in command line
argumentsinclude
and make
--require-as-include
resolve module names dynamically. See
the require section in the referencemax-sparse-gap
option in fennel.view
pick-args
macrofennel.macro-path
for searching
for macro modules and FENNEL_MACRO_PATH
environment
variableThis release mostly contains small bug fixes.
_ENV
as an unknown global?.
when used directly on nilwhere
--use-bit-lib
was not propagating to
the REPLThis release contains one small bug fix.
The biggest change in this release is the addition of the
:until
clause in all iteration forms to end iteration
early.
?.
where
/or
clauses in match
--use-bit-lib
flag to allow bitwise operations to
work in LuaJITmacro-searchers
table for finding macros similarly
to package.searchers
&as
inside pattern matchessym
function in compile scope now takes a source
table second argument:until
clauses for early termination in all
loops:escape-newlines?
and
:prefer-colon?
options in fennel.viewThis release mostly contains small bug fixes.
The highlight of this release is the table comprehension macros which
take the place of map
in other lisps. The
&as
clause in destructuring now allows you to access
the original table even as you destructure it into its fields. The
fennel.view
serializer has been completely rewritten to
improve indentation.
collect
/icollect
)fennel.view
fennel.view
for better indentation
handlingdoc
&as
...
arguments consistently with Lua when
requiring modules__fennelview
metamethod
on userdata metatables...
inside
eval-compiler
import-macros
would not respect certain
compiler options&
character in identifiers;
will be disallowed laterThis release adds support for reloading modules in the repl, making interactive development more streamlined.
,reload
; see
,help
for a full list--no-compiler-sandbox
did not apply in
import-macros
macrodebug
fail to print correctly:
when used with methods that are not
valid Lua namesThis release introduces the plugin system as well as starting to sandbox the compiler environment for safer code loading. Nothing is blocked yet, but it emits warnings when macros use functionality that is not considered safe; future versions will prevent this.
--lua
CLI flag for specifying a custom Lua
command/executablelist?
and sym?
in compiler API@
This release features a version of the Fennel compiler that is self-hosted and written entirely in Fennel!
fennel.friend
module is now incorporated into the
compiler, not separateinclude
would
get skippedThis release backports all the features from the 1.3.0 release to the pre-self-hosted version of the compiler for bootstrapping purposes. There should be no reason to use this, other than to build a newer version.
match
rewrite as well as
case
, case-try
, and
match-try
accumulate
, faccumulate
, and
fcollect
macros?.
macrocollect
and icollect
macros:until
support in each
and other
loops.&as
destructuringThis release mostly includes small bug fixes but also adds the
with-open
macro for automating closing file handles,
etc.
$...
with-open
macro for auto-closing file handles--native-module
and --native-library
to --compile-binary
commandfennel.searchModule
function to module APIinclude
calls would splice
locals incorrectly#
) couldn't be used
as multisymsinclude
to ignore compiler
options$HOME
env var
was not setThis release mostly includes small bug fixes, but also introduces a very experimental command for compiling standalone executables.
--compile-binary
commandThis release adds support for Lua 5.3's bitwise operators as well as
a new way of importing macro modules. It also adds
pick-values
and pick-args
for a little more
flexibility around function args and return values. The compiler now
tries to emit friendlier errors that suggest fixes for problems.
import-macros
for more flexible macro module
loadingrshift
, lshift
,
bor
, band
, bnot
, and
bxor
macroexpand
helper to expand macro forms during
compilationmacrodebug
utility macro for printing expanded
macro forms in REPLpick-values
and pick-args
macrosFENNEL_DEBUG=trace
__fennelview
metamethod for custom
serializationdofile
would report the wrong
filenameinclude
of Lua modules that
lack a trailing newlineThis release mostly contains small bug fixes.
include
could not be nested without
repetitionelse
to emit twice in some
contextsThis release mostly contains small bug fixes.
--load FILE
argument to command-line
launchereach
to work with raw iterator valuesThis release introduces docstrings as well as several new features to the macro system and some breaking changes; the most significant being the new unquote syntax and the requirement of auto-gensym for identifiers in backtick.
include
special form to selectively inline modules
in compiled outputdoc
for displaying them
in repl#
special with length
hashfn
and #
reader macro for
shorthand functions like #(+ $1 $2)
macro
to make defining a single macro easier(comment)
special which emits a Lua comment in the
generated source:detect-cycles? false
in fennelview to turn off
"#<table 1>" outputx#
syntax for auto-gensym inside backtick:one-line
output in fennelview--require-as-include
to inline required modules in
compiled output--eval
argument to command-line launcherFENNEL_PATH
to
path
?
in pattern
matchingreadline.lua
is
available--globals
and --globals-only
options
to launcher script(foo:bar baz)
;
disallow :
in symbolslambda
argument checks when using
destructuringmatch
luaexpr
and
luastatement
for a single lua
special@
(unquote) with ,
; comma is
no longer whitespace~
in symbols other than
~=
This release mostly contains small bug fixes.
not=
as an alias for ~=
in-scope?
which caused
match
outer unification to fail~=
comparisonsThe second minor release introduces backtick, making macro authoring much more streamlined. Macros may now be defined in the same file, and pattern matching is added.
-?>
and -?>>
macrosmatch
macro for pattern matchingmacros
@
(later changed to ,
)--add-package-path
and
--add-fennel-path
to launcher scriptThis release contains a few small bug fixes.
The first real release sees the addition of several "creature comfort" improvements such as comments, iterator support, line number tracking, accidental global protection, pretty printing, and repl locals. It also introduces the name "Fennel".
->
and ->>
macrosvar
; disallow regular locals from being setglobal
; refuse to set globals without itrequire-macros
//
for integer division on Lua 5.3+fennel.dofile
and fennel.searcher
for
require
supportpartial
local
doto
macro:
for method callseach
lambda
/λ
for nil-argument-checked
functionswhen
&
.
formpack
,
$
, block
, *break
,
special
defn
macroThe initial version (named "fnl") was created in 8 days and then set aside for several years.