what's the goal of haskell-prime?

jur jur at cs.uu.nl
Tue Feb 7 08:11:12 EST 2006


On Jan 31, 2006, at 1:50 PM, Wolfgang Jeltsch wrote:

> Am Montag, 30. Januar 2006 19:33 schrieb Isaac Jones:
>> [...]
>
>> Have you looked at the Helium language / compiler?  It's a
>> stripped-down version of Haskell for teaching.  Maybe that's what
>> you're actually suggesting?  I think this is a great idea :)
>
> I think the current Helium version causes too many problems because  
> of the
> lack of type classes since type classes are normally used even with  
> very
> fundamental things like numbers and value-to-string conversion.
>
To be fair, the current version of Helium does support some  
overloading, but
you cannot (easily) define new classes and instance (you'd have to  
compile
these in, more or less). From the Helium docs:

# There are five built-in type classes with the following instances:
     * Num: Int, Float
     * Eq: Bool, Char, Either a b, Float, Int, Maybe a, [a] and tuples
     * Ord: Bool, Char, Float, Int, [a] and tuples
     * Show: Bool, Char, Either a b, Float, Int, Maybe a, Ordering,  
[a] and tuples
     * Enum: Bool, Char, Float, Int and ()
# Instances for Show and Eq (and not for other classes) can be  
derived for data types. These instances are needed to use overloaded  
functions, such as show and (==)

# There is no overloading of numerals

It is high on my wishlist for Helium to have these in the language.

Personally, I find the idea of a scaled down language for teaching
a good one, although it would be nice to be able to integrate various
versions of the compiler into a single compiler.

I also think the type inference directives and class directives could go
a long way in making a full-fledged compiler for Haskell, student  
suited.
For instance, I can imagine that a a slight generalization of (our)  
type inference directives
(using decision trees instead of simple messages) can deal with
the problem of monad comprehensions versus list comprehensions
at a relatively high level. But maybe I am sketching too rosy a picture
here, since I almost forgot that list comprehension introduce new  
bindings,
and at the moment type inference directives do not allow scope changes.

cheers,
Jurriaan Hage

>> peace,
>>
>>   isaac
>
> Best wishes,
> Wolfgang
> _______________________________________________
> Haskell-prime mailing list
> Haskell-prime at haskell.org
> http://haskell.org/mailman/listinfo/haskell-prime



More information about the Haskell-prime mailing list