enso/engine
Hubert Plociniczak ae66087bb9
By-type pattern matching (#3742)
This change brings by-type pattern matching to Enso.
One can pattern match on Enso types as well as on polyglot types.

For example,
```
case x of
_ : Integer -> ...
_ : Text -> ...
_ -> ...
```
as well as Java's types
```
case y of
_ : ArrayList -> ...
_ : List -> ...
_ : AbstractList -> ...
_ -> ..
```

It is no longer possible to match a value with a corresponding type constructor.
For example
```
case Date.now of
Date -> ...
```
will no longer match and one should match on the type (`_ : Date`) instead.
```
case Date of
Date -> ...
```
is fine though, as requested in the ticket.

The change required further changes to `type_of` logic which wasn't dealing well with polyglot values.

Implements https://www.pivotaltracker.com/story/show/183188846

# Important Notes
~I discovered late in the game that nested patterns involving type patterns, such as `Const (f : Foo) tail -> ...` are not possible due to the old parser logic.
I would prefer to add it in a separate PR because this one is already getting quite large.~ This is now supported!
2022-10-04 09:23:58 +00:00
..
language-server Engine should send notification about node status (#3729) 2022-09-28 12:35:12 +00:00
launcher/src Update Scala to 2.13.8 (#3631) 2022-08-08 19:32:55 +00:00
polyglot-api/src Engine should send notification about node status (#3729) 2022-09-28 12:35:12 +00:00
runner Generate native image for engine-runner (#3638) 2022-09-22 14:45:10 +00:00
runner-native/src Registering SliceVectorMethodGen for reflection (#3737) 2022-09-27 17:24:58 +00:00
runtime By-type pattern matching (#3742) 2022-10-04 09:23:58 +00:00
runtime-instrument-id-execution/src/main/java/org/enso/interpreter/instrument Engine should send notification about node status (#3729) 2022-09-28 12:35:12 +00:00
runtime-instrument-repl-debugger/src/main/java/org/enso/interpreter/instrument Generate native image for engine-runner (#3638) 2022-09-22 14:45:10 +00:00
runtime-instrument-runtime-server/src/main/java/org/enso/interpreter/instrument Register instruments/language in their own compilation units to fix the sbt build issues (#3509) 2022-06-13 14:09:08 +00:00
runtime-language-epb/src/main/java/org/enso/interpreter/epb Generate native image for engine-runner (#3638) 2022-09-22 14:45:10 +00:00
runtime-with-instruments/src/test Unique job for visualizations (#3752) 2022-10-03 08:26:54 +00:00
README.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00

The Enso Engine

The Enso engine is the codebase responsible for compiling and executing Enso code, as well as providing language server functionality to users of the language. It is subdivided into two major components:

  • Language Server: The Enso language service.
  • Polyglot API: The truffle-boundary safe API for communication between the language server and the runtime.
  • Runner: The command-line interface for Enso.
  • Runtime: The compiler and interpreter for Enso.