Skip to content

Experimental programming language to explore overrides, strictness, and impurity with Haskell-like syntax

Notifications You must be signed in to change notification settings

chrismwendt/talloy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Talloy is a not-very-serious attempt to make a strict impure Haskell with lightweight killable threads, generics, sum and product types, nominal types, and garbage collection, but with strict evaluation and no type-checked purity.

So far, it's capable of describing simple programs with print, sleep, and sequencing:

{
  print "hi";
  sleep 0.5;
  print "there";
}

Output:

hi
there

Roadmap

  • let { ... } in ...
  • override { ... } in ...
  • Lambdas
  • Printing to stdout
  • Addition
  • Recursion
  • Sum and product types
  • Nominal types
  • Generics
  • Garbage collection
  • Lightweight killable threads
  • Compile to C
  • Self host
  • Run Crysis

Development

Install ghcid, then run:

./dev

Other ideas that might be interesting to throw in the mix:

  • Overloaded values, disambiguated by type at call site
  • No type classes, only interfaces
  • Swap out implementation of interfaces at call site implicitly (dynamic scope?)
  • Everything is Showable, DeepSeqable, Hashable, etc.
  • Stop parsing at blank line to avoid inscrutable parse errors
  • Top level of file is implicit do block like Python, but you can refer to things out of order

Overloading functions at the call site

let { greet = \name -> print name; }
in override { print:oldprint = \str -> oldprint (uppercase str); }
in greet "john doe"

About

Experimental programming language to explore overrides, strictness, and impurity with Haskell-like syntax

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published