Tidy up the treatment of newtypes, refactor, and fix Trac #736
[ghc-hetmet.git] / compiler / typecheck / TcForeign.lhs
index a710111..49ecffc 100644 (file)
@@ -263,7 +263,7 @@ mustBeIO = False
 
 checkForeignRes non_io_result_ok pred_res_ty ty
        -- (IO t) is ok, and so is any newtype wrapping thereof
-  | Just (io, res_ty) <- tcSplitIOType_maybe ty,
+  | Just (io, res_ty, _) <- tcSplitIOType_maybe ty,
     pred_res_ty res_ty
   = returnM ()