Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- starting at line of
- https://github.com/waldheinz/ads/blob/master/src/lib/Types.hs
- ------------------------------------------------------------------------ STM aware serialization----------------------------------------------------------------------class ToStateJSON a where toStateJSON :: a -> STM Valueinstance ToStateJSON a => ToStateJSON [a] where toStateJSON xs = toJSON <$> mapM toStateJSON xsinstance ToStateJSON a => ToStateJSON (TVar a) where toStateJSON v = readTVar v >>= toStateJSON
Advertisement
Add Comment
Please, Sign In to add comment