+ Strict IO application - performing an IO action and entering its result.
+
+ rts_evalIO() lets you perform Haskell IO actions from outside of Haskell-land,
+ returning back to you their result. Want this result to be evaluated to WHNF
+ by that time, so that we can easily get at the int/char/whatever using the
+ various get{Ty} functions provided by the RTS API.
+
+ forceIO takes care of this, performing the IO action and entering the
+ results that comes back.
+
+ * -------------------------------------------------------------------------- */
+
+INFO_TABLE_SRT_BITMAP(forceIO_ret_info,forceIO_ret_entry,0,0,0,0,RET_SMALL,,EF_,0,0);
+FN_(forceIO_ret_entry)
+{
+ FB_
+ Sp++;
+ Sp -= sizeofW(StgSeqFrame);
+ PUSH_SEQ_FRAME(Sp);
+ JMP_(GET_ENTRY(R1.cl));
+}
+
+
+INFO_TABLE(forceIO_info,forceIO_entry,1,0,FUN,,EF_,0,0);
+FN_(forceIO_entry)
+{
+ FB_
+ /* Sp[0] contains the IO action we want to perform */
+ R1.p = (P_)Sp[0];
+ /* Replace it with the return continuation that enters the result. */
+ Sp[0] = (W_)&forceIO_ret_info;
+ Sp--;
+ /* Push the RealWorld# tag and enter */
+ Sp[0] =(W_)REALWORLD_TAG;
+ JMP_(GET_ENTRY(R1.cl));
+ FE_
+}
+SET_STATIC_HDR(forceIO_closure,forceIO_info,CCS_DONTZuCARE,,EI_)
+};
+
+
+/* -----------------------------------------------------------------------------