Better scoring for loop breakers; fixes simplifier loop in nofib/minimax
[ghc-hetmet.git] / compiler / deSugar / DsForeign.lhs
index ba19124..e7d5c39 100644 (file)
@@ -388,8 +388,10 @@ dsFExportDynamic id cconv
        -- PlayRisky: the adjustor doesn't allocate in the Haskell heap or do a callback
      let ccall_adj_ty = exprType ccall_adj
          ccall_io_adj = mkLams [stbl_value]                 $
-                       (pprTrace "DsForeign: why is there an unsafeCoerce here?" (text "") $
-                       (Cast ccall_adj (mkUnsafeCoercion ccall_adj_ty io_res_ty )))
+#ifdef DEBUG
+                       pprTrace "DsForeign: why is there an unsafeCoerce here?" (text "") $
+#endif
+                       (Cast ccall_adj (mkUnsafeCoercion ccall_adj_ty io_res_ty ))
 
          io_app = mkLams tvs    $
                  mkLams [cback] $
@@ -446,7 +448,7 @@ mkFExportCBits c_nm maybe_target arg_htys res_hty is_IO_res_ty cc
                MachRep)]       -- the MachRep
   arg_info  = [ (text ('a':show n), showStgType ty, ty, 
                 typeMachRep (getPrimTyOf ty))
-             | (ty,n) <- zip arg_htys [1..] ]
+             | (ty,n) <- zip arg_htys [1::Int ..] ]
 
   -- add some auxiliary args; the stable ptr in the wrapper case, and
   -- a slot for the dummy return address in the wrapper + ccall case