Skip to content

shifterbit/mloxide

Repository files navigation

mloxide (WIP)

An ML derivative written in rust.

Building and Running

Clone the Repository

git clone https://github.com/shifterbit/mloxide.git
cd mloxide

Building with Cargo

cargo build --release # omit --release for debug build
./target/release/mloxide <path to source fille> # ./target/debug/mloxide for debug builds

Building with Nix

Install Nix

Make sure flakes are enabled

nix build
./result/bin/mloxide <path to source file>

Example Code

Equality Checks

2 + 2 == 4

If Expressions

if (2 + 2) == 4 
then 2 
else 9
end

Variables

val x = 2;
val y = 10;
let
  val z = y + 1;
in if z <= x
   then x + y
   else y + z
end

Features

  • Ints
  • Booleans
  • Strings
  • Lists
  • Tuples
  • Let Expressions
  • Arithmetic Expressions
  • Equality Expressions
  • Grouping Expressions
  • Comparison
  • If Expressions
  • Assignment
    • Global Variables
    • Local Variables
  • Pattern Matching
  • Type Checking
  • Type System
    • Type Inference
    • Sum Types
    • Type Declarations
  • Proper Error Handling and Reporting
    • Syntax Errors
      • Error Reporting
      • Error Recovery
    • Type Errors
      • Error Reporting
  • Compiling Via LLVM
  • Module System/Imports

About

An ML derivative in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published