ichigo-lang icon indicating copy to clipboard operation
ichigo-lang copied to clipboard

write a little simply typed functional language to practice Rust

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
    • [x] parser
    • [x] type checker
    • [x] type inference
    • [ ] evaluator
  • peripheral task
    • [x] REPL
    • [x] 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 . ∅
}