[Yhc] make_tuple for arbitrary number of elements
Thomas Shackell
shackell at cs.york.ac.uk
Wed Jan 17 07:09:52 EST 2007
> Heh. You wrote me a patch - now I feel bad. :) After reading your
> email I decided that I definitely should implement it (System.Time)
> through the FFI that's already there.
No need to feel bad, I enjoyed it and it only took me 10 minutes, it's
also a bit of a tidy up in many ways.
If you're adding things which are primitive parts of the standard
prelude then I would recommend at looking at:
- src/packages/yhc-base-1.0/YHC/Primitive.hs
- src/runtime/BCKernel/primitive.h
- src/runtime/BCKernel/primitive.c
- src/runtime/BCKernel/builtin
Some of the files in builtin are more closely tied to the runtime than
others. Array.c, IO.c and System.c are fairly good examples of generic
ones. Indeed System.c is probably the most sensible place for
System.Time functions.
> I'll try to find an excuse to use the make_ntuple. Thanks and kudos for
> the speedy response.
It'll be useful if you really need a function to return several
different results, for example primIntegerQuotRem. However you don't
need to try to use it ;-)
Thanks
Topm
More information about the Yhc
mailing list