On Fri, Nov 05, 2004 at 01:57:53PM +0100, Benjamin Franksen wrote:
> Hello Experts,
> 
> I need MVar and Chan to be instances of Typeable. Any hint on how this is most 
> easily done would be greatly appreciated. I could change the libraries and 
> add 'deriving Typeable' but I hesitate to do so.

The easiest way is to hide type constructor Chan:

  import Control.Concurrent
  import Data.Generics

  newtype MyChan a = MyChan (Chan a) deriving Typeable

Of course, you can also write the instance for Chan by hand.

Best regards,
Tom

-- 
.signature: Too many levels of symbolic links
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to