Skip to content
/ Orb Public

A quirky object oriented standard library for ocaml

Notifications You must be signed in to change notification settings

charlesetc/Orb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Orb [deprecated: doesn't compile with recent ocaml]

Orb does some pretty weird stuff...

Basically Orb is a collection of libraries, and then an ast mapper (ppx) that rewrites normal OCaml literals to use Orb's types. And then some more functions for fun...

So for example, this is a valid, complete, Orb program:

puts ^ 2 + 2 ;
puts ^ 2.3 + 5.6 ;
puts ^ "hi " + "you" ;
puts {var = 23}.var

Uhh...

Did you just change what integers and strings do? yep

Did you just change the ^ operator? you bet

Did you make everything an object? I did

I love OCaml: even the object system! Orb doesn't mess around with inheritance but takes full advantage of the row polymorphism presented by the object system and polymorphic variants in OCaml.

So at its best Orb is an attempt to make a usable alternative standard library. Is it usable now? No.

At its least, Orb showcases how useful Ppx is, and just how configurable OCaml is.

See example/example.ml for more weirdness! Want a repl? Just make top

About

A quirky object oriented standard library for ocaml

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published