Enso
Enso Project Structure
A typical Enso project structure might look like this:
my_enso_project/
├── src/
│ ├── Main.enso
│ └── MyModule.enso
├── packages/
│ └── Standard/
├── themes/
│ └── default.yaml
└── project.yamlBasic Enso Code
Here's a simple Enso code example (Main.enso):
from Standard.Base import all
main =
print "Hello, Enso!"
x = 10
y = 20
sum = x + y
print "The sum is {sum}"Node.js Integration
Enso can interact with Node.js modules. Here's an example of how you might use a Node.js module in Enso:
Custom Node.js Module for Enso
You can create custom Node.js modules to use in Enso. Here's an example:
Create a file named
customModule.js:
Use the custom module in Enso:
Enso Runtime in TypeScript
Enso's runtime is written in TypeScript. Here's a simplified example of how you might define a custom datatype in the Enso runtime:
Enso Language Server
Enso uses a language server for IDE integration. Here's a basic example of how you might start the Enso language server using Node.js:
Last updated