PragmaTwice / ichigo-lang

write a little simply typed functional language to practice Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ichigo Lang

ichigo-logo

to commemorate those fucking times

Build Status Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. License

Intro

  • It's trivial, just a toy, used to familiarize with Rust
  • NO DEPENDENT TYPE

Quick Start

cargo run -- -i example/hello.ichigo

TODO List

  • core task
    • parser
    • type checker
    • type inference
    • evaluator
  • peripheral task
    • REPL
    • pretty printer

Language Feature

  • Algebraic data type
  • Lambda calculus
  • Pattern matching
  • Unicode symbol

Quick View

ℕ = σ {
    0    : ℕ
    1+   : ℕ → ℕ
}

+ = λ x : ℕ . λ { 
    1+ y . 1+ (+ x y)
    0    . x
}

ℕ𝓁 = σ {
    ∅  : ℕ𝓁
    ++ : ℕ → ℕ𝓁 → ℕ𝓁
}

take = λ {
    1+ n . λ {
            ∅       . ∅
            ++ x xs . ++ x (take n xs)
    }
    0    . λ x . ∅
}

About

write a little simply typed functional language to practice Rust

License:Apache License 2.0


Languages

Language:Rust 100.0%