Skip to content

DuoSRX/dargon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dargon

A simple programming language vaguely inspired the ML family of languages.
This is a work in progress! Made for fun to better understand type systems.

Resources used:

Some examples

> let x = 10;
> :type x
x : Int
> let id x = x;
> :type ident
id : ∀a. a -> a
> id x
10 : Int
> id True
True
> let inc = fn x -> x + 1
> inc 1
2 : Int
> letrec fac n = if n == 0 then 1 else n * (fac (n - 1));
> fac 7
5040

TODO

  • Load source from file
  • Make an executable to interpret/typecheck/repl
  • Basic IO
  • Better error messages
  • More built in data types (List, Char, String, Float, Tuple)
  • Custom data types and type synonyms (records?)
  • Polymorphic operators (+, -, ==...)
  • Provide type signatures

Maybe someday:

  • Compiler
  • Pattern matching
  • Module system

About

Simple typed programming language with HM type inference

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published