Add simple "raw" style callback example (i.e. not using the FFI). Just
for testing _ccall_GC really.
TOP = ..
include $(TOP)/mk/boilerplate.mk
-SUBDIRS = should_compile should_fail
+SUBDIRS = should_compile should_fail should_run
include $(TOP)/mk/target.mk
--- /dev/null
+#-----------------------------------------------------------------------------
+# $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
+
--- /dev/null
+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 ()