[Haskell-cafe] Is there some place where I can find the hs-curses doc ?

Stefan O'Rear stefanor at cox.net
Thu Dec 20 18:05:32 EST 2007

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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20071220/f18f2af2/attachment.bin

More information about the Haskell-Cafe mailing list