Backwards-incompatible changes are marked in bold.
- Fix a bug when the repl does completion on tables with a function metatable index
- Change how auto-gensym prefixes are calculated in compilation output
- Add separate
FENNEL_MACRO_PATHenvironment variable forfennel.macro-path - Add separate
fennel.macro-pathfor searching for macro modules - Fix a bug with strict global checking in macro modules
- Make macro tables shadow runtime tables more consistently
- Add
,complete foorepl command - Add
fennel.syntaxfunction describing built-ins - Add
accumulatemacro - Keep gaps when printing sparse sequences; see
max-sparse-gapoption infennel.view
- Add Fennel for Clojure Users guide
- Never treat
_ENVas an unknown global - Fix multi-value destructuring in pattern matches that use
where - Fix a bug around disambiguating parens in method calls
- Improve behavior of
?.when used directly on nil - Fix a bug where line number correlation was thrown off in macros
- Fix a bug where
--use-bit-libwas not propagating to the REPL - Fix a launcher bug where
-vwas not implemented as an alias for--version
- Fix a bug in compiled output for statement separators in LuaJIT
- Add
--use-bit-libflag to allow bitwise operations to work in LuaJIT - Add
macro-searcherstable for finding macros similarly topackage.searchers - Support
&asinside pattern matches - Include stack trace for errors during macroexpansion
- The
symfunction in compile scope now takes a source table second argument - Support
:untilclauses for early termination in all loops - Support
:escape-newlines?and:prefer-colon?options in fennel.view - Add nil-safe table access operator
?. - Add support for guards using
where/orclauses inmatch - Allow symbols to compare as equal in macros based on name
- Fix a bug where newlines were emitted with backslashes in fennel.view
- Fix a bug in the compiler sandbox where requiring had the wrong scope
- Improve compiler sandboxing to copy standard tables and protect metatables
- Fix an issue where loading nested copies of Fennel would fail
- Fix a bug where sparse tables were displayed incorrectly in fennel view
- Ensure the compiler runs under strict mode
- Fix a bug where certain numbers would be emitted incorrectly
- Allow the parser to optionally include comments in the parsed AST
- The fennelview module is now incorporated into the compiler as
fennel.view - Fully rewrite fennelview for better indentation handling; see fennelview docstring for detailed description of API changes
- Improve printing of destructured args in function arglist in
doc - Allow plugins to provide repl commands
- Fix a bug where decimal numbers would be emitted with commas in some locales
- Label auto-generated locals in Lua output for improved readability
- Fix the behavior of
...insideeval-compiler - Warn when using the
&character in identifiers; will be disallowed later - Add whole-table destructuring with
&as - Add list/table "comprehension" macros (
collect/icollect) - Numbers using underscores for readability may not begin with an underscore
- Provide
...arguments consistently with Lua when requiring modules - Fix a bug where
import-macroswould not respect certain compiler options - fennelview: respect presence of
__fennelviewmetamethod on userdata metatables - Fix a bug where shebang caused incorrect sourcemapped row/col in stacktraces
- Improve printing of multiple return values in the repl
- Add repl commands including
,reload; see,helpfor a full list - Fix several bugs in the linter
- Fix a bug where
--no-compiler-sandboxdid not apply inimport-macros - Fix a bug where compiler sandboxing makes
macrodebugfail to print correctly - Correct
--no-sandbox-compilerto--no-compiler-sandboxin help/docs - Fix a bug in
:when used with methods that are not valid Lua names
This 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.
- Change table reference notation in fennelview to use
@ - Fix a bug where long arglists could get jumbled.
- Add plugin system.
- Sandbox compiler environment and emit a warning when it leaks.
- Fix a bug where repls would fail when provided with an overridden env.
- Expose
list?andsym?in compiler API. - Fix a bug where method calls would early-evaluate their receiver.
- Fix a bug where multi-arity comparisons would early-evaluate their arguments.
- Add
--luaCLI flag for specifying a custom Lua command/executable. (#324)
This release features a version of the Fennel compiler that is self-hosted and written entirely in Fennel!
- Fix a bug where lambdas with no body would return true instead of nil.
- Fix a bug where global mangling would break when used with an environment.
- Fix a bug where globals tracking would lose track of allowed list.
- Fix a bug where top-level expressions in
includewould get skipped. - The "fennelfriend" module is now incorporated into the compiler, not separate.
This release mostly includes small bug fixes but also adds the
with-open macro for automating closing file handles, etc.
- Fix a bug where multiple
includecalls would splice locals incorrectly - Support varargs in hashfn with
$...(#298) - Add
with-openmacro for auto-closing file handles (#295) - Add
--native-moduleand--native-libraryto--compile-binarycommand - Make autogensym symbols omit "#" when appending unique suffix
- Fix a bug where autogensyms (using
#) couldn't be used as multisyms (#294) - Add
fennel.searchModulefunction to module API - Fix a bug causing
includeto ignore compiler options - Fix a bug causing the repl to fail when
$HOMEenv var was not set
This release mostly includes small bug fixes, but also introduces a very experimental command for compiling standalone executables.
- Experimental
--compile-binarycommand (#281) - Support shebang in all contexts, not just dofile
- Pinpoint source in compile errors even when loading from a string
- Fix a bug where included modules could get included twice (#278)
- Fix a 0.4.0 bug where macros can't expand to string/boolean/number primitives (#279)
- Fix a bug in macros returning forms of a different length from their input (#276)
This 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.
- Add
import-macrosfor more flexible macro module loading (#269) - Ensure deterministic compiler output (#257)
- Add bit-wise operators
rshift,lshift,bor,band,bnot, andbxor - Friendlier compiler/parse error messages with suggestions
- Omit compiler internal stack traces by default unless
FENNEL_DEBUG=trace - Add support for
__fennelviewmetamethod for custom serialization - Fix a bug where
dofilewould report the wrong filename - Fix bug causing failing
includeof Lua modules that lack a trailing newline (#234) - Introduce
pick-valuesandpick-argsmacros (aslimit-*: #246, aspick-*: #256) - Add new
macroexpandhelper to expand macro forms during compilation (#258) - Add
macrodebugutility macro for printing expanded macro forms in REPL (#258)
This release mostly contains small bug fixes.
- Fix a bug where
includecould not be nested without repetition (#214) - Fix a bug where globals checking would mistakenly flag locals (#213)
- Fix a bug that would cause incorrect filenames in error messages (#208)
- Fix a bug causing
elseto emit twice in some contexts (#212) - Dissallow naming a local the same as global in some contexts
This release mostly contains small bug fixes.
- Look for init file for repl in XDG config dirs as well as ~/.fennelrc (#193)
- Add support for
--load FILEargument to command-line launcher (#193) - Fix
eachto work with raw iterator values (#201) - Optionally check for unused locals with
--check-unused-locals - Make repl completion descend into nested table fields (#192)
- Fix repl completer to correctly handle symbol mangling (#195)
This 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.
- Fix a bug where errors would show incorrect line numbers
- Add support for docstrings and
docfor displaying them in repl - Support
:detect-cycles? falsein fennelview to turn off "#<table 1>" output - Disallow non-gensym identifiers in backtick/macros
- Support
x#syntax for auto-gensym inside backtick - Fix a bug in
lambdaarity checks when using destructuring - Support
:one-lineoutput in fennelview - Add
includespecial form to selectively inline modules in compiled output - Add
--require-as-includeto inline required modules in compiled output - Add
--evalargument to command-line launcher - Add environment variable
FENNEL_PATHtopath - Fix a few bugs in
match - Remove undocumented support for single-quoted strings
- Add support for guard clauses with
?in pattern matching - Support completion in repl when
readline.luais available - Add
--globalsand--globals-onlyoptions to launcher script - Remove
luaexprandluastatementfor a singleluaspecial - Improve code generation for
ifexpressions in many situations - Alias
#special withlength - Replace
@(unquote) with,; comma is no longer whitespace - Disallow
~in symbols other than~= - Add
hashfnand#reader macro for shorthand functions like#(+ $1 $2) - Allow hashfn arguments to be used in multisyms
- Add
macroto make defining a single macro easier - Add
(comment)special which emits a Lua comment in the generated source - Allow lua-style method calls like
(foo:bar baz); disallow:in symbols
This release mostly contains small bug fixes.
- Add
not=as an alias for~= - Fix a bug with
in-scope?which causedmatchouter unification to fail - Fix a bug with variadic
~=comparisons - Improve error reporting for mismatched delimiters
The 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.
- Prevent creation of bindings that collide with special forms and macros
- Make parens around steps optional in arrow macros for single-arg calls
- Allow macros to be defined inline with
macros - Add
--add-package-pathand--add-fennel-pathto launcher script - Add
-?>and-?>>macros - Add support for quoting with backtick and unquoting with
@(later changed to,) - Support key/value tables when destructuring
- Add
matchmacro for pattern matching - Add optional GNU readline support for repl
- Fix a bug where runtime errors were not reported by launcher correctly
- Allow repl to recover gracefully from parse errors
This release contains a few small bug fixes.
- Fix luarocks packaging so repl includes fennelview
- Fix bug in the repl where locals-saving would fail for certain input
- Fix launcher to write errors to stderr, not stdout
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".
- Save locals in between chunks in the repl
- Allow destructuring in more places
- Remove redundant
defnmacro - Add
dotomacro - Support newlines in strings
- Prevent typos from accidentally referring to unknown globals
- Improve readability of compiler output
- Add
->and->>macros - Remove deprecated special forms:
pack,$,block,*break,special - Support nested lookup in
.form - Add
var; disallow regular locals from being set - Add
global; refuse to set globals without it - Make comparison operators variadic
- Support destructuring "rest" of a table into a local with
& - Add fennelview pretty-printer
- Add
require-macros - Add
//for integer division on Lua 5.3+ - Add
fennel.dofileandfennel.searcherforrequiresupport - Track line numbers
- Add
partial - Add
local - Support binding against multiple values
- Add
:for method calls - Compile tail-calls properly
- Rename to Fennel
- Add
each - Add
lambda/λfor arity-checked functions - Add
when - Add comments
The initial version (named "fnl") was created in 8 days and then set aside for several years.