Morphine
This page is about Morphine, a typed functional programming
language. Everything's more (fun x -> x) with Morphine.
Introduction
Morphine is a simple, functional language. It has recursive first-class
functions, recursive algebraic data types, let, numbers, symbols, lists,
tuples, and a small set of built-in functions.
Morphine was previously known as LamLang2. It is named after the opiate,
which in turn is named after Morpheus, the Greek god of dreams (pictured
above).
I'll write a more comprehensive introduction one of these days.
News
- 2008-01-02–The syntax has been significantly extended to allow
Haskell-style multi-equation definitions; it also now has a simple
implementation of sections. I'm experimenting with allowing infix
application of data constructors. I've switched the layout
preprocessing engine to a slightly-modified version of the newer one I
wrote for Braque. Something's the matter with the tuple / unit rule in
the type system, but it shouldn't be too bad to fix (once I actually
get round to it). Top-level definitions can be (mutually) recursive,
but I still need some sort of "let rec". Following a type inferencer
I'd done for Haskell '98, I didn't think to allow scoped "forall"
quantifiers (e.g., the type of omega: "(forall a, a -> a) -> forall a,
a -> a"); I should fix that, too.
- 2007-11-20–The type system now handles tuples, case, and patterns,
and the parser is a bit more sensible. The
big
thing missing is some sort of Y / fixpoint ... which severely limits
how much fun the language currently is.
- 2007-10-25–I've been working a bit on Morphine's type system and
parser. It doesn't do much yet. I've also decided that Morphine will
be the basis for Oasis, another language I'm working on. More
information on that eventually.
- 2007-05-14–I declare LamLang dead and have started Morphine. It is
going to be very similar to the first implementation of the language,
but is rather a bit more sensible. Finally, lists can be pattern
matched. Why? because the list constructor is simply a constructor
like any other. "forall" can be written in type annotations. Why?
Because the (currently-unïmplemented) type system is going to
properly handle universally-quantified types. It will be much easier
to extend the set of built-in functions / primitives, and the user
will be able to shadow / redefine primitives. Why? Because primitives
are simply default bindings in the environment rather than a
hard-coded fixed set of procedures. Layout will work. Why? Because I'm
taking the code directly from another project of mine, code that I
have every reason to believe works. Stay tuned!
Download
- (Morphine is not currently available; eventually, it will be released
under some sort of learning-centric license.)
Demonstrations
Morphine demonstrates its cool ASCII logo and some of
the currently-implemented rudiments of its type-system
(data declarations (including higher-kinded parameters),
recursive functions, sections, pattern matching).
More Information
Well, there's really no more information available for the time being,
sorry! Please check back soon, though, or e-mail me if you have specific
questions.
This page was generated by WebGen on PhoenixFyre on Wed Jun 25 19:27:07 PDT 2008.