[Haskell-cafe] Joy Combinators (Occurs check: infinite type)

Keean Schupke k.schupke at imperial.ac.uk
Fri Mar 11 12:26:22 EST 2005


Greg Buchholz wrote:

>    Wow.  Color me impressed.  A little under a week ago, I stumbled
>onto Joy, and thought to myself that it could be translated almost
>directly into Haskell (which would imply it was possible to statically
>type).  Well, it wasn't quite as direct as I had initially thought, but
>it looks like you've done it.  Are there any papers/books out there
>which I could study to learn more about these (and other) tricks of the
>type system wizards? 
>  
>
Here's a cleaned up version, I have made the function composition and 
stack both
use HLists... a bit neater. Have also added "primrec" and a 5th factorial.

As for type tricks most of these should be in the HList or OOHaskell 
papers. The things to notice are using types as instance labels, that 
constraints form horn
clause compile time meta-programs (in a non-backtracking prolog style) 
and that multi-parameter classes with functional depandencies simulate 
some dependant
types.

    Keean.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Joy.hs
Type: text/x-haskell
Size: 9743 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/haskell-cafe/attachments/20050311/8d289202/Joy.bin


More information about the Haskell-Cafe mailing list