Taral wrote:
Just a strange thought, but what about...

foo :: x# -> ...
=>
... foo (void *x, ...) { ... }

Just because it's unboxed doesn't mean it isn't in memory...

Then you have to worry about garbage collection. That's OK, but that would be a separate kind, pointers to unboxed values that the garbage collector can reclaim. But we might also want literals.

The idea is to do C in Haskell, but with better typing. We separate out the storage aspects of C types as kinds, while leaving the semantics as types. One could add various kinds of "polykindism", which would mostly end up as compile-time overloading (or inlined) similar to C++ templates. For instance:

  (#,#) :: #m -> #n -> #m+n

I'm not really sure how much demand there is for it, mind, given the possible degree of complexity involved in doing it right.

--
Ashley Yakeley

_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to