Re: Is there some place where I can find the hs-curses doc ?
On Thu, Dec 20, 2007 at 11:56:04PM +0100, david48 wrote:
> On Dec 20, 2007 11:24 PM, Don Stewart <dons <at> galois.com> wrote:
>
> > there's another curses binding in hmp3,
> > http://www.cse.unsw.edu.au/~dons/code/hmp3/Curses.hsc
> > that i keep meaning to package up, but never do.
>
> Thanks !
>
> There's quite a lot of stuff I don't understand in Curses.hsc ( the
> use of # chars for example in #const or (P.packAddress "initscr"##) or
> (#type bool) ) I hope the FFI libs have the answers in the doc.
Those are actually unrelated.
"initscr"# is a GHC extension, producing a memory address (effectively
an Int) of a string in the .rodata section, like a C string, and usable
as arguments for C string functions.
(#const FOO) is a directive to the hsc2hs preprocessor, instructing it
to find the value of FOO and insert it in the source code here.
> P.S. Sorry for not prefixing the title with [Haskell-cafe] -- I'll try
> to remember it next time.
Don't - mailman does it automatically.
Stefan
(Continue reading)