I put this up on trac in case anyone is interested. On 9/16/07, felix <[EMAIL PROTECTED]> wrote: > #16: existential types > -------------------------+-------------------------------------------------- > Reporter: erickt | Owner: > Type: enhancement | Status: new > Priority: minor | Milestone: > Component: type system | Version: > Keywords: | > -------------------------+-------------------------------------------------- > I was reading about ghc's existential types here: > > http://en.wikibooks.org/wiki/Haskell/Fun_with_Types > > which reminded me a lot of how we define a function taking a typeclass: > > {{{ > proc print[T with Str[T]] (x:T) > { > fprint (cout, str x); > } > }}} > > I'm sure it'd be a lot of effort to pull this off, but it'd be interesting > if we could extend this to data structures so we could implement: > > {{{ > union hlist[T with Show[T]] = > | HEmpty > | HCons of T * hlist[T] > ; > }}} > > -- > Ticket URL: <http://code.felix-lang.org/ticket/16> > felix <http://code.felix-lang.org> > The advanced scripting language
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language