Tue Apr 11 05:04:41 PDT 2006  [EMAIL PROTECTED]
  * Allow IO to be wrapped in a newtype in foreign import/export
  
  Up to now, the silent unwrapping of newtypes in foreign import/export
  has been limited to data values.  But it's useful for the IO monad
  itself:
  
        newtype MyIO a = MIO (IO a)
  
        foreign import foo :: Int -> MyIO Int
  
  This patch allows the IO monad to be
  wrapped too. This applies to foreign import "dynamic" and "wrapper", 
  thus
     foreign import "wrapper" foo :: MyIO () -> HisIO (FunPtr (MyIO ())) 
  
  Warning: I did on the plane, and I'm no longer sure if its 100% 
  complete, so needs more testing.  In particular the wrapper/dynamic bit.
  

    M ./compiler/deSugar/DsCCall.lhs -84 +89
    M ./compiler/deSugar/DsForeign.lhs -19 +9
    M ./compiler/typecheck/TcForeign.lhs -8 +9
    M ./compiler/typecheck/TcType.lhs -2 +19
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to