Skip to content

A lazy functional language that compiles to JavaScript

License

Notifications You must be signed in to change notification settings

aionescu/dynasty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dynasty

Dynasty Logo

Dynasty is a dynamically-typed, lazily evaluated, purely functional programming language that compiles to JavaScript.

Examples

You can find some Dynasty programs in the examples folder.

The most interesting ones are the Brainfuck interpreter and the Calculator web app.

The standard library and runtime code can be found in the core folder.

Building & running the compiler

Prerequisites

  • GHC (>= 9.6)
  • cabal (>= 3.8)

(Both can be installed via ghcup)

To compile Dynasty programs, use the following command:

cabal run . -- <target-dir>

The first invocation may take a while, since it will also build the compiler's dependencies.

By default, the compiler outputs a file named main.js. You can include it in a <script> tag inside an HTML document to load it in the browser, or run it directly using a JS runtime like Node.js, Deno, or Bun.

VS Code Extension

To install the VS Code extension, run ./dynasty-vscode/install.sh.

License

This repository is licensed under the GNU General Public License v3.

For more details, see the license file.

About

A lazy functional language that compiles to JavaScript

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published