Morel release history and change log
August 13, 2026 · View on GitHub
For a full list of releases, see GitHub.
0.9.0 / 2026-08-13
Release 0.9.0 is a large release that adds a Datalog sub-language, a constraint solver that can evaluate queries over unbounded variables, several standard library structures, and a much improved shell.
Morel now speaks
Datalog, with
stratified negation and semi-naive evaluation. Datalog.execute
translates a Datalog program into Morel and runs it on the usual engine;
the relations it computes are returned as ordinary Morel values, so a
from query can consume them. See the
Datalog reference.
Queries no longer need to say where their rows come from. Given constraints on unbounded variables, Morel inverts the predicates to deduce a set of rows to scan, tightening the deduced bounds using feasibility-based bound tightening and, where that is not enough, a SAT solver. An unbounded scan may now have an arbitrary pattern, including a type annotation, and yields each satisfying assignment once, in the order of its type. Related work adds outer joins and dependent joins.
Query syntax gains
yieldAll (a flatMap
step), the
safe navigation operator ?.,
postfix method calls
such as s.size (), the
record modifiers
extend, remove, rename and replace, and
dot syntax for tuple fields.
A yield, yieldAll or group step can also
name its output with a single variable,
as in yield v = e.
The built-in library adds the
Date,
Range,
StringCvt,
Time,
Variant and
Word
structures, and the top-level environment is
aligned with Standard ML.
The shell has
syntax highlighting,
command history, and
an -e flag to
evaluate a single command. Values are printed by a new
PP pretty-printer,
and tabular mode renders
nested collections,
option values and
enum values.
Internally, evaluation moved from a chain of environments to a stack, and tail-call optimization means that recursion depth is no longer bounded by the Java stack; that in turn allows N Queens to be solved for arbitrarily large N.
Breaking changes:
- The
withrecord modifier is now calledreplace(#432) - A
yield,yieldAllorgroupstep of the formv = enow bindsv, rather than testing whethervequalse; writeyield (v = e)for the equality test (#387) - An unbounded scan has type
listrather thanbag, yields its values in the natural order of their type, and yields each value once; previously the order depended on which generator the optimizer chose, and duplicates were possible. A bounded scan is unaffected. (#443) ordinalin a join'soncondition is now the ordinal of the candidate pair of rows, that is, the number of times theoncondition has been evaluated; previously it was the ordinal of the left-hand row (#435)
Contributors: Guy Freeman, Hellblazer, Julian Hyde
Features
- Unbounded scans should be ordered and distinct (#443)
- Allow unbounded scan to have arbitrary pattern, including type annotation
(
from b: bool) (#440) StringCvtstructure, andfmt,scan,toStringandfromStringfunctions in various structures (#371)- Extend tabular mode to render enum values as scalars (#441)
- Add
extend,removeandrenamerecord modifiers, and replacewithwithreplace(#432) - Qualified types for overloaded identifiers (#426)
- Let-polymorphism: generalize values bound in a local
let(#427) - Syntax highlighting in the shell (#413)
- Shell command history (#414)
- Syntax that allows
yield,yieldAllandgroupto produce a single "binder" variable (#387) - Add
type_stringoperator (#406) - Add
PPstructure (pretty-printer), use it to print values, and pretty-print lists and types compactly, like SML/NJ (#398, #339) - Add the
wordtype andWordstructure (#396) - Align the top-level environment with Standard ML (#395)
- Ground an unbounded variable bounded by
elemover a range - Disallow unbound type variables in
typeanddatatypedeclarations (#356) - Evaluation of dependent joins (#275)
- Make the built-in structures consistent in Java and Rust implementations (#385)
- Outer joins (#75)
- Add safe navigation operator
?.(#378) - Extend tabular mode to render
optionvalues (#382) - Add
yieldAllstep, a flatMap forfromexpressions (#257) - Extend tabular mode to fold strings, and to display nested collections, nested records and record options (#376)
- Use feasibility-based bound tightening (FBBT) to deduce and strengthen variable bounds (#373)
- Extend list constructor to allow ranges, e.g.
where i elem [0..^10, 20, 100..](#372) - Add attributes and doc comments (#369)
- Add
Sys.parseTreebuilt-in function for AST inspection - Include source position in interactive compile-error messages
- Add
raisecommand (#364) - Display whole
realvalues without trailing.0, in both classic and tabular output (#358) Rangestructure (#338)- Add Darn notebook kernel and MorelHighlighter (#345)
Datestructure (#278)Timestructure (#351)- Add
nowandtimeZoneproperties for deterministic date/time behavior (#352) - Implement tail-call optimization via trampolining (#151)
- Add postfix method-call syntax
x.f argandx.f (a,b).g (c)(#346) - Invert
caseexpressions with multiple arms (#341) - Aggregate functions should adapt to the collection type of the input (#271)
- Exclude the
Teststructure from the environment, controlled by a newexcludeStructuresproperty (#342) - Datalog (#323)
- Inline functions (and other expressions) that are not in the same compile unit (#223)
- Implement queries with unbounded variables by inverting predicates (#217)
- The built-in
absfunction should be overloaded, and can apply to bothintandreal(#318) - Add
-e/--evaloption to themorelscript, to execute a single command (#333) - Access tuple fields using dot syntax, e.g.
tuple.1(#332) - Allow nested block comments (#306)
- Add
variantdatatype andVariantstructure (#324)
Bug-fixes and internal improvements
- Inlining a subquery that ends with
yieldbuilds an invalid query (#444) - Type annotation containing
typeofthrowsAssertionError(#445) - Shell loses input when a line holds a comment or more than one statement (#439)
- Shell highlighter should color a keyword inside backticks as an identifier (#437)
- Source span of a function application omits the parentheses around a grouped argument (#422)
ordinalin a join'soncondition should be the ordinal of the candidate pair (#435)- Change implementation of
ordinalfrom a slot to a row field (#434) - Backswing from morel-go (#428)
- Redefining a type name with
typeordatatypebreaks the new type and values of the old one (#429) - Row binder gives wrong result or crashes when the binder name equals the record's only field name (#416)
- Don't assume that
NaNis positive (#425) - Unify
listandbagin type resolution via an orderedness atom (#407) Real.floor,Real.ceil, andReal.roundgive wrong results (#423)maxandmingive wrong answers or crash forword,real, and composite typed arguments (#421)maxandminover an empty collection should raiseEmpty(#419)- Character constant that is not exactly one character crashes the shell (#420)
- Shell highlighter crashes when typing a string escape (#415)
- Simplify
MatchCodeinCompiler, and other cleanups - Collections of collections crash or corrupt values on the Calcite path (#410)
- Direct calls to
List.concat,exceptandintersectcrash or give wrong answers on the Calcite path (#408) - Multi-operand
except/intersectdrop operands beyond the second on the Calcite interpreter path (#402) - Incorrect results for
exceptandintersectqueries pushed to Calcite (#391) - Set operations (
except,intersect,union) crash afterdistinctand over records groupanddistinctshould preserve arrival orderthroughover a rewritten function throwsNullPointerExceptionelementsused outsidecomputecrashes the compiler- Launcher should not collapse multiple file arguments (#392)
- Lexical error should not crash the shell (#383)
- Unparser should quote reserved-word identifiers (e.g.
left,o,ordinal) - Report a source position for more type errors, not
0.0-0.0(#380) - Invalid inlining of a correlated subquery
Fn.repeatwith a negative count should raiseDomainimmediately (#354)- You're going to need a bigger SAT Solver (#367)
- Compute correct results for cousin-style transitive closure queries
- Reject
(t1, ..., tn)as a stand-alone tuple type (#360) - Composite value declarations should not assign
it(#355) - Constructor values should pretty-print their payloads according to their type
- Merge multiple range constraints into a single call to
Range.discreteSetOf(#338) - Migrate evaluation from
EvalEnvchain toStack(#349) - Predicate inversion should filter by outer-scope variables (#347)
- Share type variable scope within declarations so that 'a in annotations refers to the same type (#343)
- Refactor predicate inversion logic
- Remove
@Nullablefrom the type parameter bounds ofclass Pair - Precedence of list constructor is wrong (#293)
- Add method
Ord.allMatchIndexed - Add method
Static.transformToMap - Change signature of method
CoreBuilder.recordPat - In a zero-field relation,
distinctshould give different result togroup {}(#328) - Disallow '0' and integer literals starting with '0' as record labels
- Inline
case xwhenxis constant (#330) - Add method
Type.elementType() - Refactor type constructor lookup
- In
PairList, add methodsasSortedMapandwithSortedKeys(#326)
Build and tests
- Lint should ensure that block comment continuation lines have a '*' prefix (#442)
- Script test harness discards the output of a statement that has no expected output (#438)
ShellTestfails intermittently, and the shell writes its input twice- Add a test,
dual.smli, that runs each query locally and in Calcite (#412) - Add
git-commit-id.skipproperty to disablegit-commit-idplugin - Add
built-in/datalog.smli, and check that every structure has a test script - Add a
matchStrictproperty, to enable strict output matching, and move pretty-printing tests intopretty.smli(#398) - Long method-call chain causes javac StackOverflowError
- Lint: Add rule to encourage converting consecutive line comments
(*)into block comments(*...*)(#399) - Add lint rule that a class has at most one primary constructor (#366)
- Split
built-in.smliinto one file per structure (#361) - Add graph algorithm examples based on "EmptyHeaded" paper (#233)
- Run longest-running script tests first to minimize total parallel duration
- Solve the "N Queens" problem (#148)
- Linter should include target line number in sort-violation messages (continues #316)
- Test suite hangs intermittently due to JDBC connection pool exhaustion and cyclic wait for connections (#340)
- Linter should cover Markdown files
- Make test scripts resilient to changes in the order of
bagvalues, and fail to match if types are different (#334) - Linter should police Morel block comments (#335)
- Linter should prevent fully-qualified class names in Java code (#337)
- Add function
Sys.planEx phase, to print extended plans for testing (#329) - Add
variant.smli, a test for thevariantdatatype (#324) - Script framework incorrectly strips output lines inside block comments (#306)
- Allow running GitHub action on a specified commit
Component upgrades
- Remove unused dependency
jackson-dataformat-toml(its last use went away when documentation metadata moved to.sigfiles) - Bump calcite from 1.41.0 to 1.42.0
- Bump central-publishing-maven-plugin from 0.8.0 to 0.11.0
- Bump checkstyle from 12.1.2 to 13.10.0
- Bump guava from 33.5.0-jre to 33.6.0-jre
- Bump javacc-maven-plugin from 3.0.3 to 3.8.0
- Bump jspecify from 1.0.0 to 1.0.1
- Bump maven-compiler-plugin from 3.14.1 to 3.15.0
- Bump maven-enforcer-plugin from 3.6.2 to 3.6.3
- Bump versions-maven-plugin from 2.19.1 to 2.21.0
Site and documentation
- Move documentation metadata from
functions.tomlto.sigfiles (#368) - Maven Central badge in README is broken
- Split documentation of the built-in functions into a page per structure, and document methods (built-in functions that allow postfix calls) (#348)
- Generate a table of all built-in properties
- Documentation for
Relational.iterate - Release 0.9.0 (#446)
0.8.0 / 2025-11-23
Release 0.8.0 has improvements to aggregate query syntax, the type system, and the standard library.
The syntax of aggregate queries is
now more powerful.
You can now compute expressions before and after aggregation, for
example 2.0 * avg over (units * unitPrice). The elements
collection lets you access the
raw elements of a group
and even write subqueries in the compute clause.
The type system includes
type aliases
via the type keyword. The typeof operator lets you
extract an expression's type.
The built-in library adds the
Either,
Fn, and
ListPair
structures.
Breaking changes:
- In an aggregate query, the
ofkeyword is replaced byover, and composite keys and compute expressions must be records, written with the usual{...}syntax (#288)
Contributors: Julian Hyde
Features
- Don't allow
onafter singleton scan (denoted by=) (#317) - Add properties "productName", "productVersion", "banner" (#319)
- Add signatures for standard library, and verify that built-in types match
- Parse
signature(#315) - Support
opkeyword (operator sections) (#311) - Add
elementscollection, available incomputeclause, to enable advanced aggregation (#304) Eitherstructure (#302)Fnstructure (#301)- Improve syntax of
groupandcomputesteps (#288) - Add
typeofoperator, to extract an expression's type (#291) - Type abbreviations, also known as alias types, declared using the
typekeyword (#285) - Parse exceptions should indicate the position in the source code where the exception occurred (#297)
ListPairstructure (#295)- Quoted type names (#289)
Bug-fixes and internal improvements
- The
intersectandexceptsteps should count, and preserve order (#321) - Various refactorings and minor bug-fixes to match Rust (#308)
- Refactor: Normalize order of several
enumtypes - When encoding record types in unifier, quote field names that contain ':'
- Add directive
lint:sort untilto ensure that code regions are sorted (#316) - Refactor: In
class StepEnvadd fieldordered Ast.refshould translate theList.mapfunction to#map List, not tomap List- The "cannot derive label for compute expression" error currently causes a crash (#305)
- In
class Pair, addListvariants of methodsallMatch,anyMatch,noneMatch,firstMatch,forEach - In
interface PairList, add methodfromTransformed - Refactor: Move
interface RowSinkout ofclass Codesto top-level - Lint: Sort constants in
class Codes - Refactor: Make
ImmutablePairList.copyOfmore tolerant - In
class PairList, add methodssubList,first,skipFirst - Implementations of built-in functions should be in n-ary form, with a helper to curry them (#298)
- Add method
ImmutablePairList.fromTransformed - Refactor: Add
copymethods for various AST nodes - Assert that in an assignment
val p = e, pattern and expression have same type - Environment for an
EnvVisitorshould be the output from the previous step - Refactor: Change type of
Ast.Record.argsfromSortedMaptoPairList - Add method
PairList.toImmutableSortedMap - Refactor: When printing the AST of a record constructor, omit obvious labels
- Refactor: Change key of
class Ast.RecordfromStringtoAst.Id
Build and tests
- Add validation-mode to scripts, with syntax
:t, to check an expression's type without evaluating (#310) - Add an
--echoflag to script runner (#309) - In CI, bump actions
checkoutfrom 1 to 4, andsetup-javafrom 1 to 4 - Refactor: Add
@Nullableannotations where necessary - Lint: Sort enum constants in
class BuiltIn - Decompose definition of built-in functions into prototype and description
- Lint: Sort various sections in Maven POM file
- Refactor: Add
NullMarkedannotation to every package, so that fields and parameters are not-null by default - Run
.smliscripts from the command-line (#300) - Lint: Add another check for broken strings
- Lint: Assert that regions of a file are sorted
Component upgrades
- In Maven, use central-publishing-maven-plugin
- Bump build-helper-maven-plugin from 3.6.0 to 3.6.1
- Bump calcite from 1.40.0 to 1.41.0
- Bump checkstyle from 10.25.0 to 12.1.2
- Bump guava from 33.4.8-jre to 33.5.0-jre
- Bump jackson from 2.19.0 to 2.20.1
- Bump java from 8..24 to 8..25
- Bump junit-jupiter from 5.13.1 to 5.14.1
- Bump maven from 3.9.9 to 3.9.11
- Bump maven-compiler-plugin from 3.14.0 to 3.14.1
- Bump maven-enforcer-plugin from 3.5.0 to 3.6.2
- Bump maven-javadoc-plugin from 3.11.2 to 3.12.0
- Bump maven-site-plugin from 3.12.1 to 3.21.0
- Bump maven-surefire-plugin from 3.5.3 to 3.5.4
- Bump scott-data-hsqldb from 0.2 to 0.3
- Bump versions-maven-plugin from 2.18.0 to 2.19.1
Site and documentation
- Release 0.8.0 (#320)
0.7.0 / 2025-06-07
Release 0.7.0 is a huge release with major changes to query syntax and semantics.
The largest change is queries over
ordered and unordered collections.
For this, we introduced a
bag type for unordered collections
(complementing the existing list type), a new
unorder step, and an
ordinal expression.
These query changes required a type inference algorithm that can solve type
constraints, which in turn allows
operator overloading (with
new over and inst keywords).
Other changes to query syntax were
set operators (union, intersect, except) as steps,
atomic yield steps, the
current keyword for
referencing the current row, and
simplified syntax for the order step.
We have implemented the
Char and
String structures as
defined by the
Standard ML Basis Library.
The scott sample database now uses
pluralized table names
like emps instead of EMP.
Breaking changes:
- The
scottsample database maps theEMPtable toemps, and pluralizes the other table names likewise (#255) - The syntax of the
orderstep is simplified, and thedesckeyword is removed (#244) - Queries distinguish ordered from unordered collections, and several
operations now return the new
bagtype rather thanlist(#273, #235)
Contributors: Julian Hyde
Features
- Simplify the syntax of the
orderstep, and remove thedesckeyword (#244) - Add built-in datatype
Descending, and methodRelational.compare, for type-based orderings (#282) Stringstructure (#279)unorderstep (#277)ordinalexpression (#276)- Add
currentkeyword, representing the current row in a query (#265) - Ordered and unordered queries (#273)
- Operator overloading (
overandinstkeywords) (#237) - Add a
bagtype, andBagstructure, to represent unordered collections with duplicates allowed (#235) - Allow set operators (
union,intersect,except) as steps in a pipeline (#253) - Allow atomic
yieldsteps at any point in the pipeline (#262) - In the
scottsample database, map theEMPtable toemps(and pluralize other table names) (#255) Charstructure (#264)
Bug-fixes and internal improvements
- Degenerate joins (#287)
- Conversion of SQL
DATE,TIME,TIMESTAMPvalues to Morel strings should not depend on locale (#286) - Refactor: Add
enum BuiltIn.Constructor - Derived type is incorrect if
joinfollows recordyield - In unifier, use working set rather than depth to prevent infinite recursion
- Tune method
TypeSystem.unqualified(Type) - In
Static, add methodsfilterEager,allMatch,anyMatch,noneMatch - Unifier should not overwrite previously resolved variables
- Refactor
TypeResolver
Build and tests
- Lint: Check version in
READMEandREADME.md - Lint: Ban smart quotes
- Refactor: Make tests for exceptions more concise
- Test scripts should report errors relative to first token after whitespace and comments (#274)
- Lint: Break up large method
- Lint: Check for
<code> ... </code>spread over multiple lines - When printing plans, handle list values better
- In
interface RecordLikeType, add methodList<String> argNames() - Lint: Disallow string literals that are broken or contain newline
Component upgrades
- Bump calcite from 1.39 to 1.40
- Bump checkstyle from 10.23.1 to 10.25.0
- Bump junit-jupiter from 5.12.2 to 5.13.1
Site and documentation
- Release 0.7.0 (#284)
- Decompose the documentation for built-in functions and structures (#269)
- Typos in query reference
0.6.0 / 2024-05-02
Release 0.6.0 generalizes queries with
universal and existential quantification
(forall and exists) and adds a keyword for logical implication (implies).
The new with keyword allows
functional update of record values.
Usability of the shell is improved by
tabular mode,
and
showAll
and
clearEnv
functions.
In preparation for operator overloading we have tuned the performance of the unifier that powers Morel's type-inference.
Contributors: Julian Hyde
Features
- Tabular mode (#259)
- Add
withoperator (functional update notation for record values) (#249) - Add function
Sys.showAll ()(#260) - Add function
Sys.clearEnv ()(#251) - Tune unifier (#246)
- Universal and existential quantification (
forallandexists) and implication (implies) (#241)
Bug-fixes and internal improvements
- Scalar
yieldafter singleton recordyieldthrows "Conversion to core did not preserve type" (#253) skipandtakein query with unbounded variable give error (#258)- Add method
PairList.viewOf(Map) - Allow
Systo be evaluated and printed in the shell - Refactor
NameGenerator - When unparsing Morel, try to generate qualified identifiers less often (#252)
- Refactor: Define built-in datatypes in an enum
- Refactor: Omit declarations from type-unification
- In
PairList, add a staticcopyOfmethod, and enablesetandremovemethods - The
toStringmethods ofRelListandBindingshould not print the contents of tables - Inliner generates invalid plan if dead code occurs in a nested
let(#250) - Optimize method
Static.transformEagerforListandCollectionarguments (#248) - Cannot translate an expression that contains type annotations (#247)
- In
class Static, add methodslast,skipLast
Build and tests
- Reduce CI timeout
- Checkstyle should require that braces around blocks in
case:are at the start of the line - Enable google-java-format (#245)
Component upgrades
- Bump calcite from 1.38 to 1.39
- Bump checkstyle from 10.21.4 to 10.23.1
- Bump guava from 33.4.0-jre to 33.4.5-jre, and raise minimum from 21.0 to 23.1-jre
- Bump guava from 33.4.5-jre to 33.4.8-jre
- Bump jdk from 21 to 24; we still support all Java versions JDK 8 and higher
- Bump junit-jupiter from 5.12.0 to 5.12.2
- Bump maven from 3.8.4 to 3.9.9
- Bump maven-surefire-plugin from 3.5.2 to 3.5.3
Site and documentation
- Release 0.6.0 (#261)
- Document query expressions
- In release notes, use the '0.x.0' format for releases
0.5.0 / 2025-03-04
Release 0.5.0 extends the syntax of the from expression
(distinct,
into and through keywords,
comma-separated scans,
and unbounded variables).
Morel now allows
fn to have multiple branches, like case.
We have improved code generation for a singleton case expression,
and implemented the
Int structure as defined by the
Standard ML Basis Library.
Contributors: Julian Hyde
Features
- Add
distinctkeyword as shorthand forgroupwith all fields and no aggregate functions (#231) - Allow lambda (
fn) to have multiple branches, similar tocase(#230) Intstructure (#228)- Add
intoandthroughclauses tofromexpression (#171) - Add function
Interactive.useSilently - Allow comma-separated scans in
join, andonin thefromclause (#216) - Allow unbounded variables (
fromandjoinwithoutin), and removesuchthatkeyword (#202) - Inline singleton
case - Require that a non-terminal
yieldstep is a record expression (#213)
Bug-fixes and internal improvements
- Number type variables left-to-right
- Improve formatting of function types
- Validate field references
- Add
Core.Tuple.forEach - Add
Static.findandPairList.firstMatch - Add
RecordType.mutableMap - Make
file.smlitest less flaky
Build and tests
- Add Australia, cakes tests from MiniZinc tutorial
- Enable tests for #43
Component upgrades
- Bump calcite from 1.36 to 1.38
- Bump build-helper-maven-plugin from 3.5.0 to 3.6.0
- Bump checkstyle from 10.12.7 to 10.21.4
- Bump guava from 33.0.0-jre to 33.4.0-jre
- Bump hamcrest from 2.2 to 3.0
- Bump hsqldb from 2.7.2 to 2.7.4
- Bump junit.jupiter from 5.10.1 to 5.12.0
- Bump maven-checkstyle-plugin from 3.3.1 to 3.6.0
- Bump maven-compiler-plugin from 3.12.1 to 3.14.0
- Bump maven-enforcer-plugin from 3.4.1 to 3.5.0
- Bump maven-javadoc-plugin from 3.6.3 to 3.11.2
- Bump maven-project-info-reports-plugin from 3.5.0 to 3.9.0
- Bump maven-surefire-plugin from 3.2.3 to 3.5.2
- Bump versions-maven-plugin from 2.16.2 to 2.18.0
Site and documentation
- Copy-edit documentation
- Add javadoc badge to README
- Release 0.5.0 (#243)
0.4.0 / 2024-01-04
Release 0.4.0 extends from syntax, adding
suchthat,
take and skip
clauses; allows identifiers to be
quoted using backticks;
improves pretty-printing of
tuples and
long lines.
Contributors: Julian Hyde, Rette66
Features
- Add
takeandskiprelational operators (#204) - File reader, and progressive types (#209)
- Fold long types when printing (#210)
- Rename
Option.flattentoOption.join - Allow identifiers to be quoted using backticks (#71)
- Indent tuples when printing (#206)
- Define relations via constrained iterations, and introduce a
suchthatkeyword to use them (#129)
Bug-fixes and internal improvements
- Add
directoryproperty toSession - Add type parameter to
Core.Literal.unwrap()method FromBuildershould remove trivialyieldstep between two scan steps (#208)- Pattern that uses nested type-constructors should not be considered redundant (#205)
- Add utility methods
Static.transformandtransformEager - Cannot deduce type for
from b in [SOME true, NONE](#203) - Refactor: In
Unifier.Variable, store ordinal rather than computing it - Refactor: Rename
Ord.forEachtoforEachIndexed - In
CoreBuilder, addtuple(TypeSystem, Exp...), a more convenientapply - Simplify
EnvShuttle,EnvVisitorby addingpushmethod - Add
interface PairListandinterface ImmutablePairList - Add method
Static.nextPowerOfTwo Real.signBitgives different result on JDK 19/ARM (#201)
Build and tests
- Run
script.smlin tests - Detect and fix flaky tests (#207)
- Disallow static star import
- In the test suite, run arbitrary "lint" checks on code (#200)
- Idempotent mode for test scripts (#198)
- Add a test for various closure and recursion scenarios
- Allow CI runs to be triggered manually, and monthly
Component upgrades
- Bump build-helper-maven-plugin from 3.3.0 to 3.5.0
- Bump calcite from 1.32.0 to 1.36.0
- Bump checkstyle from 10.3.4 to 10.12.7
- Bump guava from 31.1-jre to 33.0.0-jre; increase minimum guava version from 19.0 to 21.0
- Bump hsqldb from 2.7.0 to 2.7.2
- Bump javacc from 7.0.12 to 7.0.13
- Bump jdk to 21; minimum jdk is still 8
- Bump jline from 3.21.0 to 3.25.0
- Bump junit-jupiter from 5.9.1 to 5.10.1
- Bump maven-checkstyle-plugin from 3.2.0 to 3.3.1
- Bump maven-compiler-plugin from 3.10.1 to 3.12.1
- Bump maven-enforcer-plugin from 3.1.0 to 3.4.1
- Bump maven-javadoc-plugin from 3.4.1 to 3.6.3
- Bump maven-project-info-reports-plugin from 3.4.1 to 3.5.0
- Bump maven-release-plugin from 2.4.2 to 3.0.1
- Bump maven-scm-provider-gitexe from 1.9.1 to 2.0.1
- Bump maven-site-plugin from 3.12.1 to 4.0.0-M13
- Bump maven-source-plugin from 3.2.1 to 3.3.0
- Bump maven-surefire-plugin from 2.22.2 to 3.2.3
- Bump slfj from 2.0.3 to 2.1.0-alpha1
- Add versions-maven-plugin version 2.16.2
- Support JDK 19 and 20 (#199)
Site and documentation
- Release 0.4.0 (#211)
- Add Maven Central badge to
README.md
0.3.0 / 2022-10-02
Release 0.3.0 extends from syntax, adding an
order clause,
allowing multiple
yield,
group and where
steps in any order,
variable = value,
patterns in in.
The compiler now detects
redundant and exhaustive matches,
and supports
views and inlining.
We add the
use function
and standard structures
Math and
Real
to the standard library.
Integration with
Apache Calcite
allows us to translate whole programs to relational algebra.
Contributors: Gabriel Tejeda, Gavin Ray, Julian Hyde, Sergey Nuyanzin
Features
- Improve message when type resolution cannot deduce full record type (#165)
fromshould not have a singleton record type unless it ends with a singleton recordyield(#159)- Allow Calcite schemas to contain sub-schemas (#147)
- Type annotations in patterns, function declarations and expressions (#138)
- Analyze match coverage, detecting redundant and exhaustive matches (#55)
- Satisfiability prover
- Report positions in error messages and exceptions (#118)
- Allow identifiers to contain prime characters (
') (#105) - Polymorphic datatype (#70)
- Make functions top-level (#104)
- Layered patterns (
as), and compositeval(#103) Realstructure (#102)- Allow quick eager evaluation for functions/operators with more than one argument
- Print control (#96)
- Allow double-quote and backslash in string and char literals (#100)
Mathstructure (#88)- Floating point:
posInf,negInf,NaN, and negative zero - Wordle solver (#94)
- Mutually recursive functions (#95)
- Add
Relational.iterate, which allows "recursive queries" such as transitive closure - Add
computeclause, for monoid comprehensions (#69) - Add
usefunction, to read and execute source from a file (#86) - Join (#72)
- In
fromclause, allow 'variable = value' (#11) - Add function
Relational.only, which allows scalar sub-queries (#62) - In the shell (REPL), use prompt '
-' and continuation '=' (#65) - Add
Relational.existsfunction, and push it down to Calcite (#51) - Add
morel.lang, Morel language definition for the Linux 'highlight' command - Push
elem,notelemandnot ... elemdown to Calcite (as SQLINandNOT IN) (#60) - Allow multiple
yieldsteps infrom(#52) - Translate
List.filteras if user had writtenwhere; andList.maptoyield(#45) groupwith empty key should emit one row (#57)- Views (parameterized functions that return a relation) and inlining (#54)
- Optimize core language by inlining expressions (#53)
- Add a
morelCalcite UDF, to allow hybrid plans with a mixture of relational and non-relational (#42) - Translate to full Calcite algebra (#40)
- Core language (#46)
- Deduce types when a function is applied to a record selector (#48)
- Session variables (#44)
- Add
Sys.plan ()function, to display plans from the shell (#41) - Implement built-in
vectorandorderdata types (#39) - Implement built-in
optiondatatype and supporting functions (#38) - Raise exceptions in built-in functions (#37)
- Add
o(function composition) and@(list concatenation) operators (#25) - In record pattern, make labels optional, and disallow
...anywhere but end (#36) - Functions in relations (#34)
- Create objects for built-in structures
ListandString, and allowstructure.namereferences (#27) - Add
elem,notelemoperators (#33) - Add
union,intersect,exceptoperators (#30) - In
fromexpression, allowinto assign to pattern (#31) - Overload
+operator to allow bothintandrealarguments (#29) - Use
=rather thanasfor assigning column aliases ingroupandcompute(#24) - Default arguments for aggregate functions (#23)
- Allow
fromclause that defines 0 sources (#17) - Add
orderclause (#20) - In
computeclause ofgroup, applyofexpression to each row - In
from, allow multiplegroupandwhereclauses in any order, optionally followed byyield(#21)
Bug-fixes and internal improvements
- In compilation environment, use name + ordinal as the key, not just name, to accommodate variable copies caused by inlining (#179)
- Refactor: Move list methods into
Static - In
CoreBuilder, add methods for frequently used operations:equals,lessThan,onlyetc. - Allocate
boolliterals (trueandfalse) once inCoreBuilder - Keywords should be lower case
- Join variables are out of order in the rows sent to an aggregate function (#101)
- Script parser hangs if it encounters invalid syntax, and ignores comments at ends of files (#99)
- Refactor:
ArraytoList,ListtoConsumer - Refactor: move
Shellstate into newinterface Config - Tuning
- Rename
Option.jointoflatten(to make way for thejoinkeyword) - Keywords must be lower case (#73)
orderafteryieldgives 'unbound variable' error (#64)- In
computeclause, the key value should be available but is null (#67) - During inlining, use '_' as delimiter for qualified variable names
- Converting an empty list to relational algebra throws (#59)
- Add
Core.Yieldstep, and obsoleteCore.yieldExp - Rationalize order of Java 'import' statements
- Always inline atomic variables
- Add method
Static.shorterThan(Iterable, int) - Function argument
()should have typeunit, not 0-tuple (#49) - Type resolver does not resolve all fields of record types (#50)
- Improve field names, e.g. rename
Exp etoExp exp - Remove overrides of
toString()method inEnvironmentandEvalEnv - Factor
Converterout ofCalciteForeignValue - Refactor: rename
letfields - Add
enum Prop, for strongly-typed properties - Garbage-collect obscured variables (#13)
- AST that contains a call to
op +is unparsed incorrectly - Refactor
DataSet TypeVisitorshould visit parameter types insideDataType- Record pattern in
frommixes up fields if not in alphabetical order (#35) - Deduce type of polymorphic field in tuple or record
- Add tracing to
Unifier - Move
class TypeResolver.TypeMapto top-level - Correct order of numeric labels in records, and allow 0 as a label
- A record with a field named "1" is a record, not a tuple
- During validation, replace
From.sourcesif rewrites occur - The
sumaggregate function only works onintvalues (#28) - Cannot parse
()as pattern (#26) - Morel shell should work even if Apache Maven is not installed
AssertionError: unknown FUN_DECL(#19)- Character literal should unparse as
#"a", not"a"(#22)
Build and tests
- Bump
slf4j-apifrom 2.0.2 to 2.0.3 - Bump
hsqldbfrom 2.5.1 to 2.7.0 - Add
hsqldb-versionparameter to CI - Add
interface Tracer, so that tests can check for several events during the lifecycle - Bump
git-commit-id-pluginfrom 2.1.9 to 4.9.10 - Bump
checkstylefrom 7.8.2 to 10.3.4,maven-checkstyle-pluginfrom 3.0.0 to 3.1.2,maven-source-pluginfrom 2.2.1 to 3.2.1,maven-compiler-pluginfrom 2.3.2 to 3.10.1,build-helper-maven-pluginfrom 1.9 to 3.3.0 - Bump
calcite-corefrom 1.29.0 to 1.32.0 - Make
ShellTestmore robust - Turn off Travis CI
- Bump
hsqldbfrom 2.3.1 to 2.5.1,foodmart-data-hsqldbfrom 0.4 to 0.5,scott-data-hsqldbfrom 0.1 to 0.2 - Bump
maven-project-info-reports-pluginfrom 2.9 to 3.4.1 - Bump
maven-enforcer-pluginfrom 3.0.0-M1 to 3.1.0 - Bump
maven-javadoc-pluginfrom 3.0.1 to 3.4.1 - Bump
javacc-maven-pluginfrom 3.0.0 to 3.0.3 - Test Guava versions 19.0 to 31.1-jre in CI
- Bump
guavafrom 21.0 to 23.0 - Bump
jlinefrom 3.16.0 to 3.21.0 - Bump
maven-surefire-pluginfrom 3.0.0-M3 to 3.0.0-M7 - Bump
jsr305from 1.3.9 to 3.0.2 - Bump
slf4j-apifrom 1.7.25 to 2.0.2 - Bump
junit-jupiter.versionfrom 5.7.2 to 5.9.1 - Bump
javaccfrom 7.0.5 to 7.0.12 - Enable Dependabot
- Run CI on multiple Java versions, with Javadoc
ShellTestis non-deterministic (#107)- Add GitHub workflow to build and test
- Move project to 'hydromatic' GitHub organization
- Bump
mavenfrom 3.6.3 to 3.8.4 - Upgrade
calcite-coreto 1.29 - In parser tests, make sure there are no characters after the expression being parsed
- Refactor: Test fixture for
ShellTest - Refactor: Move
ScriptTest.Utilsto top-levelclass TestUtils - Bump
jlinefrom 3.12.1 to 3.16.0, to give support forxrvtterminals - Add tests for 'StrangeLoop 2021' talk
- Travis: quote variables, skip install
- Split
hybrid.smlout offoreign.sml - Docker login
LearningMatchermakes it easier to ensure that two queries have the same plan or same results- In tests, move implementations of
interface Matcherinto new utilityclass Matchers - Bump
calcite-coreto 1.27 - Run tests in parallel
- Bump
junitfrom 4.11 to 5.7.2,hamcrestfrom 1.3 to 2.2 (#47) - Add tests for blog post 'Aggregate queries in Morel'
- Add tests for blog post 'Word Count revisited'
- Bump
javaccfrom 4.0 to 7.0.5,maven-javacc-pluginfrom 2.4 to 3.0.0
Site and documentation
- Release 0.3.0 (#181)
- Update operator list in
README - In reference, re-order the
StringandVectorbuilt-in functions - Add example of matching regular expressions using combinators
- Add missed brackets and semicolons in
README - Improve Morel picture on home page
- Add functions and types to Morel language reference
- Add build status to home page
- Another example of a recursive query: Floyd-Warshall algorithm for shortest path in a weighted graph
- Add examples of recursive queries and fixed-point algorithms
- Add Morel logo and square image
0.2.0 / 2020-03-10
The first release since smlj was renamed to Morel includes major improvements to the type system and relational extensions. Some highlights:
- Functions and values can have polymorphic types, inferred as part of a Hindley-Milner type system;
- Relational expressions may now include a
groupclause, so you can evaluate aggregate queries (similar to SQLGROUP BY); - Foreign values allow external data, such as the contents of a JDBC database, to be handled as if it is in memory;
- Add built-in functions based on the
StringandListstructures in the Standard ML basis library; - Postfix field reference syntax makes Morel more familiar to SQL users;
- Add Morel language reference.
Features
- Improve pretty-printing: wrap long lines, and abbreviate long lists and deep structures (#15)
- In
fromclause, allow initializers to reference previous variables (#12) - In
group,as aliasis optional - Implicit labels in record expressions (#10)
- Allow
<expr>.<field>as an alternative syntax for#<field> <expr>(#9) - Rename project from 'smlj' to 'morel' (#7)
- Foreign values, including record values based on the contents of a JDBC schema (#5)
- Add
groupclause (andcomputesub-clause) tofromexpression, to support aggregation and aggregate functions (#6) - Polymorphic types
- Add
StringandListbasis functions
Bug-fixes and internal improvements
- Ensure that types derived for REPL expressions have no free type variables (#16)
- Tuple should equal record, and both equal
unitwhen empty (#14) - Add macros (special built-in functions that are 'called' at compile time to generate a new AST)
- Add
interface MutableEvalEnv, for code that wants to mutate the last binding in an environment - Make
EvalEnvimmutable - Recursive functions in closures use the wrong environment
- Unit literal's
toString()should be(), not[] - For built-ins, add their alias to the compile-time environment
- In parallel declarations (
let...and) add variables to compilation environment - Refactor special type constructors (list, tuple, record)
let funinsidefromexpression fails (#4)- Move built-in constants and functions into new
enum BuiltIn - In
Shell, fix parsing single-quote in line comments, and line endings in multi-line statements
Build and tests
- Test expressions used in documentation and blog posts
- Example of a user-defined aggregate function in a query
- Add a test with a temporary function in a query that takes a record-valued argument
- In
ScriptTest, only loadDictionaryif script isforeign.sml - Enable some
grouptests - Add
Sys_env ()function, that returns the current environment - Upgrade maven: 3.5.4 → 3.6.3
- Add maven wrapper jar
- Use correct
maven-javadoc-pluginversion - Before launching repl, build test as well as main
- Convert
MainTestto use fluent style - In
Shell, add optional pause, which seems to makeShellTestdeterministic
Site and documentation
- Add Morel language reference
- Add image to README
- Add javadoc to site
- Generate an asciinema demo
0.1 / 2019-07-24
Initial release features the core language (primitive types, lists,
tuples, records; let, if, fn and case expressions; val,
fun and datatype declarations), an interactive shell smlj, and
relational extensions (from).