WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

sodic/func

Repository files navigation

Func compiler

A compiler for Func, a high-level, general-purpose, statically typed, garbage collected, purely functional programming language with type inference.

The language is mostly based on ML, Haskell, and JavaScript.

How to try it out

It's best to check out the demo and tutorial available at https://sodic.github.io/func.

The thesis is available at https://sodic.github.io/func-thesis.pdf.

Using the compiler locally

Clone the repository, position yourself in the root directory:

git clone https://github.com/sodic/func
cd func

Install dependecies and build the compiler:

npm install
npm run build

Create a source file. For example, create the file test.func with the following contents:

func double(x) = 2 * x

func square(x) = x * x

squareAndDouble = double . square

eighteen = squareAndDouble(3)

Compile the source file:

npm run compile test.func

The compiler will write the output to test.js.

Running tests

Build the project and run tests:

npm run build-and-test

Run the tests without building the project:

npm run test

About

The compiler for Func

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •