Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GTNL

A simple, experimental native language with graded types.

Just a backup of the compiler in 2025. There're a few problems with the compiler, but the core type inference/checking and the code generation is good.

Syntax

Basically Rust syntax, with some special type prefix syntaxes for the grades:

  • &a/b for fractional borrows
  • @modal for owned data with non default modality

And some small tweaks:

  • No &mut or pointers since modals are enough
  • Suffix reference/dereference operators as sugar to chaining
  • No simple bitwise operators

Build and Run

There's nothing magic in this repo: cargo b and cargo r is enough.

It expects the file name and outputs a.ll for the generated LLVM IR.

About

An expermental language based on graded types

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages