Skip to content

Commit

Permalink
[MOREL-18] Release Morel 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
julianhyde committed Mar 10, 2020
1 parent e8f1e19 commit f480f6c
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 16 deletions.
87 changes: 87 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,93 @@ License.
For a full list of releases, see
<a href="https://github.com/julianhyde/morel/releases">github</a>.

## <a href="https://github.com/julianhyde/morel/releases/tag/morel-0.2">0.2</a> / 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](https://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system);
* Relational expressions may now include a `group` clause, so you can
evaluate aggregate queries (similar to SQL `GROUP BY`);
* [Foreign values](https://github.com/julianhyde/morel/issues/5) 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
[`String`](http://sml-family.org/Basis/string.html) and
[`List`](http://sml-family.org/Basis/list.html) structures
in the Standard ML basis library;
* [Postfix field reference syntax](https://github.com/julianhyde/morel/issues/9)
makes Morel more familiar to SQL users;
* Add [Morel language reference](docs/reference.md).

### Features

* [<a href="https://github.com/julianhyde/morel/issues/15">MOREL-15</a>]
Improve pretty-printing: wrap long lines, and abbreviate long lists and deep
structures
* [<a href="https://github.com/julianhyde/morel/issues/12">MOREL-12</a>]
In `from` clause, allow initializers to reference previous variables
* In `group`, `as alias` is optional
* [<a href="https://github.com/julianhyde/morel/issues/10">MOREL-10</a>]
Implicit labels in record expressions
* [<a href="https://github.com/julianhyde/morel/issues/9">MOREL-9</a>]
Allow `<expr>.<field>` as an alternative syntax for `#<field> <expr>`
* [<a href="https://github.com/julianhyde/morel/issues/7">MOREL-7</a>]
Rename project from 'smlj' to 'morel'
* [<a href="https://github.com/julianhyde/morel/issues/5">SMLJ-5</a>]
Foreign values, including record values based on the contents of a JDBC schema
* [<a href="https://github.com/julianhyde/morel/issues/6">SMLJ-6</a>]
Add `group` clause (and `compute` sub-clause) to `from` expression, to support
aggregation and aggregate functions
* Polymorphic types
* Add `String` and `List` basis functions

### Bug-fixes and internal improvements

* [<a href="https://github.com/julianhyde/morel/issues/16">MOREL-16</a>]
Ensure that types derived for REPL expressions have no free type variables
* [<a href="https://github.com/julianhyde/morel/issues/14">MOREL-14</a>]
Tuple should equal record, and both equal `unit` when empty
* 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 `EvalEnv` immutable
* 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)
* [<a href="https://github.com/julianhyde/morel/issues/4">SMLJ-4</a>]
`let fun` inside `from` expression fails
* 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 load `Dictionary` if script is `foreign.sml`
* Enable some `group` tests
* Add `Sys_env ()` function, that returns the current environment
* Upgrade maven: 3.5.4 &rarr; 3.6.3
* Add maven wrapper jar
* Use correct `maven-javadoc-plugin` version
* Before launching repl, build test as well as main
* Convert `MainTest` to use fluent style
* In `Shell`, add optional pause, which seems to make `ShellTest` deterministic

### Site and documentation

* Add [Morel language reference](docs/reference.md)
* Add image to [README](README.md)
* Add [javadoc to site](http://hydromatic.net/morel/apidocs/)
* Generate an asciinema demo

## <a href="https://github.com/julianhyde/morel/releases/tag/smlj-0.1">0.1</a> / 2019-07-24

Initial release features the core language (primitive types, lists,
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
morel
Standard ML interpreter, with relational extensions, implemented in Java

Copyright (C) 2019-2019 Julian Hyde
Copyright (C) 2019-2020 Julian Hyde
All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Morel release 0.1.0
Morel release 0.2.0

This is a source or binary distribution of Morel.

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ Java version 8 or higher.
### From Maven

Get Morel from
<a href="https://search.maven.org/#search%7Cga%7C1%7Cg%3Anet.hydromatic%20a%3Asmlj">Maven Central</a>:
<a href="https://search.maven.org/#search%7Cga%7C1%7Cg%3Anet.hydromatic%20a%3Amorel">Maven Central</a>:

```xml
<dependency>
<groupId>net.hydromatic</groupId>
<artifactId>smlj</artifactId>
<version>0.1.0</version>
<artifactId>morel</artifactId>
<version>0.2.0</version>
</dependency>
```

Expand All @@ -62,7 +62,7 @@ On Windows, the last line is

```bash
$ ./morel
morel version 0.1.0 (java version "11.0.4", JLine terminal, xterm-256color)
morel version 0.2.0 (java version "13", JLine terminal, xterm-256color)
= "Hello, world!";
val it = "Hello, world!" : string
= exit
Expand Down
2 changes: 1 addition & 1 deletion docs/howto.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ License.
## How to make a release (for committers)

Make sure `mvn clean install`, `mvn site`, and
`mvn javadoc:javadoc javadoc:test-javadoc` pass under JDK 8 - 12.
`mvn javadoc:javadoc javadoc:test-javadoc` pass under JDK 8 - 14.

Write release notes. Run the
[relNotes](https://github.com/julianhyde/share/blob/master/tools/relNotes)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/hydromatic/morel/Shell.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private void printAll(List<String> lines) {

/** Generates a banner to be shown on startup. */
private String banner() {
return "morel version 0.1.0"
return "morel version 0.2.0"
+ " (java version \"" + System.getProperty("java.version")
+ "\", JRE " + System.getProperty("java.vendor.version")
+ " (build " + System.getProperty("java.vm.version")
Expand Down
8 changes: 4 additions & 4 deletions src/test/resources/script/blog.sml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ end;
(*) === Screen cast =================================================
(*) Now we're in smlj's shell, for interactive commands.
(*) Now we're in morel's shell, for interactive commands.
(*) First of all, we need to talk about comments.
(* This is a block comment, which can span multiple lines... *)
Expand All @@ -102,7 +102,7 @@ end;
"a string literal";
1 + 2;
(*) The smlj shell deduces the type of each expression,
(*) The Morel shell deduces the type of each expression,
(*) and assigns it to a variable called "it".
(*) We can use "it" in the next expression...
it + 4;
Expand Down Expand Up @@ -218,15 +218,15 @@ in
end;
(*) That's all, folks!
(*) To recap, smlj has:
(*) To recap, Morel has:
(*) * expressions of int, string, boolean, float, char, list,
(*) tuple and record types;
(*) * lambda expressions and recursive functions;
(*) * algebraic datatypes and pattern-matching;
(*) * polymorphism and powerful type-inference;
(*) * relational expressions (an extension to Standard ML).
(*)
(*) Follow our progress at https://github.com/julianhyde/smlj.
(*) Follow our progress at https://github.com/julianhyde/morel.
(*) This is only release 0.1, so there's more to come!
(*) === 2020/02/25: Morel: A functional language for data ===========
Expand Down
8 changes: 4 additions & 4 deletions src/test/resources/script/blog.sml.out
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ end;

(*) === Screen cast =================================================

(*) Now we're in smlj's shell, for interactive commands.
(*) Now we're in morel's shell, for interactive commands.
(*) First of all, we need to talk about comments.

(* This is a block comment, which can span multiple lines... *)
Expand All @@ -137,7 +137,7 @@ val it = "a string literal" : string
val it = 3 : int


(*) The smlj shell deduces the type of each expression,
(*) The Morel shell deduces the type of each expression,
(*) and assigns it to a variable called "it".
(*) We can use "it" in the next expression...
it + 4;
Expand Down Expand Up @@ -319,15 +319,15 @@ val it = ["Shaggy","Scooby"] : string list


(*) That's all, folks!
(*) To recap, smlj has:
(*) To recap, Morel has:
(*) * expressions of int, string, boolean, float, char, list,
(*) tuple and record types;
(*) * lambda expressions and recursive functions;
(*) * algebraic datatypes and pattern-matching;
(*) * polymorphism and powerful type-inference;
(*) * relational expressions (an extension to Standard ML).
(*)
(*) Follow our progress at https://github.com/julianhyde/smlj.
(*) Follow our progress at https://github.com/julianhyde/morel.
(*) This is only release 0.1, so there's more to come!

(*) === 2020/02/25: Morel: A functional language for data ===========
Expand Down

0 comments on commit f480f6c

Please sign in to comment.