
6 Sep
2010
6 Sep
'10
8:20 p.m.
On Tue, Sep 7, 2010 at 2:15 AM, Bas van Dijk
They do allow some
now finishing my sentence... The parameterization of α and β in Readable and Writable do allow some nice instances like: instance Readable (TMVar α) STM (Maybe α) where read = TMVar.tryTakeTMVar instance Writable (TMVar α) α STM Bool where write = TMVar.tryPutTMVar instance Writable (Chan α) (End α) IO () where write t = Chan.unGetChan t ∘ unEnd -- | Writing @End x@ to a 'Chan' or 'TChan' writes @x@ to the end of the channel -- instead of to the front. Also see 'unGetChan' and 'unGetTChan'. newtype End α = End {unEnd ∷ α} Regards, Bas