Skip to content
Snippets Groups Projects
Commit c6f67e94 authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 1999-11-02 11:57:15 by simonmar]

Add simple "raw" style callback example (i.e. not using the FFI).  Just
for testing _ccall_GC really.
parent ceb975cd
No related branches found
No related tags found
No related merge requests found
TOP = ..
include $(TOP)/mk/boilerplate.mk
SUBDIRS = should_compile should_fail
SUBDIRS = should_compile should_fail should_run
include $(TOP)/mk/target.mk
#-----------------------------------------------------------------------------
# $Id: Makefile,v 1.1 1999/11/02 11:57:16 simonmar Exp $
TOP = ../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/should_run.mk
SRC_HC_OPTS += -dcore-lint -fglasgow-exts
include $(TOP)/mk/target.mk
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 ()
x
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment