On Thu, 2007-05-31 at 10:11 -0700, Erick Tryzelaar wrote:
> skaller wrote:
> > See the tutorial .. this one is actually a tutorial example :)
> >   
> 
> Oh, I missed that that got added :) Thanks.
> > The distinction between parameterised types and type functions
> > is a pain and silly complication ;(
> >   
> 
> Do you plan on unifying the two, or are there some problems doing that?

The x[t] notation is a hack I adopted a long time ago when
I couldn't get the Haskell syntax

        x t

working. This is basically because Felix can't tell if an expression
is executable or a type expression.

I did make some attempt to get Monad to work with an indexed type,
but I must have broken it ;(

Unification would be nice, but probably a hard job.

Indexed types are *nominal* types. Type functions are not,
they're actually just aliases for lambda expressions
(in the type domain).

However they're interchangeable. You can write

        fun f[t]: opt[t] -> OPT t;

and both notations should work.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to