Hello.

I am starting to use c2hs and I intend to use it
to build Haskell bindings for ncurses.

My first question on using c2hs: how can I import a
function from C keeping his name in the Haskell side?

I want something like

  module Curses (init,refresh,end) where

  import Prelude hiding (init)
  import C2HS
  
  {#context lib="ncurses"#}

  init = {#call initscr#}
  refresh = {#call refresh#}
  end = {#call endwin#}

as the binding file, but this introduces two definitions
for the name refresh: the one I wrote and another
generated by c2hs.

I suppose it is possible to keep the names used in the
C side. Or am I wrong?

Any comments?

Romildo
-- 
Prof. José Romildo Malaquias <[EMAIL PROTECTED]>
Departamento de Computação
Universidade Federal de Ouro Preto
Brasil

Reply via email to