> > decPair v1 v1 :: TVar Int -> TVar Int -> IO () > > decPair v1 v2 = atomically (decT v1 `orElse` decT v2) > > > > Will this actually compile? I was under the impression that 'orElse' > > could only combine STM types, not IO () types. > > The type of atomically is STM a -> IO a.
But orElse :: STM a -> STM a -> STM a decT can be of type TVar Int -> STM () if you leave out the atomically. -- Ariel J. Birnbaum _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe