callback.hs 302 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module Main (main, hputc) where

import IO

main = _casm_GC_ ``rts_evalIO(
			rts_apply(
		  	  &Main_hputc_closure,
		  	  rts_mkChar('x')
			  ),
		        NULL
	     	   );'' :: IO ()

hputc :: Char -> IO ()
hputc c = hPutChar stdout c >> hPutChar stdout '\n'

foreign export hputc :: Char -> IO ()